linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
@ 2019-06-21 20:20 Nathan Chancellor
  2019-06-21 20:39 ` Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nathan Chancellor @ 2019-06-21 20:20 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: linux-arm-msm, linux-gpio, linux-kernel, clang-built-linux,
	Lee Jones, Nathan Chancellor

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.

Fixes: a229105d7a1e ("pinctrl: qcom: sdm845: Provide ACPI support")
Link: https://github.com/ClangBuiltLinux/linux/issues/569
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/pinctrl/qcom/pinctrl-sdm845.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c
index 06790e5ece6c..39f498c09906 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdm845.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c
@@ -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"},
 	{ },
-- 
2.22.0


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

* Re: [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
  2019-06-21 20:20 [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard Nathan Chancellor
@ 2019-06-21 20:39 ` Joe Perches
  2019-06-21 20:41 ` Nick Desaulniers
  2019-06-25 14:07 ` Linus Walleij
  2 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2019-06-21 20:39 UTC (permalink / raw)
  To: Nathan Chancellor, Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: linux-arm-msm, linux-gpio, linux-kernel, clang-built-linux,
	Lee Jones, Michal Simek, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	H. Peter Anvin, x86, Peter Zijlstra, Darren Hart

On Fri, 2019-06-21 at 13:20 -0700, Nathan Chancellor wrote:
> Clang warns when CONFIG_ACPI is 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




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

* Re: [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
  2019-06-21 20:20 [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard Nathan Chancellor
  2019-06-21 20:39 ` Joe Perches
@ 2019-06-21 20:41 ` Nick Desaulniers
  2019-06-24 12:51   ` Lee Jones
  2019-06-25 14:07 ` Linus Walleij
  2 siblings, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2019-06-21 20:41 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Andy Gross, Bjorn Andersson, Linus Walleij, linux-arm-msm,
	linux-gpio, LKML, clang-built-linux, Lee Jones

On Fri, Jun 21, 2019 at 1:21 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> 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.
>
> Fixes: a229105d7a1e ("pinctrl: qcom: sdm845: Provide ACPI support")
> Link: https://github.com/ClangBuiltLinux/linux/issues/569
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Thanks for the patch.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  drivers/pinctrl/qcom/pinctrl-sdm845.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c
> index 06790e5ece6c..39f498c09906 100644
> --- a/drivers/pinctrl/qcom/pinctrl-sdm845.c
> +++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c
> @@ -1317,7 +1317,7 @@ static int sdm845_pinctrl_probe(struct platform_device *pdev)
>         return ret;
>  }
>
> -#if CONFIG_ACPI
> +#ifdef CONFIG_ACPI

Thanks,
~Nick Desaulniers

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

* Re: [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
  2019-06-21 20:41 ` Nick Desaulniers
@ 2019-06-24 12:51   ` Lee Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2019-06-24 12:51 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Nathan Chancellor, Andy Gross, Bjorn Andersson, Linus Walleij,
	linux-arm-msm, linux-gpio, LKML, clang-built-linux

On Fri, 21 Jun 2019, Nick Desaulniers wrote:

> On Fri, Jun 21, 2019 at 1:21 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > 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.
> >
> > Fixes: a229105d7a1e ("pinctrl: qcom: sdm845: Provide ACPI support")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/569
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> 
> Thanks for the patch.
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Interesting.  Thanks for fixing.

Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard
  2019-06-21 20:20 [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard Nathan Chancellor
  2019-06-21 20:39 ` Joe Perches
  2019-06-21 20:41 ` Nick Desaulniers
@ 2019-06-25 14:07 ` Linus Walleij
  2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2019-06-25 14:07 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Andy Gross, Bjorn Andersson, MSM, open list:GPIO SUBSYSTEM,
	linux-kernel, clang-built-linux, Lee Jones

On Fri, Jun 21, 2019 at 10:21 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:

> 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.
>
> Fixes: a229105d7a1e ("pinctrl: qcom: sdm845: Provide ACPI support")
> Link: https://github.com/ClangBuiltLinux/linux/issues/569
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Patch applied with the ACKs.
I'm sure Bjorn doesn't mind.

Yours,
Linus Walleij

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

end of thread, other threads:[~2019-06-25 14:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-21 20:20 [PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard Nathan Chancellor
2019-06-21 20:39 ` Joe Perches
2019-06-21 20:41 ` Nick Desaulniers
2019-06-24 12:51   ` Lee Jones
2019-06-25 14:07 ` Linus Walleij

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