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: <c419644f-cd79-af86-e455-0052d5287ef9@nvidia.com>
Date:   Thu, 9 Mar 2023 01:01:37 +0000
From:   Chaitanya Kulkarni <chaitanyak@...dia.com>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>
CC:     "brauner@...nel.org" <brauner@...nel.org>,
        "jlayton@...nel.org" <jlayton@...nel.org>,
        "chuck.lever@...cle.com" <chuck.lever@...cle.com>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH] fs/locks: Remove redundant assignment to cmd

On 3/7/23 23:13, Jiapeng Chong wrote:
> Variable 'cmd' set but not used.
>
> fs/locks.c:2428:3: warning: Value stored to 'cmd' is never read.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4439
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
>   fs/locks.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/fs/locks.c b/fs/locks.c
> index 66b4eef09db5..d82c4cacdfb9 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -2425,7 +2425,6 @@ int fcntl_getlk64(struct file *filp, unsigned int cmd, struct flock64 *flock)
>   		if (flock->l_pid != 0)
>   			goto out;
>   
> -		cmd = F_GETLK64;
>   		fl->fl_flags |= FL_OFDLCK;
>   		fl->fl_owner = filp;
>   	}
Indeed cmd is not used after this assignment in above function.

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>

-ck


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ