Re: dm: remove unneeded variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 11 2021 at  2:53P -0500,
cgel.zte@xxxxxxxxx <cgel.zte@xxxxxxxxx> wrote:

> From: ran jianping <ran.jianping@xxxxxxxxxx>
> 
> Fix the following coccicheck review:
> ./drivers/md/dm-ps-round-robin.c:91:5-7:Unneeded variable
> 
> Remove unneeded variable used to store return value.
> 
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: ran jianping <ran.jianping@xxxxxxxxxx>
> ---
>  drivers/md/dm-ps-round-robin.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/md/dm-ps-round-robin.c b/drivers/md/dm-ps-round-robin.c
> index 27f44c5fa04e..455fc02af1cf 100644
> --- a/drivers/md/dm-ps-round-robin.c
> +++ b/drivers/md/dm-ps-round-robin.c
> @@ -88,7 +88,6 @@ static int rr_status(struct path_selector *ps, struct dm_path *path,
>  		     status_type_t type, char *result, unsigned int maxlen)
>  {
>  	struct path_info *pi;
> -	int sz = 0;
>  
>  	if (!path)
>  		DMEMIT("0 ");
> @@ -107,7 +106,7 @@ static int rr_status(struct path_selector *ps, struct dm_path *path,
>  		}
>  	}
>  
> -	return sz;
> +	return 0;
>  }
>  
>  /*
> -- 
> 2.25.1
> 

You clearly didn't even	compile	test this (hint: DMEMIT macro uses it).

Nacked-by: Mike Snitzer <snitzer@xxxxxxxxxx>

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux