All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] ACPI: APEI: Remove the unneeded result variable
@ 2022-08-31  3:31 cgel.zte
  2022-09-10 15:51 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-31  3:31 UTC (permalink / raw)
  To: rafael
  Cc: keescook, anton, ccross, tony.luck, lenb, james.morse, bp,
	linux-acpi, linux-kernel, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value erst_get_record_id_begin() directly instead of storing it
 in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/acpi/apei/erst.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index 31b077eedb58..247989060e29 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -1020,14 +1020,10 @@ static int reader_pos;
 
 static int erst_open_pstore(struct pstore_info *psi)
 {
-	int rc;
-
 	if (erst_disable)
 		return -ENODEV;
 
-	rc = erst_get_record_id_begin(&reader_pos);
-
-	return rc;
+	return erst_get_record_id_begin(&reader_pos);
 }
 
 static int erst_close_pstore(struct pstore_info *psi)
-- 
2.25.1

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

* Re: [PATCH linux-next] ACPI: APEI: Remove the unneeded result variable
  2022-08-31  3:31 [PATCH linux-next] ACPI: APEI: Remove the unneeded result variable cgel.zte
@ 2022-09-10 15:51 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-09-10 15:51 UTC (permalink / raw)
  To: cgel.zte
  Cc: Rafael J. Wysocki, Kees Cook, Anton Vorontsov, Colin Cross,
	Tony Luck, Len Brown, James Morse, Borislav Petkov,
	ACPI Devel Maling List, Linux Kernel Mailing List, ye xingchen,
	Zeal Robot

On Wed, Aug 31, 2022 at 5:31 AM <cgel.zte@gmail.com> wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value erst_get_record_id_begin() directly instead of storing it
>  in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
>  drivers/acpi/apei/erst.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
> index 31b077eedb58..247989060e29 100644
> --- a/drivers/acpi/apei/erst.c
> +++ b/drivers/acpi/apei/erst.c
> @@ -1020,14 +1020,10 @@ static int reader_pos;
>
>  static int erst_open_pstore(struct pstore_info *psi)
>  {
> -       int rc;
> -
>         if (erst_disable)
>                 return -ENODEV;
>
> -       rc = erst_get_record_id_begin(&reader_pos);
> -
> -       return rc;
> +       return erst_get_record_id_begin(&reader_pos);
>  }
>
>  static int erst_close_pstore(struct pstore_info *psi)
> --

Can you please combine this patch with the other analogous one you
sent for APEI?

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

end of thread, other threads:[~2022-09-10 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31  3:31 [PATCH linux-next] ACPI: APEI: Remove the unneeded result variable cgel.zte
2022-09-10 15:51 ` Rafael J. Wysocki

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.