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 |
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>
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 --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); }
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(-)