pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
Subsystems (5)
PATCH 1/1 pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
Clang warns when CONFIG_ACPI is unset:
drivers/pinctrl/qcom/pinctrl-sdm845.c:1320:5: warning: 'CONFIG_ACPI' is not defined, evaluates to 0 [-Wundef]
#if CONFIG_ACPI
^1 warning generated.
Use ifdef instead of if to resolve this.
--- drivers/pinctrl/qcom/pinctrl-sdm845.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-sdm845.c +1 -1
@@ -1317,7 +1317,7 @@ static int sdm845_pinctrl_probe(struct platform_device *pdev)return ret; } -#if CONFIG_ACPI +#ifdef CONFIG_ACPI static const struct acpi_device_id sdm845_pinctrl_acpi_match[] = { {"QCOM0217" }, { },
Signature · 1 line
2.22.0
Quoted 1 line · Nathan Chancellor
Clang warns when
CONFIG_ACPIis unset:
Any of these others need the same s/#if/#ifdef/ ?
$ git grep -P '^\s*#\s*if\s+CONFIG_[A-Z0-9_]+\s*$' * arch/microblaze/include/asm/exceptions.h:#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR arch/microblaze/include/asm/hash.h:#if CONFIG_XILINX_MICROBLAZE0_USE_BARREL arch/microblaze/include/asm/irqflags.h:#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR arch/microblaze/kernel/entry-nommu.S:#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR arch/microblaze/kernel/entry.S:#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR arch/microblaze/kernel/entry.S:#if CONFIG_MANUAL_RESET_VECTOR arch/microblaze/kernel/setup.c:#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR arch/powerpc/platforms/powernv/pci.c:#if CONFIG_EEH arch/x86/boot/compressed/misc.c:#if CONFIG_X86_NEED_RELOCS arch/x86/boot/compressed/misc.h:#if CONFIG_RANDOMIZE_BASE drivers/pinctrl/qcom/pinctrl-sdm845.c:#if CONFIG_ACPI kernel/futex.c:#if CONFIG_BASE_SMALL
Quoted 7 lines · Nathan Chancellor
Clang warns when
CONFIG_ACPIis unset:
drivers/pinctrl/qcom/pinctrl-sdm845.c:1320:5: warning: 'CONFIG_ACPI' is not defined, evaluates to 0 [-Wundef]#if CONFIG_ACPI ^
Quoted 7 lines
1 warning generated.
Use ifdef instead of if to resolve this.
Fixes a229105d7a1e ("pinctrl: qcom: sdm845: Provide ACPI support")Signed-off-by Nathan Chancellor <[email protected]>
Thanks for the patch.
Quoted 9 lines
--- drivers/pinctrl/qcom/pinctrl-sdm845.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/qcom/pinctrl-sdm845.c +0
-0
drivers/pinctrl/qcom/pinctrl-sdm845.c static int sdm845_pinctrl_probe(struct platform_device *pdev) · line 1320
Quoted 5 lines
drivers/pinctrl/qcom/pinctrl-sdm845.c +1
-1@@ -1317,7 +1317,7 @@ static int sdm845_pinctrl_probe(struct platform_device *pdev)return ret; } -#if CONFIG_ACPI +#ifdef CONFIG_ACPI
Thanks,
~Nick Desaulniers
Lee Jones
Acked-byQuoted 11 lines · Nick Desaulniers
Quoted 9 lines · Nathan Chancellor
Clang warns when
CONFIG_ACPIis unset:
drivers/pinctrl/qcom/pinctrl-sdm845.c:1320:5: warning: 'CONFIG_ACPI' is not defined, evaluates to 0 [-Wundef]#if CONFIG_ACPI ^1 warning generated.
Quoted 8 lines
Quoted 5 lines
Use ifdef instead of if to resolve this.
Fixes a229105d7a1e ("pinctrl: qcom: sdm845: Provide ACPI support")Signed-off-by Nathan Chancellor <[email protected]>Thanks for the patch.
Reviewed-by Nick Desaulniers <[email protected]>
Interesting. Thanks for fixing.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 6 lines · Nathan Chancellor
Clang warns when
CONFIG_ACPIis unset:
drivers/pinctrl/qcom/pinctrl-sdm845.c:1320:5: warning: 'CONFIG_ACPI' is not defined, evaluates to 0 [-Wundef]#if CONFIG_ACPI ^
Quoted 7 lines
1 warning generated.
Use ifdef instead of if to resolve this.
Fixes a229105d7a1e ("pinctrl: qcom: sdm845: Provide ACPI support")Signed-off-by Nathan Chancellor <[email protected]>
Patch applied with the ACKs.
I'm sure Bjorn doesn't mind.
Yours,
Linus Walleij