From d2058ab2a1f35c231beabec7511288c51ff72ced Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 9 Nov 2018 10:37:14 +0100 Subject: clk: imx: Avoid missing prototype warnings clk_gate2_free() is unused, so remove it. clk_gate2_alloc() is only used locally, so make it static. Signed-off-by: Sascha Hauer --- drivers/clk/imx/clk-gate2.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c index f2e704cdb2..8d5ed7e05c 100644 --- a/drivers/clk/imx/clk-gate2.c +++ b/drivers/clk/imx/clk-gate2.c @@ -87,7 +87,7 @@ static struct clk_ops clk_gate2_ops = { .is_enabled = clk_gate2_is_enabled, }; -struct clk *clk_gate2_alloc(const char *name, const char *parent, +static struct clk *clk_gate2_alloc(const char *name, const char *parent, void __iomem *reg, u8 shift, u8 cgr_val, unsigned long flags) { @@ -106,13 +106,6 @@ struct clk *clk_gate2_alloc(const char *name, const char *parent, return &g->clk; } -void clk_gate2_free(struct clk *clk) -{ - struct clk_gate2 *g = to_clk_gate2(clk); - - free(g); -} - struct clk *clk_gate2(const char *name, const char *parent, void __iomem *reg, u8 shift, u8 cgr_val, unsigned long flags) { -- cgit v1.2.3 From b3e8e7c9b8c9caeda49424d58e07453cba6c81c3 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 9 Nov 2018 10:38:34 +0100 Subject: dma: apbh: make locally used function static To avoid missing prototype warning. Signed-off-by: Sascha Hauer --- drivers/dma/apbh_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index 79f25109f9..72c2f364c5 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -67,7 +67,7 @@ static struct apbh_dma *apbh_dma; /* * Test is the DMA channel is valid channel */ -int mxs_dma_validate_chan(int channel) +static int mxs_dma_validate_chan(int channel) { struct mxs_dma_chan *pchan; -- cgit v1.2.3 From 3e11f36a81fbdaf635695003d4c1792b9373e3cc Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 9 Nov 2018 10:39:08 +0100 Subject: pinctrl: at91: Add missing include mach/iomux.h provides prototypes for functions that the pinctrl driver implements, so include it. With this we have a duplicate definition of enum at91_mux so remove it from the pinctrl driver. Signed-off-by: Sascha Hauer --- drivers/pinctrl/pinctrl-at91.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 3201eb9cb1..11e00833c5 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -32,6 +32,7 @@ #include #include +#include #include @@ -46,14 +47,6 @@ struct at91_gpio_chip { struct at91_pinctrl_mux_ops *ops; /* ops */ }; -enum at91_mux { - AT91_MUX_GPIO = 0, - AT91_MUX_PERIPH_A = 1, - AT91_MUX_PERIPH_B = 2, - AT91_MUX_PERIPH_C = 3, - AT91_MUX_PERIPH_D = 4, -}; - #define MAX_GPIO_BANKS 5 #define to_at91_pinctrl(c) container_of(c, struct at91_pinctrl, pctl); #define to_at91_gpio_chip(c) container_of(c, struct at91_gpio_chip, chip) -- cgit v1.2.3 From 148437d2aa596549da12ba215954a55b7304915d Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 9 Nov 2018 10:40:39 +0100 Subject: video: vpl: make locally used function static of_find_vpl() is only used locally, so make it static. Signed-off-by: Sascha Hauer --- drivers/video/vpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/vpl.c b/drivers/video/vpl.c index 99ad180eec..82ceeebada 100644 --- a/drivers/video/vpl.c +++ b/drivers/video/vpl.c @@ -36,7 +36,7 @@ int vpl_register(struct vpl *vpl) return 0; } -struct vpl *of_find_vpl(struct device_node *node) +static struct vpl *of_find_vpl(struct device_node *node) { struct vpl *vpl; -- cgit v1.2.3 From 68d144d5b6c102a09f0db30d630a85e3e22b2174 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 15 Nov 2018 10:56:58 -0800 Subject: aiodev: mc13xxx: Mark mc13xxx_adc_do_conversion() static Mark mc13xxx_adc_do_conversion() static because it is not used outside the source file. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- drivers/aiodev/mc13xxx_adc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/aiodev/mc13xxx_adc.c b/drivers/aiodev/mc13xxx_adc.c index 4e72048169..d445d1ec6e 100644 --- a/drivers/aiodev/mc13xxx_adc.c +++ b/drivers/aiodev/mc13xxx_adc.c @@ -75,8 +75,9 @@ to_mc13xx_adc_data(struct aiochannel *chan) return container_of(chan->aiodev, struct mc13xx_adc_data, aiodev); } -int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, - unsigned int channel, unsigned int *sample) +static int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, + unsigned int channel, + unsigned int *sample) { int i; int timeout = 100; -- cgit v1.2.3 From ee8fec16d78f94c95ebe604f3140f1a917a8cbd1 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 15 Nov 2018 10:56:59 -0800 Subject: net/e1000: Mark e1000_igb_get_flash_size() static Mark e1000_igb_get_flash_size() static because it is not used outside the source file. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- drivers/net/e1000/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c index 180b32ede8..522b950bfd 100644 --- a/drivers/net/e1000/eeprom.c +++ b/drivers/net/e1000/eeprom.c @@ -407,7 +407,7 @@ static void e1000_eeprom_uses_microwire(struct e1000_eeprom_info *eeprom, eeprom->read = e1000_read_eeprom_microwire; } -size_t e1000_igb_get_flash_size(struct e1000_hw *hw) +static size_t e1000_igb_get_flash_size(struct e1000_hw *hw) { struct device_node *node = hw->pdev->dev.device_node; -- cgit v1.2.3 From c2c2a8f20dc919f826eeb44a893071b4657d2ff4 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 15 Nov 2018 10:57:00 -0800 Subject: net/e1000: Mark e1000_register_invm() static Mark e1000_register_invm() static because it is not used outside the source file. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- drivers/net/e1000/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c index 522b950bfd..e0388a6faa 100644 --- a/drivers/net/e1000/eeprom.c +++ b/drivers/net/e1000/eeprom.c @@ -1504,7 +1504,7 @@ static int e1000_mtd_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) return e1000_mtd_sr_rmw(mtd, SR_BPALL, 0x0); } -int e1000_register_invm(struct e1000_hw *hw) +static int e1000_register_invm(struct e1000_hw *hw) { int ret; u16 word; -- cgit v1.2.3 From 00a1d12bf7128774b9d65f8b2becedaf7effabcb Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 19 Nov 2018 09:35:12 +0100 Subject: mtd: nand: omap: Add header file for bch decoder omap_gpmc_decode_bch() is defined in its user rather than properly in a header file. Add a header file to be included by both its user and the file implementing it. Signed-off-by: Sascha Hauer --- drivers/mtd/nand/nand_omap_bch_decoder.c | 2 ++ drivers/mtd/nand/nand_omap_bch_decoder.h | 6 ++++++ drivers/mtd/nand/nand_omap_gpmc.c | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 drivers/mtd/nand/nand_omap_bch_decoder.h (limited to 'drivers') diff --git a/drivers/mtd/nand/nand_omap_bch_decoder.c b/drivers/mtd/nand/nand_omap_bch_decoder.c index 64e8031785..4dd28a7704 100644 --- a/drivers/mtd/nand/nand_omap_bch_decoder.c +++ b/drivers/mtd/nand/nand_omap_bch_decoder.c @@ -15,6 +15,8 @@ #include +#include "nand_omap_bch_decoder.h" + #define mm 13 #define kk_shorten 4096 #define nn 8191 /* Length of codeword, n = 2**mm - 1 */ diff --git a/drivers/mtd/nand/nand_omap_bch_decoder.h b/drivers/mtd/nand/nand_omap_bch_decoder.h new file mode 100644 index 0000000000..74d24be028 --- /dev/null +++ b/drivers/mtd/nand/nand_omap_bch_decoder.h @@ -0,0 +1,6 @@ +#ifndef MTD_OMAP_GPMC_DECODE_BCH_H +#define MTD_OMAP_GPMC_DECODE_BCH_H + +int omap_gpmc_decode_bch(int select_4_8, unsigned char *ecc, unsigned int *err_loc); + +#endif /* MTD_OMAP_GPMC_DECODE_BCH_H */ \ No newline at end of file diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c index d0b1699839..323a9c7532 100644 --- a/drivers/mtd/nand/nand_omap_gpmc.c +++ b/drivers/mtd/nand/nand_omap_gpmc.c @@ -71,6 +71,8 @@ #include #include +#include "nand_omap_bch_decoder.h" + #define GPMC_ECC_CONFIG_ECCENABLE (1 << 0) #define GPMC_ECC_CONFIG_ECCCS(x) (((x) & 0x7) << 1) #define GPMC_ECC_CONFIG_ECCTOPSECTOR(x) (((x) & 0x7) << 4) @@ -90,8 +92,6 @@ static const uint8_t bch8_vector[] = {0xf3, 0xdb, 0x14, 0x16, 0x8b, 0xd2, 0xbe, 0xcc, 0xac, 0x6b, 0xff, 0x99, 0x7b}; -int omap_gpmc_decode_bch(int select_4_8, unsigned char *ecc, unsigned int *err_loc); - static const char *ecc_mode_strings[] = { "software", "hamming_hw_romcode", -- cgit v1.2.3 From cf209e10d4bf666bc796b69a3ab605e27509b9b2 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 19 Nov 2018 09:36:32 +0100 Subject: net: cpsw: Make locally used function static Signed-off-by: Sascha Hauer --- drivers/net/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c index c6fc21dc54..c32fc5e442 100644 --- a/drivers/net/cpsw.c +++ b/drivers/net/cpsw.c @@ -1115,7 +1115,7 @@ static int cpsw_probe_dt(struct cpsw_priv *priv) return 0; } -int cpsw_probe(struct device_d *dev) +static int cpsw_probe(struct device_d *dev) { struct resource *iores; struct cpsw_platform_data *data = (struct cpsw_platform_data *)dev->platform_data; -- cgit v1.2.3 From f7a7a63e549a7205d54993d04a89e6232e88970f Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 19 Nov 2018 09:36:55 +0100 Subject: usb: musb: Add missing includes phy-am335x.c and phy-am335x-control.c both implement functions that they do not include the header file providing the prototype for. Add the missing include and remove the duplicate definition of struct phy_control. Signed-off-by: Sascha Hauer --- drivers/usb/musb/phy-am335x-control.c | 5 +---- drivers/usb/musb/phy-am335x.c | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/musb/phy-am335x-control.c b/drivers/usb/musb/phy-am335x-control.c index 55a2ed27b7..c84525ec7e 100644 --- a/drivers/usb/musb/phy-am335x-control.c +++ b/drivers/usb/musb/phy-am335x-control.c @@ -4,10 +4,7 @@ #include #include -struct phy_control { - void (*phy_power)(struct phy_control *phy_ctrl, u32 id, bool on); - void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on); -}; +#include "am35x-phy-control.h" struct am335x_control_usb { struct device_d *dev; diff --git a/drivers/usb/musb/phy-am335x.c b/drivers/usb/musb/phy-am335x.c index ec8c0f538b..df31255d89 100644 --- a/drivers/usb/musb/phy-am335x.c +++ b/drivers/usb/musb/phy-am335x.c @@ -5,6 +5,7 @@ #include #include "am35x-phy-control.h" #include "musb_core.h" +#include "phy-am335x.h" struct am335x_usbphy { void __iomem *base; -- cgit v1.2.3 From 6f4ad0586dca7584bfa9e16af63a3b2575f12bb3 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 19 Nov 2018 09:39:26 +0100 Subject: spi: omap: make locally used functions static Signed-off-by: Sascha Hauer --- drivers/spi/omap3_spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index f63039718f..beea772aa9 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -67,7 +67,7 @@ static void spi_reset(struct spi_master *master) writel(OMAP3_MCSPI_WAKEUPENABLE_WKEN, regs + OMAP3_MCSPI_WAKEUPENABLE); } -int spi_claim_bus(struct spi_device *spi) +static int spi_claim_bus(struct spi_device *spi) { struct spi_master *master = spi->master; struct omap3_spi_master *omap3_master = container_of(master, struct omap3_spi_master, master); @@ -144,7 +144,7 @@ int spi_claim_bus(struct spi_device *spi) return 0; } -int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp, +static int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp, unsigned long flags) { struct spi_master *master = spi->master; @@ -198,7 +198,7 @@ int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp, return 0; } -int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp, +static int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp, unsigned long flags) { struct spi_master *master = spi->master; @@ -245,7 +245,7 @@ int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp, return 0; } -int spi_xfer(struct spi_device *spi, struct spi_transfer *t, unsigned long flags) +static int spi_xfer(struct spi_device *spi, struct spi_transfer *t, unsigned long flags) { struct spi_master *master = spi->master; struct omap3_spi_master *omap3_master = container_of(master, struct omap3_spi_master, master); -- cgit v1.2.3 From fbd3ef2af62a497f3471c419f54783f828af9bfb Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 19 Nov 2018 09:39:56 +0100 Subject: bus: omap-gpmc: make locally used function static Signed-off-by: Sascha Hauer --- drivers/bus/omap-gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c index be9ef92851..a3fccb2182 100644 --- a/drivers/bus/omap-gpmc.c +++ b/drivers/bus/omap-gpmc.c @@ -187,7 +187,7 @@ static unsigned int gpmc_ns_to_ticks(unsigned int time_ns) return (time_ns * 1000 + tick_ps - 1) / tick_ps; } -int gpmc_calc_divider(unsigned int sync_clk) +static int gpmc_calc_divider(unsigned int sync_clk) { int div; u32 l; -- cgit v1.2.3