kernel: trace: Remove deadstore in trace_uprobe.c
A message that is not in the archive (sent off-list or not yet received): [email protected], [email protected], [email protected], [email protected]
PATCH 1/1 kernel: trace: Remove deadstore in trace_uprobe.c
In trace_uprobe.c, trace_uprobe_create assigns ret to 0 but then never uses this value.
--- kernel/trace/trace_uprobe.c | 1 - 1 file changed, 1 deletion(-)
kernel/trace/trace_uprobe.c +0 -1
@@ -541,7 +541,6 @@ static int trace_uprobe_create(int argc, const char **argv)bool is_return = false;int i, ret; - ret =0 ; ref_ctr_offset =0 ;switch (argv[0 ][0 ]) {
Signature · 11 lines
2.7.4 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#217): https://lists.elisa.tech/g/linux-safety/message/217 Mute This Topic: https://lists.elisa.tech/mt/78828451/5278000 Group Owner: [email protected] Unsubscribe: https://lists.elisa.tech/g/linux-safety/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
Quoted 4 lines · Milan Lakhani
In
trace_uprobe.c,trace_uprobe_createassigns ret to 0 but then never uses this value.
Milan, the patch makes sense, but I fear you did not run ./scripts/get_maintainers.pl because you did not include any specific maintainer as recipient.
The patch subject could be: remove unneeded initialization (instead of the very generic "dead store" term).
It is also interesting to see who added this initialization; was it unneeded since the existence of this function, did it become obsolete at some point in time due to refactoring?
Run ./scripts/get_maintainers.pl and please CC: me; then you will get your Reviewed-by: tag.
Lukas
Quoted 18 lines
Signed-off-by Milan Lakhani <[email protected]>--- kernel/trace/trace_uprobe.c | 1 - 1 file changed, 1 deletion(-)kernel/trace/trace_uprobe.c +0
-2@@ -541,7 +541,6 @@ static int trace_uprobe_create(int argc, const char **argv)bool is_return = false;int i, ret; - ret =0 ; ref_ctr_offset =0 ;switch (argv[0 ][0 ]) { --
Quoted 2 lines
2.7.4
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#218): https://lists.elisa.tech/g/linux-safety/message/218
Mute This Topic: https://lists.elisa.tech/mt/78828451/5278000
Group Owner: [email protected]
Unsubscribe: https://lists.elisa.tech/g/linux-safety/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 8 lines · Lukas Bulwahn
Quoted 3 lines · Milan Lakhani
In
trace_uprobe.c,trace_uprobe_createassigns ret to 0 but then never uses this value.Milan, the patch makes sense, but I fear you did not run
./scripts/get_maintainers.plbecause you did not include any specific maintainer as recipient.
So I did actually run get_maintainers.pl but somehow in my text editor where I had pasted the e-mail addresses they had got onto two separate lines, and git send-email must have only taken the first line. I'll have to get the e-mails right first time next time, to move onto checking documentation!
Quoted 2 lines
The patch subject could be: remove unneeded initialization (instead of the very generic "dead store" term).
Updated this, thanks
Quoted 4 lines
It is also interesting to see who added this initialization; was it unneeded since the existence of this function, did it become obsolete at some point in time due to refactoring?
The line was unneeded since the function was created in 2012 by Srikar Dronamraju in f3f096cfe, there have actually somehow been six commits to the lines between the initial assignment and reassignment of ret but they have all left the unnecessary initialization there!
Quoted 19 lines
Run
./scripts/get_maintainers.pland please CC: me; then you will get your Reviewed-by: tag.Lukas
Quoted 13 lines
Signed-off-by Milan Lakhani <[email protected]>--- kernel/trace/trace_uprobe.c | 1 - 1 file changed, 1 deletion(-)kernel/trace/trace_uprobe.c +0
-0@@ -541,7 +541,6 @@ static int trace_uprobe_create(int argc, const char **argv)bool is_return = false;int i, ret;
Quoted 7 lines
Quoted 7 lines
kernel/trace/trace_uprobe.c +0
-2- ret =0 ; ref_ctr_offset =0 ;switch (argv[0 ][0 ]) { --2.7.4
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#220): https://lists.elisa.tech/g/linux-safety/message/220
Mute This Topic: https://lists.elisa.tech/mt/78828451/5278000
Group Owner: [email protected]
Unsubscribe: https://lists.elisa.tech/g/linux-safety/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-