All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Codrin.Ciubotariu@microchip.com>
To: <alviro.iskandar@gnuweeb.org>, <broonie@kernel.org>
Cc: <alviro.iskandar@gmail.com>, <richiisei@gmail.com>,
	<llvm@lists.linux.dev>, <kbuild-all@lists.01.org>,
	<gwml@vger.gnuweeb.org>, <linux-kernel@vger.kernel.org>,
	<lkp@intel.com>
Subject: Re: [PATCH] ASoC: atmel: mchp-pdmc: Fix `-Wpointer-bool-conversion` warning
Date: Wed, 9 Mar 2022 07:55:01 +0000	[thread overview]
Message-ID: <52685dd2-593f-d39b-0f57-e6cf31bb4f2e@microchip.com> (raw)
In-Reply-To: <20220309065849.96165-1-alviro.iskandar@gnuweeb.org>

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@kernel.org>
> Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
> Cc: Nugraha <richiisei@gmail.com>
> Cc: llvm@lists.linux.dev
> Cc: kbuild-all@lists.01.org
> Cc: gwml@vger.gnuweeb.org
> Cc: linux-kernel@vger.kernel.org
> Reported-by: kernel test robot <lkp@intel.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@gnuweeb.org>

Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>

Thank you!

WARNING: multiple messages have this Message-ID (diff)
From: Codrin.Ciubotariu@microchip.com
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] ASoC: atmel: mchp-pdmc: Fix `-Wpointer-bool-conversion` warning
Date: Wed, 09 Mar 2022 07:55:01 +0000	[thread overview]
Message-ID: <52685dd2-593f-d39b-0f57-e6cf31bb4f2e@microchip.com> (raw)
In-Reply-To: <20220309065849.96165-1-alviro.iskandar@gnuweeb.org>

[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]

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@kernel.org>
> Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
> Cc: Nugraha <richiisei@gmail.com>
> Cc: llvm(a)lists.linux.dev
> Cc: kbuild-all(a)lists.01.org
> Cc: gwml(a)vger.gnuweeb.org
> Cc: linux-kernel(a)vger.kernel.org
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/lkml/202203091430.MLY27Bif-lkp(a)intel.com
> Fixes: 50291652af5269813baa6024eb0e81b5f0bbb451 ("ASoC: atmel: mchp-pdmc: add PDMC driver")
> Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>

Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>

Thank you!

  reply	other threads:[~2022-03-09  7:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09  6:09 [ammarfaizi2-block:broonie/sound/for-next 13916/13921] sound/soc/atmel/mchp-pdmc.c:186:34: warning: address of array 'uvalue->value.integer.value' will always evaluate to 'true' kernel test robot
2022-03-09  6:58 ` [PATCH] ASoC: atmel: mchp-pdmc: Fix `-Wpointer-bool-conversion` warning Alviro Iskandar Setiawan
2022-03-09  6:58   ` Alviro Iskandar Setiawan
2022-03-09  7:55   ` Codrin.Ciubotariu [this message]
2022-03-09  7:55     ` Codrin.Ciubotariu
2022-03-14 22:06   ` Nathan Chancellor
2022-03-14 22:06     ` Nathan Chancellor
2022-03-14 23:38     ` Alviro Iskandar Setiawan
2022-03-14 23:38       ` Alviro Iskandar Setiawan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52685dd2-593f-d39b-0f57-e6cf31bb4f2e@microchip.com \
    --to=codrin.ciubotariu@microchip.com \
    --cc=alviro.iskandar@gmail.com \
    --cc=alviro.iskandar@gnuweeb.org \
    --cc=broonie@kernel.org \
    --cc=gwml@vger.gnuweeb.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=richiisei@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.