Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: at91: Silence warnings and cleanup __init/extern usage

Remove useless ifdefs around function prototypes to silence the
following sparse warnings when the configs aren't enabled.

drivers/clk/at91/clk-h32mx.c:95:13: warning: symbol
'of_sama5d4_clk_h32mx_setup' was not declared. Should it be
static?
drivers/clk/at91/clk-utmi.c:159:13: warning: symbol
'of_at91sam9x5_clk_utmi_setup' was not declared. Should it be
static?

Plus, using __init and extern in function prototypes doesn't do
anything, so just drop it throughout this file.

Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

+48 -56
+48 -56
drivers/clk/at91/pmc.h
··· 59 59 int of_at91_get_clk_range(struct device_node *np, const char *propname, 60 60 struct clk_range *range); 61 61 62 - extern void __init of_at91sam9260_clk_slow_setup(struct device_node *np, 63 - struct at91_pmc *pmc); 62 + void of_at91sam9260_clk_slow_setup(struct device_node *np, 63 + struct at91_pmc *pmc); 64 64 65 - extern void __init of_at91rm9200_clk_main_osc_setup(struct device_node *np, 66 - struct at91_pmc *pmc); 67 - extern void __init of_at91sam9x5_clk_main_rc_osc_setup(struct device_node *np, 68 - struct at91_pmc *pmc); 69 - extern void __init of_at91rm9200_clk_main_setup(struct device_node *np, 70 - struct at91_pmc *pmc); 71 - extern void __init of_at91sam9x5_clk_main_setup(struct device_node *np, 72 - struct at91_pmc *pmc); 65 + void of_at91rm9200_clk_main_osc_setup(struct device_node *np, 66 + struct at91_pmc *pmc); 67 + void of_at91sam9x5_clk_main_rc_osc_setup(struct device_node *np, 68 + struct at91_pmc *pmc); 69 + void of_at91rm9200_clk_main_setup(struct device_node *np, 70 + struct at91_pmc *pmc); 71 + void of_at91sam9x5_clk_main_setup(struct device_node *np, 72 + struct at91_pmc *pmc); 73 73 74 - extern void __init of_at91rm9200_clk_pll_setup(struct device_node *np, 75 - struct at91_pmc *pmc); 76 - extern void __init of_at91sam9g45_clk_pll_setup(struct device_node *np, 77 - struct at91_pmc *pmc); 78 - extern void __init of_at91sam9g20_clk_pllb_setup(struct device_node *np, 79 - struct at91_pmc *pmc); 80 - extern void __init of_sama5d3_clk_pll_setup(struct device_node *np, 81 - struct at91_pmc *pmc); 82 - extern void __init of_at91sam9x5_clk_plldiv_setup(struct device_node *np, 83 - struct at91_pmc *pmc); 74 + void of_at91rm9200_clk_pll_setup(struct device_node *np, 75 + struct at91_pmc *pmc); 76 + void of_at91sam9g45_clk_pll_setup(struct device_node *np, 77 + struct at91_pmc *pmc); 78 + void of_at91sam9g20_clk_pllb_setup(struct device_node *np, 79 + struct at91_pmc *pmc); 80 + void of_sama5d3_clk_pll_setup(struct device_node *np, 81 + struct at91_pmc *pmc); 82 + void of_at91sam9x5_clk_plldiv_setup(struct device_node *np, 83 + struct at91_pmc *pmc); 84 84 85 - extern void __init of_at91rm9200_clk_master_setup(struct device_node *np, 86 - struct at91_pmc *pmc); 87 - extern void __init of_at91sam9x5_clk_master_setup(struct device_node *np, 88 - struct at91_pmc *pmc); 85 + void of_at91rm9200_clk_master_setup(struct device_node *np, 86 + struct at91_pmc *pmc); 87 + void of_at91sam9x5_clk_master_setup(struct device_node *np, 88 + struct at91_pmc *pmc); 89 89 90 - extern void __init of_at91rm9200_clk_sys_setup(struct device_node *np, 91 - struct at91_pmc *pmc); 90 + void of_at91rm9200_clk_sys_setup(struct device_node *np, 91 + struct at91_pmc *pmc); 92 92 93 - extern void __init of_at91rm9200_clk_periph_setup(struct device_node *np, 94 - struct at91_pmc *pmc); 95 - extern void __init of_at91sam9x5_clk_periph_setup(struct device_node *np, 96 - struct at91_pmc *pmc); 93 + void of_at91rm9200_clk_periph_setup(struct device_node *np, 94 + struct at91_pmc *pmc); 95 + void of_at91sam9x5_clk_periph_setup(struct device_node *np, 96 + struct at91_pmc *pmc); 97 97 98 - extern void __init of_at91rm9200_clk_prog_setup(struct device_node *np, 99 - struct at91_pmc *pmc); 100 - extern void __init of_at91sam9g45_clk_prog_setup(struct device_node *np, 101 - struct at91_pmc *pmc); 102 - extern void __init of_at91sam9x5_clk_prog_setup(struct device_node *np, 103 - struct at91_pmc *pmc); 98 + void of_at91rm9200_clk_prog_setup(struct device_node *np, 99 + struct at91_pmc *pmc); 100 + void of_at91sam9g45_clk_prog_setup(struct device_node *np, 101 + struct at91_pmc *pmc); 102 + void of_at91sam9x5_clk_prog_setup(struct device_node *np, 103 + struct at91_pmc *pmc); 104 104 105 - #if defined(CONFIG_HAVE_AT91_UTMI) 106 - extern void __init of_at91sam9x5_clk_utmi_setup(struct device_node *np, 107 - struct at91_pmc *pmc); 108 - #endif 105 + void of_at91sam9x5_clk_utmi_setup(struct device_node *np, 106 + struct at91_pmc *pmc); 109 107 110 - #if defined(CONFIG_HAVE_AT91_USB_CLK) 111 - extern void __init of_at91rm9200_clk_usb_setup(struct device_node *np, 112 - struct at91_pmc *pmc); 113 - extern void __init of_at91sam9x5_clk_usb_setup(struct device_node *np, 114 - struct at91_pmc *pmc); 115 - extern void __init of_at91sam9n12_clk_usb_setup(struct device_node *np, 116 - struct at91_pmc *pmc); 117 - #endif 108 + void of_at91rm9200_clk_usb_setup(struct device_node *np, 109 + struct at91_pmc *pmc); 110 + void of_at91sam9x5_clk_usb_setup(struct device_node *np, 111 + struct at91_pmc *pmc); 112 + void of_at91sam9n12_clk_usb_setup(struct device_node *np, 113 + struct at91_pmc *pmc); 118 114 119 - #if defined(CONFIG_HAVE_AT91_SMD) 120 - extern void __init of_at91sam9x5_clk_smd_setup(struct device_node *np, 121 - struct at91_pmc *pmc); 122 - #endif 115 + void of_at91sam9x5_clk_smd_setup(struct device_node *np, 116 + struct at91_pmc *pmc); 123 117 124 - #if defined(CONFIG_HAVE_AT91_H32MX) 125 - extern void __init of_sama5d4_clk_h32mx_setup(struct device_node *np, 126 - struct at91_pmc *pmc); 127 - #endif 118 + void of_sama5d4_clk_h32mx_setup(struct device_node *np, 119 + struct at91_pmc *pmc); 128 120 129 121 #endif /* __PMC_H_ */