diff options
author | Lukas Bulwahn <[email protected]> | 2022-03-23 16:07:00 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2022-03-23 19:00:35 -0700 |
commit | 92333baaceb399c7878c7f868a0746d7d22f9b77 (patch) | |
tree | 36d313672ce2988b8237b899dd06b35d4c1ad19b /scripts/gdb/linux/tasks.py | |
parent | e7ce7500375a63348e1d3a703c8d5003cbe3fea6 (diff) |
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.
[[email protected]: reduce scope of `rc']
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Lukas Bulwahn <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions