fs/ntfs: remove redundant assignment to pointer m

Message ID 20221017213303.862794-1-colin.i.king@gmail.com
State New
Headers
Series fs/ntfs: remove redundant assignment to pointer m |

Commit Message

Colin Ian King Oct. 17, 2022, 9:33 p.m. UTC
  The pointer m is being assigned a value that is never read, it
is being re-assigned to a NULL later on. The assignment is
redundant and can be removed.

Cleans up clang scan build warning:
fs/ntfs/file.c:194:3: warning: Value stored to 'm' is never
read [deadcode.DeadStores]

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

Comments

Namjae Jeon May 10, 2023, 1:42 a.m. UTC | #1
2022-10-18 6:33 GMT+09:00, Colin Ian King <colin.i.king@gmail.com>:
> The pointer m is being assigned a value that is never read, it
> is being re-assigned to a NULL later on. The assignment is
> redundant and can be removed.
>
> Cleans up clang scan build warning:
> fs/ntfs/file.c:194:3: warning: Value stored to 'm' is never
> read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
  

Patch

diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index c481b14e4fd9..56d08374739a 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -191,7 +191,6 @@  static int ntfs_attr_extend_initialized(ntfs_inode *ni, const s64 new_init_size)
 				err = -EIO;
 			goto err_out;
 		}
-		m = ctx->mrec;
 		a = ctx->attr;
 		BUG_ON(!a->non_resident);
 		BUG_ON(old_i_size != (loff_t)