All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] loop: remove redundant initialization of pointer node
@ 2022-01-13  0:14 Colin Ian King
  2022-01-13 20:00 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-01-13  0:14 UTC (permalink / raw)
  To: Jens Axboe, linux-block, linux-kernel; +Cc: kernel-janitors, llvm

The pointer node is being initialized with a value that is never
read, it is being re-assigned the same value a little futher on.
Remove the redundant initialization. Cleans up clang scan warning:

drivers/block/loop.c:823:19: warning: Value stored to 'node' during
its initialization is never read [deadcode.DeadStores]

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

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index b1b05c45c07c..01cbbfc4e9e2 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -820,7 +820,7 @@ static inline int queue_on_root_worker(struct cgroup_subsys_state *css)
 
 static void loop_queue_work(struct loop_device *lo, struct loop_cmd *cmd)
 {
-	struct rb_node **node = &(lo->worker_tree.rb_node), *parent = NULL;
+	struct rb_node **node, *parent = NULL;
 	struct loop_worker *cur_worker, *worker = NULL;
 	struct work_struct *work;
 	struct list_head *cmd_list;
-- 
2.33.1


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

* Re: [PATCH] loop: remove redundant initialization of pointer node
  2022-01-13  0:14 [PATCH] loop: remove redundant initialization of pointer node Colin Ian King
@ 2022-01-13 20:00 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-01-13 20:00 UTC (permalink / raw)
  To: linux-kernel, Colin Ian King, linux-block; +Cc: kernel-janitors, llvm

On Thu, 13 Jan 2022 00:14:32 +0000, Colin Ian King wrote:
> The pointer node is being initialized with a value that is never
> read, it is being re-assigned the same value a little futher on.
> Remove the redundant initialization. Cleans up clang scan warning:
> 
> drivers/block/loop.c:823:19: warning: Value stored to 'node' during
> its initialization is never read [deadcode.DeadStores]
> 
> [...]

Applied, thanks!

[1/1] loop: remove redundant initialization of pointer node
      commit: 413ec8057bc3d368574abd05dd27e747063b2f59

Best regards,
-- 
Jens Axboe



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

end of thread, other threads:[~2022-01-13 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13  0:14 [PATCH] loop: remove redundant initialization of pointer node Colin Ian King
2022-01-13 20:00 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.