* [linusw-gpio:b4/gpio-descriptors-sound-misc 5/5] sound/soc/tegra/tegra20_ac97.c:46:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct gpio_desc *'
@ 2023-12-13 7:24 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-13 7:24 UTC (permalink / raw)
To: Linus Walleij; +Cc: llvm, oe-kbuild-all, linux-gpio
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git b4/gpio-descriptors-sound-misc
head: cbde31b95f12d0b3059938194b704f40cdd55540
commit: cbde31b95f12d0b3059938194b704f40cdd55540 [5/5] ASoC: tegra: tegra20_ac97: Convert to use GPIO descriptors
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231213/202312131540.fKLvGlTn-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312131540.fKLvGlTn-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312131540.fKLvGlTn-lkp@intel.com/
All errors (new ones prefixed by >>):
>> sound/soc/tegra/tegra20_ac97.c:46:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct gpio_desc *' [-Wint-conversion]
gpiod_set_value(workdata->reset_gpio, 1);
^~~~~~~~~~~~~~~~~~~~
include/linux/gpio/consumer.h:122:40: note: passing argument to parameter 'desc' here
void gpiod_set_value(struct gpio_desc *desc, int value);
^
sound/soc/tegra/tegra20_ac97.c:49:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct gpio_desc *' [-Wint-conversion]
gpiod_set_value(workdata->reset_gpio, 0);
^~~~~~~~~~~~~~~~~~~~
include/linux/gpio/consumer.h:122:40: note: passing argument to parameter 'desc' here
void gpiod_set_value(struct gpio_desc *desc, int value);
^
sound/soc/tegra/tegra20_ac97.c:72:25: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct gpio_desc *' [-Wint-conversion]
gpiod_direction_output(workdata->sync_gpio, 1);
^~~~~~~~~~~~~~~~~~~
include/linux/gpio/consumer.h:111:46: note: passing argument to parameter 'desc' here
int gpiod_direction_output(struct gpio_desc *desc, int value);
^
sound/soc/tegra/tegra20_ac97.c:74:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct gpio_desc *' [-Wint-conversion]
gpiod_set_value(workdata->sync_gpio, 0);
^~~~~~~~~~~~~~~~~~~
include/linux/gpio/consumer.h:122:40: note: passing argument to parameter 'desc' here
void gpiod_set_value(struct gpio_desc *desc, int value);
^
>> sound/soc/tegra/tegra20_ac97.c:345:19: error: incompatible pointer to integer conversion assigning to 'int' from 'struct gpio_desc *' [-Wint-conversion]
ac97->reset_gpio = devm_gpiod_get(&pdev->dev,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/tegra/tegra20_ac97.c:348:13: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
if (IS_ERR(ac97->reset_gpio)) {
^~~~~~~~~~~~~~~~
include/linux/err.h:59:60: note: passing argument to parameter 'ptr' here
static inline bool __must_check IS_ERR(__force const void *ptr)
^
sound/soc/tegra/tegra20_ac97.c:349:17: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
ret = PTR_ERR(ac97->reset_gpio);
^~~~~~~~~~~~~~~~
include/linux/err.h:49:61: note: passing argument to parameter 'ptr' here
static inline long __must_check PTR_ERR(__force const void *ptr)
^
sound/soc/tegra/tegra20_ac97.c:353:26: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct gpio_desc *' [-Wint-conversion]
gpiod_set_consumer_name(ac97->reset_gpio, "codec-reset");
^~~~~~~~~~~~~~~~
include/linux/gpio/consumer.h:168:47: note: passing argument to parameter 'desc' here
int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name);
^
sound/soc/tegra/tegra20_ac97.c:355:18: error: incompatible pointer to integer conversion assigning to 'int' from 'struct gpio_desc *' [-Wint-conversion]
ac97->sync_gpio = devm_gpiod_get(&pdev->dev,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/tegra/tegra20_ac97.c:358:13: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
if (IS_ERR(ac97->sync_gpio)) {
^~~~~~~~~~~~~~~
include/linux/err.h:59:60: note: passing argument to parameter 'ptr' here
static inline bool __must_check IS_ERR(__force const void *ptr)
^
sound/soc/tegra/tegra20_ac97.c:359:17: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
ret = PTR_ERR(ac97->sync_gpio);
^~~~~~~~~~~~~~~
include/linux/err.h:49:61: note: passing argument to parameter 'ptr' here
static inline long __must_check PTR_ERR(__force const void *ptr)
^
sound/soc/tegra/tegra20_ac97.c:363:26: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct gpio_desc *' [-Wint-conversion]
gpiod_set_consumer_name(ac97->sync_gpio, "codec-sync");
^~~~~~~~~~~~~~~
include/linux/gpio/consumer.h:168:47: note: passing argument to parameter 'desc' here
int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name);
^
12 errors generated.
vim +46 sound/soc/tegra/tegra20_ac97.c
35
36 static void tegra20_ac97_codec_reset(struct snd_ac97 *ac97)
37 {
38 u32 readback;
39 unsigned long timeout;
40
41 /*
42 * The reset line is not driven by DAC pad group, have to toggle GPIO.
43 * The RESET line is active low but this is abstracted by the GPIO
44 * library.
45 */
> 46 gpiod_set_value(workdata->reset_gpio, 1);
47 udelay(2);
48
49 gpiod_set_value(workdata->reset_gpio, 0);
50 udelay(2);
51
52 timeout = jiffies + msecs_to_jiffies(100);
53
54 do {
55 regmap_read(workdata->regmap, TEGRA20_AC97_STATUS1, &readback);
56 if (readback & TEGRA20_AC97_STATUS1_CODEC1_RDY)
57 break;
58 usleep_range(1000, 2000);
59 } while (!time_after(jiffies, timeout));
60 }
61
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-13 7:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 7:24 [linusw-gpio:b4/gpio-descriptors-sound-misc 5/5] sound/soc/tegra/tegra20_ac97.c:46:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct gpio_desc *' kernel test robot
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).