public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>
Cc: "brauner@kernel.org" <brauner@kernel.org>,
	"jlayton@kernel.org" <jlayton@kernel.org>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] fs/locks: Remove redundant assignment to cmd
Date: Thu, 9 Mar 2023 01:01:37 +0000	[thread overview]
Message-ID: <c419644f-cd79-af86-e455-0052d5287ef9@nvidia.com> (raw)
In-Reply-To: <20230308071316.16410-1-jiapeng.chong@linux.alibaba.com>

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@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4439
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.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@nvidia.com>

-ck



  reply	other threads:[~2023-03-09  1:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08  7:13 [PATCH] fs/locks: Remove redundant assignment to cmd Jiapeng Chong
2023-03-09  1:01 ` Chaitanya Kulkarni [this message]
2023-03-09  9:25 ` Christian Brauner
2023-03-09 11:50   ` Jeff Layton
2023-03-10  3:40     ` Al Viro
2023-03-10  8:52       ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c419644f-cd79-af86-e455-0052d5287ef9@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=abaci@linux.alibaba.com \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox