mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Chuck Lever <chuck.lever@oracle.com>,
	Jeff Layton <jlayton@kernel.org>,
	linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] nfsd: remove redundant assignment to pointer dentry
Date: Tue, 14 Feb 2023 17:55:35 +0300	[thread overview]
Message-ID: <Y+ug53kWXe5tqZbw@kadam> (raw)
In-Reply-To: <20230214141428.301121-1-colin.i.king@gmail.com>

On Tue, Feb 14, 2023 at 02:14:28PM +0000, Colin Ian King wrote:
> The pointer dentry is assigned a value that is never read, the
> assignment is redundant and can be removed.
> 
> Cleans up clang-scan warning:
> fs/nfsd/nfsctl.c:1231:2: warning: Value stored to 'dentry' is
> never read [deadcode.DeadStores]
>         dentry = ERR_PTR(ret);
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

No need to initalized "int ret = -ENOMEM;" either.

regards,
dan carpenter


  reply	other threads:[~2023-02-14 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 14:14 Colin Ian King
2023-02-14 14:55 ` Dan Carpenter [this message]
2023-02-14 15:16   ` Chuck Lever III

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=Y+ug53kWXe5tqZbw@kadam \
    --to=error27@gmail.com \
    --cc=chuck.lever@oracle.com \
    --cc=colin.i.king@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®