linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/acpi/apei/erst: remove unneeded rc variable
@ 2022-01-18  7:53 cgel.zte
  2022-01-18  8:56 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-01-18  7:53 UTC (permalink / raw)
  To: keescook
  Cc: anton, ccross, tony.luck, rafael, lenb, james.morse, bp,
	linux-acpi, linux-kernel, Minghao Chi, Zeal Robot, CGEL ZTE

From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from erst_get_record_id_begin() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 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 242f3c2d5533..d9cf07b2a90b 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -952,14 +952,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] drivers/acpi/apei/erst: remove unneeded rc variable
  2022-01-18  7:53 [PATCH] drivers/acpi/apei/erst: remove unneeded rc variable cgel.zte
@ 2022-01-18  8:56 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2022-01-18  8:56 UTC (permalink / raw)
  To: cgel.zte
  Cc: keescook, anton, ccross, tony.luck, rafael, lenb, james.morse,
	linux-acpi, linux-kernel, Minghao Chi, Zeal Robot

On Tue, Jan 18, 2022 at 07:53:49AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Return value from erst_get_record_id_begin() directly instead
> of taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>

"Well, this doesn't look like an e-mail address of a physical person
which is required for S-o-b tags."

https://lore.kernel.org/r/CAJZ5v0iipOm6DX3Fd8iNKF_LC6kJWCy=1LxFsh47z01UYDrRow@mail.gmail.com

Are you people actually reading email feedback or you're automatically
dumping this crap to recipients without even looking?

Because if so, we can automatically send all that crap to /dev/null and
the only thing that's going to be wasted is the energy used to send crap
mails back'n'forth...

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

end of thread, other threads:[~2022-01-18  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-18  7:53 [PATCH] drivers/acpi/apei/erst: remove unneeded rc variable cgel.zte
2022-01-18  8:56 ` Borislav Petkov

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