From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Pavel Skripkin <paskripkin@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org,
christophe.jaillet@wanadoo.fr, kaixuxia@tencent.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] net: mii: make mii_ethtool_gset() return void
Date: Wed, 18 Aug 2021 17:59:25 +0300 [thread overview]
Message-ID: <YR0gTWn4G0xkekxF@smile.fi.intel.com> (raw)
In-Reply-To: <94ec6d98ab2d9a937da8fba8d7b99805f72809aa.1629296113.git.paskripkin@gmail.com>
On Wed, Aug 18, 2021 at 05:18:55PM +0300, Pavel Skripkin wrote:
> mii_ethtool_gset() does not return any errors. Since there is no users
there are
> of this function that rely on its return value, it can be
> made void.
>
> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> ---
>
> Changes in v2:
> inverted the order of patches
>
> ---
> drivers/net/mii.c | 5 +----
> include/linux/mii.h | 2 +-
> 2 files changed, 2 insertions(+), 5 deletions(-)
>
> 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().
> *
This line should gone as well.
> - * 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);
> --
> 2.32.0
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-08-18 14:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 18:34 [PATCH 1/2] net: mii: make mii_ethtool_gset() return void Pavel Skripkin
2021-08-17 18:35 ` [PATCH 2/2] net: pch_gbe: remove mii_ethtool_gset() error handling Pavel Skripkin
2021-08-18 0:39 ` [PATCH 1/2] net: mii: make mii_ethtool_gset() return void Jakub Kicinski
2021-08-18 8:50 ` Andy Shevchenko
2021-08-18 14:18 ` [PATCH v2 1/2] net: pch_gbe: remove mii_ethtool_gset() error handling Pavel Skripkin
2021-08-18 14:18 ` [PATCH v2 2/2] net: mii: make mii_ethtool_gset() return void Pavel Skripkin
2021-08-18 14:59 ` Andy Shevchenko [this message]
2021-08-18 15:06 ` [PATCH v3 1/2] net: pch_gbe: remove mii_ethtool_gset() error handling Pavel Skripkin
2021-08-18 15:07 ` [PATCH v3 2/2] net: mii: make mii_ethtool_gset() return void Pavel Skripkin
2021-08-19 12:20 ` [PATCH v3 1/2] net: pch_gbe: remove mii_ethtool_gset() error handling patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YR0gTWn4G0xkekxF@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=kaixuxia@tencent.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paskripkin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).