diff mbox series

[v4,06/15] drivers/firmware/sdei: Remove duplicate check in sdei_get_conduit()

Message ID 20200730014531.310465-7-gshan@redhat.com
State New, archived
Headers show
Series Refactor SDEI client driver | expand

Commit Message

Gavin Shan July 30, 2020, 1:45 a.m. UTC
The following two checks are duplicate because @acpi_disabled doesn't
depend on CONFIG_ACPI. So the duplicate check (IS_ENABLED(CONFIG_ACPI))
can be dropped. More details is provided to keep the commit log complete:

   * @acpi_disabled is defined in arch/arm64/kernel/acpi.c when
     CONFIG_ACPI is enabled.
   * @acpi_disabled in defined in include/acpi.h when CONFIG_ACPI
     is disabled.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/firmware/arm_sdei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Morse Sept. 18, 2020, 4:12 p.m. UTC | #1
Hi Gavin,

On 30/07/2020 02:45, Gavin Shan wrote:
> The following two checks are duplicate because @acpi_disabled doesn't
> depend on CONFIG_ACPI. So the duplicate check (IS_ENABLED(CONFIG_ACPI))
> can be dropped. More details is provided to keep the commit log complete:
> 
>    * @acpi_disabled is defined in arch/arm64/kernel/acpi.c when
>      CONFIG_ACPI is enabled.
>    * @acpi_disabled in defined in include/acpi.h when CONFIG_ACPI
>      is disabled.

Acked-by: James Morse <james.morse@arm.com>


Thanks,

James
diff mbox series

Patch

diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
index 909f27abf8a7..240c06ae7bfe 100644
--- a/drivers/firmware/arm_sdei.c
+++ b/drivers/firmware/arm_sdei.c
@@ -958,7 +958,7 @@  static int sdei_get_conduit(struct platform_device *pdev)
 		}
 
 		pr_warn("invalid \"method\" property: %s\n", method);
-	} else if (IS_ENABLED(CONFIG_ACPI) && !acpi_disabled) {
+	} else if (!acpi_disabled) {
 		if (acpi_psci_use_hvc()) {
 			sdei_firmware_call = &sdei_smccc_hvc;
 			return SMCCC_CONDUIT_HVC;