All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] acpi: apei: remove the unused dead-code for SEA notification type
@ 2017-09-13 11:02 ` Dongjiu Geng
  0 siblings, 0 replies; 3+ messages in thread
From: Dongjiu Geng @ 2017-09-13 11:02 UTC (permalink / raw)
  To: rjw, lenb, tbaicar, will.deacon, james.morse, bp, punit.agrawal,
	zjzhang, andriy.shevchenko, shiju.jose, linux-acpi, linux-kernel,
	geliangtang, gengdongjiu

In current code logic, the two functions ghes_sea_add() and
ghes_sea_remove() are only called when CONFIG_ACPI_APEI_SEA
is defined. If not, it will return errors in the ghes_probe()
and not continue. If the probe is failed, the ghes_sea_remove()
also has no chance to be called.

Hence, remove the unnecessary handling when CONFIG_ACPI_APEI_SEA
is not defined.

Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>

---
It is ever discussed here:
https://lkml.org/lkml/2017/9/8/623
---
 drivers/acpi/apei/ghes.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index d661d452b238..c15a08db2c7c 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -813,7 +813,6 @@ static struct notifier_block ghes_notifier_hed = {
 	.notifier_call = ghes_notify_hed,
 };
 
-#ifdef CONFIG_ACPI_APEI_SEA
 static LIST_HEAD(ghes_sea);
 
 /*
@@ -848,19 +847,6 @@ static void ghes_sea_remove(struct ghes *ghes)
 	mutex_unlock(&ghes_list_mutex);
 	synchronize_rcu();
 }
-#else /* CONFIG_ACPI_APEI_SEA */
-static inline void ghes_sea_add(struct ghes *ghes)
-{
-	pr_err(GHES_PFX "ID: %d, trying to add SEA notification which is not supported\n",
-	       ghes->generic->header.source_id);
-}
-
-static inline void ghes_sea_remove(struct ghes *ghes)
-{
-	pr_err(GHES_PFX "ID: %d, trying to remove SEA notification which is not supported\n",
-	       ghes->generic->header.source_id);
-}
-#endif /* CONFIG_ACPI_APEI_SEA */
 
 #ifdef CONFIG_HAVE_ACPI_APEI_NMI
 /*
-- 
2.14.1


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

* [PATCH v2] acpi: apei: remove the unused dead-code for SEA notification type
@ 2017-09-13 11:02 ` Dongjiu Geng
  0 siblings, 0 replies; 3+ messages in thread
From: Dongjiu Geng @ 2017-09-13 11:02 UTC (permalink / raw)
  To: rjw, lenb, tbaicar, will.deacon, james.morse, bp, punit.agrawal,
	zjzhang, andriy.shevchenko, shiju.jose, linux-acpi, linux-kernel,
	geliangtang, gengdongjiu

In current code logic, the two functions ghes_sea_add() and
ghes_sea_remove() are only called when CONFIG_ACPI_APEI_SEA
is defined. If not, it will return errors in the ghes_probe()
and not continue. If the probe is failed, the ghes_sea_remove()
also has no chance to be called.

Hence, remove the unnecessary handling when CONFIG_ACPI_APEI_SEA
is not defined.

Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>

---
It is ever discussed here:
https://lkml.org/lkml/2017/9/8/623
---
 drivers/acpi/apei/ghes.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index d661d452b238..c15a08db2c7c 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -813,7 +813,6 @@ static struct notifier_block ghes_notifier_hed = {
 	.notifier_call = ghes_notify_hed,
 };
 
-#ifdef CONFIG_ACPI_APEI_SEA
 static LIST_HEAD(ghes_sea);
 
 /*
@@ -848,19 +847,6 @@ static void ghes_sea_remove(struct ghes *ghes)
 	mutex_unlock(&ghes_list_mutex);
 	synchronize_rcu();
 }
-#else /* CONFIG_ACPI_APEI_SEA */
-static inline void ghes_sea_add(struct ghes *ghes)
-{
-	pr_err(GHES_PFX "ID: %d, trying to add SEA notification which is not supported\n",
-	       ghes->generic->header.source_id);
-}
-
-static inline void ghes_sea_remove(struct ghes *ghes)
-{
-	pr_err(GHES_PFX "ID: %d, trying to remove SEA notification which is not supported\n",
-	       ghes->generic->header.source_id);
-}
-#endif /* CONFIG_ACPI_APEI_SEA */
 
 #ifdef CONFIG_HAVE_ACPI_APEI_NMI
 /*
-- 
2.14.1

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

* Re: [PATCH v2] acpi: apei: remove the unused dead-code for SEA notification type
  2017-09-13 11:02 ` Dongjiu Geng
  (?)
@ 2017-09-21 19:55 ` gengdongjiu
  -1 siblings, 0 replies; 3+ messages in thread
From: gengdongjiu @ 2017-09-21 19:55 UTC (permalink / raw)
  To: Dongjiu Geng
  Cc: rjw, Tyler Baicar, Borislav Petkov, Punit Agrawal, Shiju Jose,
	linux-acpi, zhengqiang10

HI Borislav, Tyler, Rafael,
    sorry to disturb you. whether it is possible you can give a review
for this patch and below patch, seems it is pending long time. thank
you very much in advance for your time.

   https://patchwork.kernel.org/patch/9952493/

2017-09-13 19:02 GMT+08:00 Dongjiu Geng <gengdongjiu@huawei.com>:
> In current code logic, the two functions ghes_sea_add() and
> ghes_sea_remove() are only called when CONFIG_ACPI_APEI_SEA
> is defined. If not, it will return errors in the ghes_probe()
> and not continue. If the probe is failed, the ghes_sea_remove()
> also has no chance to be called.
>
> Hence, remove the unnecessary handling when CONFIG_ACPI_APEI_SEA
> is not defined.
>
> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
>
> ---
> It is ever discussed here:
> https://lkml.org/lkml/2017/9/8/623
> ---
>  drivers/acpi/apei/ghes.c | 14 --------------
>  1 file changed, 14 deletions(-)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index d661d452b238..c15a08db2c7c 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -813,7 +813,6 @@ static struct notifier_block ghes_notifier_hed = {
>         .notifier_call = ghes_notify_hed,
>  };
>
> -#ifdef CONFIG_ACPI_APEI_SEA
>  static LIST_HEAD(ghes_sea);
>
>  /*
> @@ -848,19 +847,6 @@ static void ghes_sea_remove(struct ghes *ghes)
>         mutex_unlock(&ghes_list_mutex);
>         synchronize_rcu();
>  }
> -#else /* CONFIG_ACPI_APEI_SEA */
> -static inline void ghes_sea_add(struct ghes *ghes)
> -{
> -       pr_err(GHES_PFX "ID: %d, trying to add SEA notification which is not supported\n",
> -              ghes->generic->header.source_id);
> -}
> -
> -static inline void ghes_sea_remove(struct ghes *ghes)
> -{
> -       pr_err(GHES_PFX "ID: %d, trying to remove SEA notification which is not supported\n",
> -              ghes->generic->header.source_id);
> -}
> -#endif /* CONFIG_ACPI_APEI_SEA */
>
>  #ifdef CONFIG_HAVE_ACPI_APEI_NMI
>  /*
> --
> 2.14.1
>

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

end of thread, other threads:[~2017-09-21 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-13 11:02 [PATCH v2] acpi: apei: remove the unused dead-code for SEA notification type Dongjiu Geng
2017-09-13 11:02 ` Dongjiu Geng
2017-09-21 19:55 ` gengdongjiu

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.