[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52685dd2-593f-d39b-0f57-e6cf31bb4f2e@microchip.com>
Date: Wed, 9 Mar 2022 07:55:01 +0000
From: <Codrin.Ciubotariu@...rochip.com>
To: <alviro.iskandar@...weeb.org>, <broonie@...nel.org>
CC: <alviro.iskandar@...il.com>, <richiisei@...il.com>,
<llvm@...ts.linux.dev>, <kbuild-all@...ts.01.org>,
<gwml@...r.gnuweeb.org>, <linux-kernel@...r.kernel.org>,
<lkp@...el.com>
Subject: Re: [PATCH] ASoC: atmel: mchp-pdmc: Fix `-Wpointer-bool-conversion`
warning
On 09.03.2022 08:58, Alviro Iskandar Setiawan wrote:
> In function mchp_pdmc_af_put(), Intel's kernel test robot reports the
> following warning:
>
> sound/soc/atmel/mchp-pdmc.c:186:34: warning: address of array \
> 'uvalue->value.integer.value' will always evaluate to 'true' \
> [-Wpointer-bool-conversion]
>
> This is because we are using `uvalue->value.integer.value` which its
> type is `long value[128];` for conditional expression and that array
> will always decay to a non-NULL pointer. Using a non-NULL pointer for
> conditional expression will always evaluate to true.
>
> Fix this by changing it to `uvalue->value.integer.value[0]` as that's
> what the mchp_pdmc_af_get() function sets.
>
> To: Mark Brown <broonie@...nel.org>
> Cc: Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>
> Cc: Nugraha <richiisei@...il.com>
> Cc: llvm@...ts.linux.dev
> Cc: kbuild-all@...ts.01.org
> Cc: gwml@...r.gnuweeb.org
> Cc: linux-kernel@...r.kernel.org
> Reported-by: kernel test robot <lkp@...el.com>
> Link: https://lore.kernel.org/lkml/202203091430.MLY27Bif-lkp@intel.com
> Fixes: 50291652af5269813baa6024eb0e81b5f0bbb451 ("ASoC: atmel: mchp-pdmc: add PDMC driver")
> Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>
Thank you!
Powered by blists - more mailing lists