diff mbox series

net: phy: genphy_init can be static

Message ID 20210918115524.1066659-1-vladimir.oltean@nxp.com
State Accepted
Commit a17776be1dbe91684a9d0c60f623e9243e43fea9
Delegated to: Ramon Fried
Headers show
Series net: phy: genphy_init can be static | expand

Commit Message

Vladimir Oltean Sept. 18, 2021, 11:55 a.m. UTC
To avoid a warning with W=1 about this function not having a previous
prototype, declare it as static, because it is not used outside of this
translation module.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/phy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bin Meng Sept. 18, 2021, 12:09 p.m. UTC | #1
On Sat, Sep 18, 2021 at 7:55 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
> To avoid a warning with W=1 about this function not having a previous
> prototype, declare it as static, because it is not used outside of this
> translation module.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  drivers/net/phy/phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Ramon Fried Sept. 28, 2021, 1:28 p.m. UTC | #2
On Sat, Sep 18, 2021 at 3:09 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Sat, Sep 18, 2021 at 7:55 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> >
> > To avoid a warning with W=1 about this function not having a previous
> > prototype, declare it as static, because it is not used outside of this
> > translation module.
> >
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> > ---
> >  drivers/net/phy/phy.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
diff mbox series

Patch

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 69acb6946061..c9fc20855ba1 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -463,7 +463,7 @@  static struct phy_driver genphy_driver = {
 	.shutdown	= genphy_shutdown,
 };
 
-int genphy_init(void)
+static int genphy_init(void)
 {
 	return phy_register(&genphy_driver);
 }