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: s390-allyesconfig (https://download.01.org/0day-ci/archive/20231213/202312130748.S0Z3yEtT-lkp@xxxxxxxxx/config) compiler: s390-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312130748.S0Z3yEtT-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202312130748.S0Z3yEtT-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): sound/soc/tegra/tegra20_ac97.c: In function 'tegra20_ac97_codec_reset': >> sound/soc/tegra/tegra20_ac97.c:46:33: warning: passing argument 1 of 'gpiod_set_value' makes pointer from integer without a cast [-Wint-conversion] 46 | gpiod_set_value(workdata->reset_gpio, 1); | ~~~~~~~~^~~~~~~~~~~~ | | | int In file included from sound/soc/tegra/tegra20_ac97.c:15: include/linux/gpio/consumer.h:122:40: note: expected 'struct gpio_desc *' but argument is of type 'int' 122 | void gpiod_set_value(struct gpio_desc *desc, int value); | ~~~~~~~~~~~~~~~~~~^~~~ sound/soc/tegra/tegra20_ac97.c:49:33: warning: passing argument 1 of 'gpiod_set_value' makes pointer from integer without a cast [-Wint-conversion] 49 | gpiod_set_value(workdata->reset_gpio, 0); | ~~~~~~~~^~~~~~~~~~~~ | | | int include/linux/gpio/consumer.h:122:40: note: expected 'struct gpio_desc *' but argument is of type 'int' 122 | void gpiod_set_value(struct gpio_desc *desc, int value); | ~~~~~~~~~~~~~~~~~~^~~~ sound/soc/tegra/tegra20_ac97.c: In function 'tegra20_ac97_codec_warm_reset': >> sound/soc/tegra/tegra20_ac97.c:72:40: warning: passing argument 1 of 'gpiod_direction_output' makes pointer from integer without a cast [-Wint-conversion] 72 | gpiod_direction_output(workdata->sync_gpio, 1); | ~~~~~~~~^~~~~~~~~~~ | | | int include/linux/gpio/consumer.h:111:46: note: expected 'struct gpio_desc *' but argument is of type 'int' 111 | int gpiod_direction_output(struct gpio_desc *desc, int value); | ~~~~~~~~~~~~~~~~~~^~~~ sound/soc/tegra/tegra20_ac97.c:74:33: warning: passing argument 1 of 'gpiod_set_value' makes pointer from integer without a cast [-Wint-conversion] 74 | gpiod_set_value(workdata->sync_gpio, 0); | ~~~~~~~~^~~~~~~~~~~ | | | int include/linux/gpio/consumer.h:122:40: note: expected 'struct gpio_desc *' but argument is of type 'int' 122 | void gpiod_set_value(struct gpio_desc *desc, int value); | ~~~~~~~~~~~~~~~~~~^~~~ sound/soc/tegra/tegra20_ac97.c: In function 'tegra20_ac97_platform_probe': >> sound/soc/tegra/tegra20_ac97.c:345:26: warning: assignment to 'int' from 'struct gpio_desc *' makes integer from pointer without a cast [-Wint-conversion] 345 | ac97->reset_gpio = devm_gpiod_get(&pdev->dev, | ^ >> sound/soc/tegra/tegra20_ac97.c:348:24: warning: passing argument 1 of 'IS_ERR' makes pointer from integer without a cast [-Wint-conversion] 348 | if (IS_ERR(ac97->reset_gpio)) { | ~~~~^~~~~~~~~~~~ | | | int In file included from include/linux/clk.h:12, from sound/soc/tegra/tegra20_ac97.c:12: include/linux/err.h:59:60: note: expected 'const void *' but argument is of type 'int' 59 | static inline bool __must_check IS_ERR(__force const void *ptr) | ~~~~~~~~~~~~^~~ >> sound/soc/tegra/tegra20_ac97.c:349:35: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion] 349 | ret = PTR_ERR(ac97->reset_gpio); | ~~~~^~~~~~~~~~~~ | | | int include/linux/err.h:49:61: note: expected 'const void *' but argument is of type 'int' 49 | static inline long __must_check PTR_ERR(__force const void *ptr) | ~~~~~~~~~~~~^~~ >> sound/soc/tegra/tegra20_ac97.c:353:37: warning: passing argument 1 of 'gpiod_set_consumer_name' makes pointer from integer without a cast [-Wint-conversion] 353 | gpiod_set_consumer_name(ac97->reset_gpio, "codec-reset"); | ~~~~^~~~~~~~~~~~ | | | int include/linux/gpio/consumer.h:168:47: note: expected 'struct gpio_desc *' but argument is of type 'int' 168 | int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name); | ~~~~~~~~~~~~~~~~~~^~~~ sound/soc/tegra/tegra20_ac97.c:355:25: warning: assignment to 'int' from 'struct gpio_desc *' makes integer from pointer without a cast [-Wint-conversion] 355 | ac97->sync_gpio = devm_gpiod_get(&pdev->dev, | ^ sound/soc/tegra/tegra20_ac97.c:358:24: warning: passing argument 1 of 'IS_ERR' makes pointer from integer without a cast [-Wint-conversion] 358 | if (IS_ERR(ac97->sync_gpio)) { | ~~~~^~~~~~~~~~~ | | | int include/linux/err.h:59:60: note: expected 'const void *' but argument is of type 'int' 59 | static inline bool __must_check IS_ERR(__force const void *ptr) | ~~~~~~~~~~~~^~~ sound/soc/tegra/tegra20_ac97.c:359:35: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion] 359 | ret = PTR_ERR(ac97->sync_gpio); | ~~~~^~~~~~~~~~~ | | | int include/linux/err.h:49:61: note: expected 'const void *' but argument is of type 'int' 49 | static inline long __must_check PTR_ERR(__force const void *ptr) | ~~~~~~~~~~~~^~~ sound/soc/tegra/tegra20_ac97.c:363:37: warning: passing argument 1 of 'gpiod_set_consumer_name' makes pointer from integer without a cast [-Wint-conversion] 363 | gpiod_set_consumer_name(ac97->sync_gpio, "codec-sync"); | ~~~~^~~~~~~~~~~ | | | int include/linux/gpio/consumer.h:168:47: note: expected 'struct gpio_desc *' but argument is of type 'int' 168 | int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name); | ~~~~~~~~~~~~~~~~~~^~~~ vim +/gpiod_set_value +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 62 static void tegra20_ac97_codec_warm_reset(struct snd_ac97 *ac97) 63 { 64 u32 readback; 65 unsigned long timeout; 66 67 /* 68 * although sync line is driven by the DAC pad group warm reset using 69 * the controller cmd is not working, have to toggle sync line 70 * manually. 71 */ > 72 gpiod_direction_output(workdata->sync_gpio, 1); 73 udelay(2); 74 gpiod_set_value(workdata->sync_gpio, 0); 75 udelay(2); 76 77 timeout = jiffies + msecs_to_jiffies(100); 78 79 do { 80 regmap_read(workdata->regmap, TEGRA20_AC97_STATUS1, &readback); 81 if (readback & TEGRA20_AC97_STATUS1_CODEC1_RDY) 82 break; 83 usleep_range(1000, 2000); 84 } while (!time_after(jiffies, timeout)); 85 } 86 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki