linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: APEI: remove redundant assignment to variable rc
@ 2021-04-15 14:37 Colin King
  2021-04-21 16:52 ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Colin King @ 2021-04-15 14:37 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown, James Morse, Tony Luck,
	Borislav Petkov, linux-acpi
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable rc is being assigned a value that is never read,
the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/acpi/apei/einj.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index 133156759551..328e8aeece6c 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -725,7 +725,6 @@ static int __init einj_init(void)
 		goto err_release;
 	}
 
-	rc = -ENOMEM;
 	einj_param = einj_get_parameter_address();
 	if ((param_extension || acpi5) && einj_param) {
 		debugfs_create_x32("flags", S_IRUSR | S_IWUSR, einj_debug_dir,
-- 
2.30.2


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

* Re: [PATCH] ACPI: APEI: remove redundant assignment to variable rc
  2021-04-15 14:37 [PATCH] ACPI: APEI: remove redundant assignment to variable rc Colin King
@ 2021-04-21 16:52 ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2021-04-21 16:52 UTC (permalink / raw)
  To: Colin King
  Cc: Rafael J . Wysocki, Len Brown, James Morse, Tony Luck,
	Borislav Petkov, ACPI Devel Maling List, kernel-janitors,
	Linux Kernel Mailing List

On Thu, Apr 15, 2021 at 4:38 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable rc is being assigned a value that is never read,
> the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/acpi/apei/einj.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
> index 133156759551..328e8aeece6c 100644
> --- a/drivers/acpi/apei/einj.c
> +++ b/drivers/acpi/apei/einj.c
> @@ -725,7 +725,6 @@ static int __init einj_init(void)
>                 goto err_release;
>         }
>
> -       rc = -ENOMEM;
>         einj_param = einj_get_parameter_address();
>         if ((param_extension || acpi5) && einj_param) {
>                 debugfs_create_x32("flags", S_IRUSR | S_IWUSR, einj_debug_dir,
> --

Applied as 5.13 material, thanks!

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

* Re: [PATCH] ACPI: APEI: remove redundant assignment to variable rc
  2020-07-22 17:06 Colin King
@ 2020-07-27 13:24 ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2020-07-27 13:24 UTC (permalink / raw)
  To: Colin King
  Cc: Rafael J . Wysocki, Len Brown, James Morse, Tony Luck,
	Borislav Petkov, ACPI Devel Maling List, kernel-janitors,
	Linux Kernel Mailing List

On Wed, Jul 22, 2020 at 7:06 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable rc is being initialized with a value that is
> never read and it is being updated later with a new value. The
> initialization is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/acpi/apei/hest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
> index 953a2fae8b15..6e980fe16772 100644
> --- a/drivers/acpi/apei/hest.c
> +++ b/drivers/acpi/apei/hest.c
> @@ -227,7 +227,7 @@ __setup("hest_disable", setup_hest_disable);
>  void __init acpi_hest_init(void)
>  {
>         acpi_status status;
> -       int rc = -ENODEV;
> +       int rc;
>         unsigned int ghes_count = 0;
>
>         if (hest_disable) {
> --

Applied as 5.9 material, thanks!

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

* [PATCH] ACPI: APEI: remove redundant assignment to variable rc
@ 2020-07-22 17:06 Colin King
  2020-07-27 13:24 ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Colin King @ 2020-07-22 17:06 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown, James Morse, Tony Luck,
	Borislav Petkov, linux-acpi
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable rc is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/acpi/apei/hest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 953a2fae8b15..6e980fe16772 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -227,7 +227,7 @@ __setup("hest_disable", setup_hest_disable);
 void __init acpi_hest_init(void)
 {
 	acpi_status status;
-	int rc = -ENODEV;
+	int rc;
 	unsigned int ghes_count = 0;
 
 	if (hest_disable) {
-- 
2.27.0


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

end of thread, other threads:[~2021-04-21 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 14:37 [PATCH] ACPI: APEI: remove redundant assignment to variable rc Colin King
2021-04-21 16:52 ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2020-07-22 17:06 Colin King
2020-07-27 13:24 ` 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).