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] [day] [month] [year] [list]
Date:   Mon, 19 Dec 2016 16:54:03 -0800
From:   James Smart <james.smart@...adcom.com>
To:     Colin King <colin.king@...onical.com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>,
        linux-nvme@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme-fabrics: remove some logically dead code performing
 redundant ret checks

Looks good.

-- james

Signed-off-by: James Smart <james.smart@...adcom.com>



On 12/9/2016 6:59 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The check to see if ret is non-zero and return this rather than count
> is redundant in two occassions.  It is redundant because prior to this
> check, the return code ret is already checked for a non-zero error
> return value and we return from the function at that point.
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>   drivers/nvme/target/fcloop.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c
> index bcb8ebe..4e8e6a2 100644
> --- a/drivers/nvme/target/fcloop.c
> +++ b/drivers/nvme/target/fcloop.c
> @@ -845,7 +845,7 @@ fcloop_create_remote_port(struct device *dev, struct device_attribute *attr,
>   	rport->lport = nport->lport;
>   	nport->rport = rport;
>   
> -	return ret ? ret : count;
> +	return count;
>   }
>   
>   
> @@ -952,7 +952,7 @@ fcloop_create_target_port(struct device *dev, struct device_attribute *attr,
>   	tport->lport = nport->lport;
>   	nport->tport = tport;
>   
> -	return ret ? ret : count;
> +	return count;
>   }
>   
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ