linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Jan Kara <jack@suse.com>,
	linux-ext4@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ext2: remove redundant assignment to pointer end
Date: Tue, 21 Mar 2023 15:08:28 +0100	[thread overview]
Message-ID: <20230321140828.5h6x4rccey4gktkr@quack3> (raw)
In-Reply-To: <20230317143420.419005-1-colin.i.king@gmail.com>

On Fri 17-03-23 14:34:20, Colin Ian King wrote:
> Pointer is assigned a value that is never read, the assignment is
> redundant and can be removed.
> 
> Cleans up clang-scan warning:
> fs/ext2/xattr.c:555:3: warning: Value stored to 'end' is never read [deadcode.DeadStores]
>                 end = (char *)header + sb->s_blocksize;
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Thanks. I've picked the patch to my tree.

								Honza

> ---
>  fs/ext2/xattr.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
> index b126af5f8b15..8906ba479aaf 100644
> --- a/fs/ext2/xattr.c
> +++ b/fs/ext2/xattr.c
> @@ -552,7 +552,6 @@ ext2_xattr_set(struct inode *inode, int name_index, const char *name,
>  		error = -ENOMEM;
>  		if (header == NULL)
>  			goto cleanup;
> -		end = (char *)header + sb->s_blocksize;
>  		header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC);
>  		header->h_blocks = header->h_refcount = cpu_to_le32(1);
>  		last = here = ENTRY(header+1);
> -- 
> 2.30.2
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2023-03-21 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 14:34 [PATCH][next] ext2: remove redundant assignment to pointer end Colin Ian King
2023-03-21 14:08 ` Jan Kara [this message]

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=20230321140828.5h6x4rccey4gktkr@quack3 \
    --to=jack@suse.cz \
    --cc=colin.i.king@gmail.com \
    --cc=jack@suse.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).