Message ID | 680892d787669c56f0ceac0e9c113d6301fbe7c6.1629225089.git.paskripkin@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/2] net: mii: make mii_ethtool_gset() return void | expand |
On Tue, 17 Aug 2021 21:34:42 +0300 Pavel Skripkin wrote: > mii_ethtool_gset() does not return any errors. We can make it return > void to simplify error checking in drivers, that rely on return value > of this function. > > Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> This breaks the build and therefore would be a nuisance in bisection. Please squash the changes or invert the order.
On Tue, Aug 17, 2021 at 05:39:04PM -0700, Jakub Kicinski wrote: > On Tue, 17 Aug 2021 21:34:42 +0300 Pavel Skripkin wrote: > > mii_ethtool_gset() does not return any errors. We can make it return > > void to simplify error checking in drivers, that rely on return value > > of this function. > > > > Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> > > This breaks the build and therefore would be a nuisance in bisection. > Please squash the changes or invert the order. Please invert the order. You will need slightly different justification for the PCH GBE patch. Feel free to add my Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> to the PCH GBE one. -- With Best Regards, Andy Shevchenko
diff --git a/drivers/net/mii.c b/drivers/net/mii.c index 779c3a96dba7..3e7823267a3b 100644 --- a/drivers/net/mii.c +++ b/drivers/net/mii.c @@ -50,9 +50,8 @@ static u32 mii_get_an(struct mii_if_info *mii, u16 addr) * The @ecmd parameter is expected to have been cleared before calling * mii_ethtool_gset(). * - * Returns 0 for success, negative on error. */ -int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) +void mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) { struct net_device *dev = mii->dev; u16 bmcr, bmsr, ctrl1000 = 0, stat1000 = 0; @@ -131,8 +130,6 @@ int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) mii->full_duplex = ecmd->duplex; /* ignore maxtxpkt, maxrxpkt for now */ - - return 0; } /** diff --git a/include/linux/mii.h b/include/linux/mii.h index 219b93cad1dd..12ea29e04293 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h @@ -32,7 +32,7 @@ struct mii_if_info { extern int mii_link_ok (struct mii_if_info *mii); extern int mii_nway_restart (struct mii_if_info *mii); -extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); +extern void mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); extern void mii_ethtool_get_link_ksettings( struct mii_if_info *mii, struct ethtool_link_ksettings *cmd); extern int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
mii_ethtool_gset() does not return any errors. We can make it return void to simplify error checking in drivers, that rely on return value of this function. Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> --- drivers/net/mii.c | 5 +---- include/linux/mii.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-)