lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4391c380-f7f6-d549-a225-716b9b9df664@cogentembedded.com>
Date:   Sun, 4 Jun 2017 20:22:05 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Yuval Shaia <yuval.shaia@...cle.com>, davem@...emloft.net,
        jarod@...hat.com, tklauser@...tanz.ch, tremyfr@...il.com,
        netdev@...r.kernel.org, linux-parisc@...r.kernel.org
Subject: Re: [PATCH] net/dec: Make __de_get_link_ksettings return void

Hello!

On 6/4/2017 8:08 PM, Yuval Shaia wrote:

> Make return value void since function never return meaningfull value

   You only make 1 of 2 functions void. It looks like there should be 2 patches.

>
> Signed-off-by: Yuval Shaia <yuval.shaia@...cle.com>
> ---
>  drivers/net/ethernet/dec/tulip/de2104x.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c
> index 91b8f6f..c87b8cc 100644
> --- a/drivers/net/ethernet/dec/tulip/de2104x.c
> +++ b/drivers/net/ethernet/dec/tulip/de2104x.c
> @@ -1483,8 +1483,8 @@ static void __de_get_regs(struct de_private *de, u8 *buf)
>  	de_rx_missed(de, rbuf[8]);
>  }
>
> -static int __de_get_link_ksettings(struct de_private *de,
> -				   struct ethtool_link_ksettings *cmd)
> +static void __de_get_link_ksettings(struct de_private *de,
> +				    struct ethtool_link_ksettings *cmd)
>  {
>  	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
>  						de->media_supported);
> @@ -1517,8 +1517,6 @@ static int __de_get_link_ksettings(struct de_private *de,
>  		cmd->base.autoneg = AUTONEG_ENABLE;
>
>  	/* ignore maxtxpkt, maxrxpkt for now */
> -
> -	return 0;
>  }
>
>  static int __de_set_link_ksettings(struct de_private *de,
> @@ -1615,13 +1613,12 @@ static int de_get_link_ksettings(struct net_device *dev,
>  				 struct ethtool_link_ksettings *cmd)
>  {
>  	struct de_private *de = netdev_priv(dev);
> -	int rc;
>
>  	spin_lock_irq(&de->lock);
> -	rc = __de_get_link_ksettings(de, cmd);
> +	__de_get_link_ksettings(de, cmd);
>  	spin_unlock_irq(&de->lock);
>
> -	return rc;
> +	return 0;
>  }
>
>  static int de_set_link_ksettings(struct net_device *dev,
>

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ