mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next][V2] jfs: remove redundant initialization to pointer ip
@ 2023-08-18 15:02 Colin Ian King
  2023-08-29 17:21 ` Dave Kleikamp
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2023-08-18 15:02 UTC (permalink / raw)
  To: Christian Brauner, Dave Kleikamp, jfs-discussion
  Cc: kernel-janitors, linux-kernel

The pointer ip is being initialized with a value that is never read, it
is being re-assigned later on. The assignment is redundant and can be
removed.  Cleans up clang scan warning:

fs/jfs/namei.c:886:16: warning: Value stored to 'ip' during its
initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---

V2: fix commit message "uninitialized" -> "initialized"

---
 fs/jfs/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 029d47065600..57d7a4300210 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -883,7 +883,7 @@ static int jfs_symlink(struct mnt_idmap *idmap, struct inode *dip,
 	struct component_name dname;
 	u32 ssize;		/* source pathname size */
 	struct btstack btstack;
-	struct inode *ip = d_inode(dentry);
+	struct inode *ip;
 	s64 xlen = 0;
 	int bmask = 0, xsize;
 	s64 xaddr;
-- 
2.39.2


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

* Re: [PATCH][next][V2] jfs: remove redundant initialization to pointer ip
  2023-08-18 15:02 [PATCH][next][V2] jfs: remove redundant initialization to pointer ip Colin Ian King
@ 2023-08-29 17:21 ` Dave Kleikamp
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Kleikamp @ 2023-08-29 17:21 UTC (permalink / raw)
  To: Colin Ian King, Christian Brauner, jfs-discussion
  Cc: kernel-janitors, linux-kernel

On 8/18/23 10:02AM, Colin Ian King wrote:
> The pointer ip is being initialized with a value that is never read, it
> is being re-assigned later on. The assignment is redundant and can be
> removed.  Cleans up clang scan warning:
> 
> fs/jfs/namei.c:886:16: warning: Value stored to 'ip' during its
> initialization is never read [deadcode.DeadStores]

Looks good. Applied.

> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> 
> V2: fix commit message "uninitialized" -> "initialized"
> 
> ---
>   fs/jfs/namei.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
> index 029d47065600..57d7a4300210 100644
> --- a/fs/jfs/namei.c
> +++ b/fs/jfs/namei.c
> @@ -883,7 +883,7 @@ static int jfs_symlink(struct mnt_idmap *idmap, struct inode *dip,
>   	struct component_name dname;
>   	u32 ssize;		/* source pathname size */
>   	struct btstack btstack;
> -	struct inode *ip = d_inode(dentry);
> +	struct inode *ip;
>   	s64 xlen = 0;
>   	int bmask = 0, xsize;
>   	s64 xaddr;

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

end of thread, other threads:[~2023-08-29 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-18 15:02 [PATCH][next][V2] jfs: remove redundant initialization to pointer ip Colin Ian King
2023-08-29 17:21 ` Dave Kleikamp

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®