sandbox: swap_case: Use statics where possible
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:56:03 +0000 (08:56 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:57:40 +0000 (13:57 +0800)
Some functions and a struct should be marked static since they are not
used outside this file. Update them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/misc/swap_case.c

index eb32d101f969bb0a6d16f262bdaa8e789558dc66..8abf88a8fff84425c52e8f8a75299faa8d1abd43 100644 (file)
@@ -286,8 +286,8 @@ static void sandbox_swap_case_do_op(enum swap_case_op op, char *str, int len)
        }
 }
 
-int sandbox_swap_case_read_io(struct udevice *dev, unsigned int addr,
-                             ulong *valuep, enum pci_size_t size)
+static int sandbox_swap_case_read_io(struct udevice *dev, unsigned int addr,
+                                    ulong *valuep, enum pci_size_t size)
 {
        struct swap_case_priv *priv = dev_get_priv(dev);
        unsigned int offset;
@@ -304,8 +304,8 @@ int sandbox_swap_case_read_io(struct udevice *dev, unsigned int addr,
        return 0;
 }
 
-int sandbox_swap_case_write_io(struct udevice *dev, unsigned int addr,
-                              ulong value, enum pci_size_t size)
+static int sandbox_swap_case_write_io(struct udevice *dev, unsigned int addr,
+                                     ulong value, enum pci_size_t size)
 {
        struct swap_case_priv *priv = dev_get_priv(dev);
        unsigned int offset;
@@ -392,7 +392,7 @@ static int sandbox_swap_case_unmap_physmem(struct udevice *dev,
        return 0;
 }
 
-struct dm_pci_emul_ops sandbox_swap_case_emul_ops = {
+static struct dm_pci_emul_ops sandbox_swap_case_emul_ops = {
        .get_devfn = sandbox_swap_case_get_devfn,
        .read_config = sandbox_swap_case_read_config,
        .write_config = sandbox_swap_case_write_config,