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: <0e46020a1433409a8daccb829902280b@EX13D11EUB003.ant.amazon.com>
Date:   Sun, 23 Feb 2020 08:18:13 +0000
From:   "Jubran, Samih" <sameehj@...zon.com>
To:     Colin King <colin.king@...onical.com>,
        "Belgazal, Netanel" <netanel@...zon.com>,
        "Kiyanovski, Arthur" <akiyano@...zon.com>,
        "Tzalik, Guy" <gtzalik@...zon.com>,
        "Bshara, Saeed" <saeedb@...zon.com>,
        "Machulsky, Zorik" <zorik@...zon.com>,
        "David S . Miller" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net: ena: ethtool: remove redundant non-zero check on rc

Ack, Thanks

> -----Original Message-----
> From: Colin King <colin.king@...onical.com>
> Sent: Saturday, February 22, 2020 1:27 AM
> To: Belgazal, Netanel <netanel@...zon.com>; Kiyanovski, Arthur
> <akiyano@...zon.com>; Tzalik, Guy <gtzalik@...zon.com>; Bshara, Saeed
> <saeedb@...zon.com>; Machulsky, Zorik <zorik@...zon.com>; David S .
> Miller <davem@...emloft.net>; Jubran, Samih <sameehj@...zon.com>;
> netdev@...r.kernel.org
> Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] net: ena: ethtool: remove redundant non-zero check on rc
> 
> From: Colin Ian King <colin.king@...onical.com>
> 
> The non-zero check on rc is redundant as a previous non-zero check on rc will
> always return and the second check is never reached, hence it is redundant
> and can be removed.  Also remove a blank line.
> 
> Addresses-Coverity: ("Logically dead code")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
> b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
> index ced1d577b62a..1e38930353f2 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
> @@ -674,7 +674,6 @@ static int ena_get_rxfh(struct net_device *netdev,
> u32 *indir, u8 *key,
>  	 * supports getting/setting the hash function.
>  	 */
>  	rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func,
> key);
> -
>  	if (rc) {
>  		if (rc == -EOPNOTSUPP) {
>  			key = NULL;
> @@ -685,9 +684,6 @@ static int ena_get_rxfh(struct net_device *netdev,
> u32 *indir, u8 *key,
>  		return rc;
>  	}
> 
> -	if (rc)
> -		return rc;
> -
>  	switch (ena_func) {
>  	case ENA_ADMIN_TOEPLITZ:
>  		func = ETH_RSS_HASH_TOP;
> --
> 2.25.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ