* [PATCH] tools: Delete the initialization value
@ 2022-08-25 9:03 shijm
2022-08-25 11:22 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: shijm @ 2022-08-25 9:03 UTC (permalink / raw)
To: lenb; +Cc: linux-kernel, devel, linux-acpi, Shi junming
From: Shi junming <junming@nfschina.com>
From the perspective of commpier,delete the initialization value
Signed-off-by: Shi junming <junming@nfschina.com>
---
tools/power/acpi/tools/pfrut/pfrut.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/power/acpi/tools/pfrut/pfrut.c b/tools/power/acpi/tools/pfrut/pfrut.c
index d79c335594b2..52aa0351533c 100644
--- a/tools/power/acpi/tools/pfrut/pfrut.c
+++ b/tools/power/acpi/tools/pfrut/pfrut.c
@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
void *addr_map_capsule;
struct stat st;
char *log_buf;
- int ret = 0;
+ int ret;
if (getuid() != 0) {
printf("Please run the tool as root - Exiting.\n");
--
2.18.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tools: Delete the initialization value
2022-08-25 9:03 [PATCH] tools: Delete the initialization value shijm
@ 2022-08-25 11:22 ` Rafael J. Wysocki
2022-08-29 3:05 ` shijm
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-08-25 11:22 UTC (permalink / raw)
To: shijm
Cc: Len Brown, Linux Kernel Mailing List,
open list:ACPI COMPONENT ARCHITECTURE (ACPICA),
ACPI Devel Maling List
On Thu, Aug 25, 2022 at 11:04 AM shijm <junming@nfschina.com> wrote:
>
> From: Shi junming <junming@nfschina.com>
>
> From the perspective of commpier,delete the initialization value
I'm not sure what this means.
The initialization is unnecessary, because the variable in question is
always assigned a new value before reading it. Is that what you
wanted to say?
> Signed-off-by: Shi junming <junming@nfschina.com>
> ---
> tools/power/acpi/tools/pfrut/pfrut.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/power/acpi/tools/pfrut/pfrut.c b/tools/power/acpi/tools/pfrut/pfrut.c
> index d79c335594b2..52aa0351533c 100644
> --- a/tools/power/acpi/tools/pfrut/pfrut.c
> +++ b/tools/power/acpi/tools/pfrut/pfrut.c
> @@ -190,7 +190,7 @@ int main(int argc, char *argv[])
> void *addr_map_capsule;
> struct stat st;
> char *log_buf;
> - int ret = 0;
> + int ret;
>
> if (getuid() != 0) {
> printf("Please run the tool as root - Exiting.\n");
> --
> 2.18.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools: Delete the initialization value
2022-08-25 11:22 ` Rafael J. Wysocki
@ 2022-08-29 3:05 ` shijm
2022-09-03 18:37 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: shijm @ 2022-08-29 3:05 UTC (permalink / raw)
To: rafael; +Cc: devel, junming, lenb, linux-acpi, linux-kernel
yes,just your said!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools: Delete the initialization value
2022-08-29 3:05 ` shijm
@ 2022-09-03 18:37 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-09-03 18:37 UTC (permalink / raw)
To: shijm
Cc: Rafael J. Wysocki, open list:ACPI COMPONENT ARCHITECTURE (ACPICA),
Len Brown, ACPI Devel Maling List, Linux Kernel Mailing List
On Mon, Aug 29, 2022 at 5:06 AM shijm <junming@nfschina.com> wrote:
>
> yes,just your said!
OK
I've applied the patch as 6.1 material under a new subject and with a
new changelog.
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-03 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 9:03 [PATCH] tools: Delete the initialization value shijm
2022-08-25 11:22 ` Rafael J. Wysocki
2022-08-29 3:05 ` shijm
2022-09-03 18:37 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).