clk: sunxi: a20-gmac: fix kernel-doc warnings
PATCH 1/1 clk: sunxi: a20-gmac: fix kernel-doc warnings
Move the function kernel-doc comment to be immediately before the function implementation, then add a function parameter description to prevent kernel-doc warnings:
clk-a20-gmac.c:43: warning: expecting prototype for sun7i_a20_gmac_clk_setup(). Prototype was for SUN7I_A20_GMAC_GPIT() instead clk-a20-gmac.c:53: warning: Function parameter or struct member 'node' not described in 'sun7i_a20_gmac_clk_setup'
--- drivers/clk/sunxi/clk-a20-gmac.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
drivers/clk/sunxi/clk-a20-gmac.c +11 -10
@@ -15,8 +15,19 @@static DEFINE_SPINLOCK (gmac_lock); + +#define SUN7I_A20_GMAC_GPIT 2 +#define SUN7I_A20_GMAC_MASK 0x3 +#define SUN7I_A20_GMAC_PARENTS 2 + +static u32 sun7i_a20_gmac_mux_table[SUN7I_A20_GMAC_PARENTS ] = { +0x00 ,/* Select mii_phy_tx_clk */ +0x02 ,/* Select gmac_int_tx_clk */ +}; +/** * sun7i_a20_gmac_clk_setup - Setup function for A20/A31 GMAC clock module +* @node: &struct device_node for the clock * * This clock looks something like this * ________________________
@@ -39,16 +50,6 @@ static DEFINE_SPINLOCK(gmac_lock);* enable/disable this clock to configure the required state. The clock * driver then responds by auto-reparenting the clock. */ - -#define SUN7I_A20_GMAC_GPIT 2 -#define SUN7I_A20_GMAC_MASK 0x3 -#define SUN7I_A20_GMAC_PARENTS 2 - -static u32 sun7i_a20_gmac_mux_table[SUN7I_A20_GMAC_PARENTS ] = { -0x00 ,/* Select mii_phy_tx_clk */ -0x02 ,/* Select gmac_int_tx_clk */ -}; -static void __init sun7i_a20_gmac_clk_setup (struct device_node *node) {struct clk *clk;
Quoted 6 lines · On Sat, 20 Jan 2024 21:18:35 -0800 Randy Dunlap <[email protected]> wrote:
Move the function kernel-doc comment to be immediately before the function implementation, then add a function parameter description to prevent kernel-doc warnings:
clk-a20-gmac.c:43: warning: expecting prototype for
sun7i_a20_gmac_clk_setup(). Prototype was forSUN7I_A20_GMAC_GPIT()instead clk-a20-gmac.c:53: warning: Function parameter or struct member 'node' not described in 'sun7i_a20_gmac_clk_setup'
Confirmed to be just the move, plus the added parameter description.
Cheers,
Andre
Quoted 55 lines
Signed-off-by Randy Dunlap <[email protected]>Cc Emilio López <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc Jernej Skrabec <[email protected]>Cc Samuel Holland <[email protected]>--- drivers/clk/sunxi/clk-a20-gmac.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)diff --
a/drivers/clk/sunxi/clk-a20-gmac.cb/drivers/clk/sunxi/clk-a20-gmac.cdrivers/clk/sunxi/clk-a20-gmac.c +11
-10@@ -15,8 +15,19 @@static DEFINE_SPINLOCK (gmac_lock); + +#define SUN7I_A20_GMAC_GPIT 2 +#define SUN7I_A20_GMAC_MASK 0x3 +#define SUN7I_A20_GMAC_PARENTS 2 + +static u32 sun7i_a20_gmac_mux_table[SUN7I_A20_GMAC_PARENTS ] = { +0x00 ,/* Select mii_phy_tx_clk */ +0x02 ,/* Select gmac_int_tx_clk */ +}; +/** * sun7i_a20_gmac_clk_setup - Setup function for A20/A31 GMAC clock module +* @node: &struct device_node for the clock * * This clock looks something like this * ________________________ @@ -39,16 +50,6 @@ static DEFINE_SPINLOCK(gmac_lock);* enable/disable this clock to configure the required state. The clock * driver then responds by auto-reparenting the clock. */ - -#define SUN7I_A20_GMAC_GPIT 2 -#define SUN7I_A20_GMAC_MASK 0x3 -#define SUN7I_A20_GMAC_PARENTS 2 - -static u32 sun7i_a20_gmac_mux_table[SUN7I_A20_GMAC_PARENTS ] = { -0x00 ,/* Select mii_phy_tx_clk */ -0x02 ,/* Select gmac_int_tx_clk */ -}; -static void __init sun7i_a20_gmac_clk_setup (struct device_node *node) {struct clk *clk;
Dne nedelja, 21. januar 2024 ob 06:18:35 CET je Randy Dunlap napisal(a):
Quoted 7 lines
Move the function kernel-doc comment to be immediately before the function implementation, then add a function parameter description to prevent kernel-doc warnings:
clk-a20-gmac.c:43: warning: expecting prototype for
sun7i_a20_gmac_clk_setup(). Prototype was forSUN7I_A20_GMAC_GPIT()instead clk-a20-gmac.c:53: warning: Function parameter or struct member 'node' not described in 'sun7i_a20_gmac_clk_setup'
Quoted 10 lines
Signed-off-by Randy Dunlap <[email protected]>Cc Emilio López <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc Jernej Skrabec <[email protected]>Cc Samuel Holland <[email protected]>
Best regards,
Jernej
Dne nedelja, 21. januar 2024 ob 06:18:35 CET je Randy Dunlap napisal(a):
Quoted 7 lines
Move the function kernel-doc comment to be immediately before the function implementation, then add a function parameter description to prevent kernel-doc warnings:
clk-a20-gmac.c:43: warning: expecting prototype for
sun7i_a20_gmac_clk_setup(). Prototype was forSUN7I_A20_GMAC_GPIT()instead clk-a20-gmac.c:53: warning: Function parameter or struct member 'node' not described in 'sun7i_a20_gmac_clk_setup'
Quoted 10 lines
Signed-off-by Randy Dunlap <[email protected]>Cc Emilio López <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc Jernej Skrabec <[email protected]>Cc Samuel Holland <[email protected]>
Merged, thanks!
Best regards,
Jernej