* + taskstats-remove-unneeded-dead-assignment.patch added to -mm tree
@ 2022-03-07 23:32 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-03-07 23:32 UTC (permalink / raw)
To: mm-commits, trix, ndesaulniers, natechancellor, bsingharora,
lukas.bulwahn, akpm
The patch titled
Subject: taskstats: remove unneeded dead assignment
has been added to the -mm tree. Its filename is
taskstats-remove-unneeded-dead-assignment.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/taskstats-remove-unneeded-dead-assignment.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/taskstats-remove-unneeded-dead-assignment.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: taskstats: remove unneeded dead assignment
make clang-analyzer on x86_64 defconfig caught my attention with:
kernel/taskstats.c:120:2: warning: Value stored to 'rc' is never read \
[clang-analyzer-deadcode.DeadStores]
rc = 0;
^
Commit d94a041519f3 ("taskstats: free skb, avoid returns in
send_cpu_listeners") made send_cpu_listeners() not return a value and
hence, the rc variable remained only to be used within the loop where
it is always assigned before read and it does not need any other
initialisation.
So, simply remove this unneeded dead initializing assignment.
As compilers will detect this unneeded assignment and optimize this anyway,
the resulting object code is identical before and after this change.
No functional change. No change to object code.
Link: https://lkml.kernel.org/r/20220307093942.21310-1-lukas.bulwahn@gmail.com
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Tom Rix <trix@redhat.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/taskstats.c | 1 -
1 file changed, 1 deletion(-)
--- a/kernel/taskstats.c~taskstats-remove-unneeded-dead-assignment
+++ a/kernel/taskstats.c
@@ -117,7 +117,6 @@ static void send_cpu_listeners(struct sk
genlmsg_end(skb, reply);
- rc = 0;
down_read(&listeners->sem);
list_for_each_entry(s, &listeners->list, list) {
skb_next = NULL;
_
Patches currently in -mm which might be from lukas.bulwahn@gmail.com are
taskstats-remove-unneeded-dead-assignment.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-07 23:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 23:32 + taskstats-remove-unneeded-dead-assignment.patch added to -mm tree Andrew Morton
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.