linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: efi: fixed typo in efi_procfs()
@ 2023-10-06  9:04 Maxim Korotkov
  2023-10-15 20:57 ` Alexandre Belloni
  2023-10-15 21:03 ` Alexandre Belloni
  0 siblings, 2 replies; 3+ messages in thread
From: Maxim Korotkov @ 2023-10-06  9:04 UTC (permalink / raw)
  To: Alessandro Zummo
  Cc: Maxim Korotkov, Alexandre Belloni, Shanker Donthineni, linux-rtc,
	linux-kernel, lvc-project

After the first check of the value of the "eft" variable
it does not change, it is obvious that a copy-paste
error was made here and the value of variable "alm"
should be checked here.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 101ca8d05913 ("rtc: efi: Enable SET/GET WAKEUP services as optional")
Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
---
 drivers/rtc/rtc-efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index dc6b0f4a54e2..fa8bf82df948 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -227,7 +227,7 @@ static int efi_procfs(struct device *dev, struct seq_file *seq)
 			   enabled == 1 ? "yes" : "no",
 			   pending == 1 ? "yes" : "no");
 
-		if (eft.timezone == EFI_UNSPECIFIED_TIMEZONE)
+		if (alm.timezone == EFI_UNSPECIFIED_TIMEZONE)
 			seq_puts(seq, "Timezone\t: unspecified\n");
 		else
 			/* XXX fixme: convert to string? */
-- 
2.34.1


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

* Re: [PATCH] rtc: efi: fixed typo in efi_procfs()
  2023-10-06  9:04 [PATCH] rtc: efi: fixed typo in efi_procfs() Maxim Korotkov
@ 2023-10-15 20:57 ` Alexandre Belloni
  2023-10-15 21:03 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2023-10-15 20:57 UTC (permalink / raw)
  To: Maxim Korotkov
  Cc: Alessandro Zummo, Shanker Donthineni, linux-rtc, linux-kernel,
	lvc-project

On 06/10/2023 12:04:44+0300, Maxim Korotkov wrote:
> After the first check of the value of the "eft" variable
> it does not change, it is obvious that a copy-paste
> error was made here and the value of variable "alm"
> should be checked here.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 101ca8d05913 ("rtc: efi: Enable SET/GET WAKEUP services as optional")
I had a look at the history and this is actually a bug that predates
v2.6.12-rc2 and so its introduction is not in the main git repo history.

I guess nobody actually cares and I'm very tempted to just rip out this
procfs file.


> Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
> ---
>  drivers/rtc/rtc-efi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
> index dc6b0f4a54e2..fa8bf82df948 100644
> --- a/drivers/rtc/rtc-efi.c
> +++ b/drivers/rtc/rtc-efi.c
> @@ -227,7 +227,7 @@ static int efi_procfs(struct device *dev, struct seq_file *seq)
>  			   enabled == 1 ? "yes" : "no",
>  			   pending == 1 ? "yes" : "no");
>  
> -		if (eft.timezone == EFI_UNSPECIFIED_TIMEZONE)
> +		if (alm.timezone == EFI_UNSPECIFIED_TIMEZONE)
>  			seq_puts(seq, "Timezone\t: unspecified\n");
>  		else
>  			/* XXX fixme: convert to string? */
> -- 
> 2.34.1
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH] rtc: efi: fixed typo in efi_procfs()
  2023-10-06  9:04 [PATCH] rtc: efi: fixed typo in efi_procfs() Maxim Korotkov
  2023-10-15 20:57 ` Alexandre Belloni
@ 2023-10-15 21:03 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2023-10-15 21:03 UTC (permalink / raw)
  To: Alessandro Zummo, Maxim Korotkov
  Cc: Shanker Donthineni, linux-rtc, linux-kernel, lvc-project


On Fri, 06 Oct 2023 12:04:44 +0300, Maxim Korotkov wrote:
> After the first check of the value of the "eft" variable
> it does not change, it is obvious that a copy-paste
> error was made here and the value of variable "alm"
> should be checked here.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> [...]

I changed the fixes tag to:
Fixes: 501385f2a783 ("rtc: efi: add efi_procfs in efi_rtc_ops")

Applied, thanks!

[1/1] rtc: efi: fixed typo in efi_procfs()
      commit: f5f4c982f7c8a8cffb2663078a40ecd7d82b534d

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2023-10-15 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-06  9:04 [PATCH] rtc: efi: fixed typo in efi_procfs() Maxim Korotkov
2023-10-15 20:57 ` Alexandre Belloni
2023-10-15 21:03 ` Alexandre Belloni

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).