public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ntfs: remove redundant initialization to pointer cb_sb_start
@ 2023-04-18 15:36 Colin Ian King
  2023-05-06  0:57 ` Namjae Jeon
  2023-05-19  9:58 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2023-04-18 15:36 UTC (permalink / raw)
  To: Anton Altaparmakov, linux-ntfs-dev; +Cc: kernel-janitors, linux-kernel

The pointer cb_sb_start is being initialized with a value that is never
read, it is being re-assigned the same value later on when it is first
being used. The initialization is redundant and can be removed.

Cleans up clang scan build warning:
fs/ntfs/compress.c:164:6: warning: Value stored to 'cb_sb_start' during its initialization is never read [deadcode.DeadStores]
        u8 *cb_sb_start = cb;   /* Beginning of the current sb in the cb. */

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/ntfs/compress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c
index f9cb180b6f6b..761aaa0195d6 100644
--- a/fs/ntfs/compress.c
+++ b/fs/ntfs/compress.c
@@ -161,7 +161,7 @@ static int ntfs_decompress(struct page *dest_pages[], int completed_pages[],
 	 */
 	u8 *cb_end = cb_start + cb_size; /* End of cb. */
 	u8 *cb = cb_start;	/* Current position in cb. */
-	u8 *cb_sb_start = cb;	/* Beginning of the current sb in the cb. */
+	u8 *cb_sb_start;	/* Beginning of the current sb in the cb. */
 	u8 *cb_sb_end;		/* End of current sb / beginning of next sb. */
 
 	/* Variables for uncompressed data / destination. */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ntfs: remove redundant initialization to pointer cb_sb_start
  2023-04-18 15:36 [PATCH] ntfs: remove redundant initialization to pointer cb_sb_start Colin Ian King
@ 2023-05-06  0:57 ` Namjae Jeon
  2023-05-19  9:58 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Namjae Jeon @ 2023-05-06  0:57 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Anton Altaparmakov, linux-ntfs-dev, kernel-janitors, linux-kernel,
	Christian Brauner

2023-04-19 0:36 GMT+09:00, Colin Ian King <colin.i.king@gmail.com>:
> The pointer cb_sb_start is being initialized with a value that is never
> read, it is being re-assigned the same value later on when it is first
> being used. The initialization is redundant and can be removed.
>
> Cleans up clang scan build warning:
> fs/ntfs/compress.c:164:6: warning: Value stored to 'cb_sb_start' during its
> initialization is never read [deadcode.DeadStores]
>         u8 *cb_sb_start = cb;   /* Beginning of the current sb in the cb.
> */
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ntfs: remove redundant initialization to pointer cb_sb_start
  2023-04-18 15:36 [PATCH] ntfs: remove redundant initialization to pointer cb_sb_start Colin Ian King
  2023-05-06  0:57 ` Namjae Jeon
@ 2023-05-19  9:58 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2023-05-19  9:58 UTC (permalink / raw)
  To: Anton Altaparmakov, linux-ntfs-dev, Colin Ian King
  Cc: Christian Brauner, kernel-janitors, linux-kernel

On Tue, 18 Apr 2023 16:36:07 +0100, Colin Ian King wrote:
> The pointer cb_sb_start is being initialized with a value that is never
> read, it is being re-assigned the same value later on when it is first
> being used. The initialization is redundant and can be removed.
> 
> Cleans up clang scan build warning:
> fs/ntfs/compress.c:164:6: warning: Value stored to 'cb_sb_start' during its initialization is never read [deadcode.DeadStores]
>         u8 *cb_sb_start = cb;   /* Beginning of the current sb in the cb. */
> 
> [...]

Applied to the fs.ntfs branch of the vfs/vfs.git tree.
Patches in the fs.ntfs branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: fs.ntfs

[1/1] ntfs: remove redundant initialization to pointer cb_sb_start
      https://git.kernel.org/vfs/vfs/c/04faa6cfd449

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-19  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-18 15:36 [PATCH] ntfs: remove redundant initialization to pointer cb_sb_start Colin Ian King
2023-05-06  0:57 ` Namjae Jeon
2023-05-19  9:58 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox