linux/sound/soc/atmel
Alviro Iskandar Setiawan a8ae15ead9
ASoC: atmel: mchp-pdmc: Fix -Wpointer-bool-conversion warning
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.

Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Link: https://lore.kernel.org/r/20220315001848.3763534-1-alviro.iskandar@gnuweeb.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-15 12:03:49 +00:00
..
atmel_ssc_dai.c ASoC: atmel_ssc_dai: Handle errors for clk_enable 2022-03-02 13:45:22 +00:00
atmel_ssc_dai.h ASoC: atmel_ssc_dai: Remove wrong spinlock usage 2019-09-18 11:12:24 +01:00
atmel_wm8904.c ASoC: atmel: Convert to new style DAI format definitions 2021-09-16 14:11:30 +01:00
atmel-classd.c ASoC: atmel-classd: Use devm_platform_get_and_ioremap_resource() 2021-06-14 14:59:15 +01:00
atmel-classd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-i2s.c ASoC: atmel: Convert to new style DAI format definitions 2021-09-16 14:11:30 +01:00
atmel-pcm-dma.c ASoC: atmel-pcm: remove unnecessary include 2020-09-30 16:12:13 +01:00
atmel-pcm-pdc.c ASoC: atmel-pdc: Use managed DMA buffer allocation 2021-01-13 11:36:15 +00:00
atmel-pcm.h ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register() 2019-06-28 15:08:38 +01:00
atmel-pdmic.c ASoC: atmel-pdmic: Use devm_platform_get_and_ioremap_resource() 2021-06-14 15:01:07 +01:00
atmel-pdmic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig ASoC: atmel: mchp-pdmc: add PDMC driver 2022-03-08 13:38:59 +00:00
Makefile ASoC: atmel: mchp-pdmc: add PDMC driver 2022-03-08 13:38:59 +00:00
mchp-i2s-mcc.c ASoC: atmel: Convert to new style DAI format definitions 2021-09-16 14:11:30 +01:00
mchp-pdmc.c ASoC: atmel: mchp-pdmc: Fix -Wpointer-bool-conversion warning 2022-03-15 12:03:49 +00:00
mchp-spdifrx.c ASoC: mchp-spdifrx: fix typo 2022-03-11 13:42:28 +00:00
mchp-spdiftx.c ASoC: atmel: fix spelling mistakes 2021-07-11 23:48:33 +01:00
mikroe-proto.c ASoC: atmel: Fix error handling in snd_proto_probe 2022-03-08 12:27:51 +00:00
sam9g20_wm8731.c ASoC: atmel: Add missing of_node_put() in at91sam9g20ek_audio_probe 2022-03-07 13:14:50 +00:00
sam9x5_wm8731.c ASoC: atmel: Convert to new style DAI format definitions 2021-09-16 14:11:30 +01:00
tse850-pcm5142.c ASoC: ateml: Use dev_err_probe() helper 2021-12-20 12:47:12 +00:00