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]
Message-ID: <YY6Dk0TEQzorBlOU@redhat.com>
Date:   Fri, 12 Nov 2021 10:09:07 -0500
From:   Mike Snitzer <snitzer@...hat.com>
To:     cgel.zte@...il.com
Cc:     agk@...hat.com, dm-devel@...hat.com, linux-kernel@...r.kernel.org,
        ran jianping <ran.jianping@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: dm snapshot: remove unneeded variable

On Thu, Nov 11 2021 at  2:56P -0500,
cgel.zte@...il.com <cgel.zte@...il.com> wrote:

> From: ran jianping <ran.jianping@....com.cn>
> 
> Fix the following coccicheck review:
> ./drivers/md/dm-snap-transient.c:91:10-12: Unneeded variable
> 
> Remove unneeded variable used to store return value.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ran jianping <ran.jianping@....com.cn>
> ---
>  drivers/md/dm-snap-transient.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/md/dm-snap-transient.c b/drivers/md/dm-snap-transient.c
> index 0e0ae4c36b37..d95b59855da0 100644
> --- a/drivers/md/dm-snap-transient.c
> +++ b/drivers/md/dm-snap-transient.c
> @@ -88,7 +88,6 @@ static unsigned transient_status(struct dm_exception_store *store,
>  				 status_type_t status, char *result,
>  				 unsigned maxlen)
>  {
> -	unsigned sz = 0;
>  
>  	switch (status) {
>  	case STATUSTYPE_INFO:
> @@ -101,7 +100,7 @@ static unsigned transient_status(struct dm_exception_store *store,
>  		break;
>  	}
>  
> -	return sz;
> +	return 0;
>  }
>  
>  static struct dm_exception_store_type _transient_type = {
> -- 
> 2.25.1
> 

You clearly didn't even compile test this.

Nacked-by: Mike Snitzer <snitzer@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ