mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] jfs: remove redundant assignments to ipaimap and ipaimap2
@ 2022-10-17 21:56 Colin Ian King
  2022-10-17 22:39 ` Dave Kleikamp
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-17 21:56 UTC (permalink / raw)
  To: Dave Kleikamp; +Cc: kernel-janitors, linux-kernel

The pointers ipaimap and ipaimap2 are initialized with values that are
never read, they are re-assigned later when they are required. The
initializations are redundant and can be removed.

Cleans up two clang scan build warnings:
fs/jfs/jfs_umount.c:42:16: warning: Value stored to 'ipaimap' during
its initialization is never read [deadcode.DeadStores]

fs/jfs/jfs_umount.c:43:16: warning: Value stored to 'ipaimap2' during
its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/jfs/jfs_umount.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/jfs/jfs_umount.c b/fs/jfs/jfs_umount.c
index 3e8b13e6aa01..cc4d7e6e8a4b 100644
--- a/fs/jfs/jfs_umount.c
+++ b/fs/jfs/jfs_umount.c
@@ -39,8 +39,8 @@ int jfs_umount(struct super_block *sb)
 	struct jfs_sb_info *sbi = JFS_SBI(sb);
 	struct inode *ipbmap = sbi->ipbmap;
 	struct inode *ipimap = sbi->ipimap;
-	struct inode *ipaimap = sbi->ipaimap;
-	struct inode *ipaimap2 = sbi->ipaimap2;
+	struct inode *ipaimap;
+	struct inode *ipaimap2;
 	struct jfs_log *log;
 	int rc = 0;
 
-- 
2.37.3


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

* Re: [PATCH] jfs: remove redundant assignments to ipaimap and ipaimap2
  2022-10-17 21:56 [PATCH] jfs: remove redundant assignments to ipaimap and ipaimap2 Colin Ian King
@ 2022-10-17 22:39 ` Dave Kleikamp
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Kleikamp @ 2022-10-17 22:39 UTC (permalink / raw)
  To: Colin Ian King; +Cc: kernel-janitors, linux-kernel

On 10/17/22 4:56PM, Colin Ian King wrote:
> The pointers ipaimap and ipaimap2 are initialized with values that are
> never read, they are re-assigned later when they are required. The
> initializations are redundant and can be removed.

Hmm. Or we can remove the later assignments. That would seem more 
consistent with the ipbmap and ipimap.

> 
> Cleans up two clang scan build warnings:
> fs/jfs/jfs_umount.c:42:16: warning: Value stored to 'ipaimap' during
> its initialization is never read [deadcode.DeadStores]
> 
> fs/jfs/jfs_umount.c:43:16: warning: Value stored to 'ipaimap2' during
> its initialization is never read [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>   fs/jfs/jfs_umount.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/jfs/jfs_umount.c b/fs/jfs/jfs_umount.c
> index 3e8b13e6aa01..cc4d7e6e8a4b 100644
> --- a/fs/jfs/jfs_umount.c
> +++ b/fs/jfs/jfs_umount.c
> @@ -39,8 +39,8 @@ int jfs_umount(struct super_block *sb)
>   	struct jfs_sb_info *sbi = JFS_SBI(sb);
>   	struct inode *ipbmap = sbi->ipbmap;
>   	struct inode *ipimap = sbi->ipimap;
> -	struct inode *ipaimap = sbi->ipaimap;
> -	struct inode *ipaimap2 = sbi->ipaimap2;
> +	struct inode *ipaimap;
> +	struct inode *ipaimap2;
>   	struct jfs_log *log;
>   	int rc = 0;
>   

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

end of thread, other threads:[~2022-10-17 22:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 21:56 [PATCH] jfs: remove redundant assignments to ipaimap and ipaimap2 Colin Ian King
2022-10-17 22:39 ` 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®