linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [linusw-gpio:b4/descriptors-wireless 2/2] drivers/gpio/gpio-ath79.c:240:32: error: 'pdev' undeclared; did you mean 'dev'?
@ 2024-04-09 23:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-09 23:03 UTC (permalink / raw)
  To: Linus Walleij; +Cc: oe-kbuild-all, linux-gpio

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git b4/descriptors-wireless
head:   3ca0eec7ecfa5c404f41e9b1e7690ec64de77b53
commit: 3ca0eec7ecfa5c404f41e9b1e7690ec64de77b53 [2/2] wifi: ath9k: Obtain system GPIOS from descriptors
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240410/202404100624.vZIIfZvs-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240410/202404100624.vZIIfZvs-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/202404100624.vZIIfZvs-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/gpio/gpio-ath79.c: In function 'ath79_gpio_register_wifi_descriptors':
>> drivers/gpio/gpio-ath79.c:240:32: error: 'pdev' undeclared (first use in this function); did you mean 'dev'?
     240 |         lookup = devm_kzalloc(&pdev->dev,
         |                                ^~~~
         |                                dev
   drivers/gpio/gpio-ath79.c:240:32: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpio/gpio-ath79.c:251:25: error: implicit declaration of function 'PIO_LOOKUP_IDX'; did you mean 'GPIO_LOOKUP_IDX'? [-Werror=implicit-function-declaration]
     251 |                         PIO_LOOKUP_IDX(label, 0, NULL, i,
         |                         ^~~~~~~~~~~~~~
         |                         GPIO_LOOKUP_IDX
>> drivers/gpio/gpio-ath79.c:252:40: error: conversion to non-scalar type requested
     252 |                                        GPIO_ACTIVE_HIGH);
         |                                        ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +240 drivers/gpio/gpio-ath79.c

   225	
   226	#if IS_ENABLED(CONFIG_ATH9K_AHB)
   227	/*
   228	 * This registers all of the ath79k GPIOs as descriptors to be picked
   229	 * directly from the ATH79K wifi driver if the two are jitted together
   230	 * in the same SoC.
   231	 */
   232	#define ATH79K_WIFI_DESCS 32
   233	static int ath79_gpio_register_wifi_descriptors(struct device *dev,
   234							const char *label)
   235	{
   236		struct gpiod_lookup_table *lookup;
   237		int i;
   238	
   239		/* Create a gpiod lookup using gpiochip-local offsets + 1 for NULL */
 > 240	        lookup = devm_kzalloc(&pdev->dev,
   241				      struct_size(lookup, table, ATH79K_WIFI_DESCS + 1),
   242				      GFP_KERNEL);
   243	
   244		if (!lookup)
   245			return -ENOMEM;
   246	
   247		lookup->dev_id = "ath9k";
   248	
   249		for (i = 0; i < ATH79K_WIFI_DESCS; i++) {
   250			lookup->table[i] = (struct gpiod_lookup)
 > 251				PIO_LOOKUP_IDX(label, 0, NULL, i,
 > 252					       GPIO_ACTIVE_HIGH);
   253		}
   254	
   255		gpiod_add_lookup_table(lookup);
   256	
   257		return 0;
   258	}
   259	#else
   260	static int ath79_gpio_register_wifi_descriptors(struct device *dev,
   261							const char *label)
   262	{
   263	}
   264	#endif
   265	

-- 
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:[~2024-04-09 23:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 23:03 [linusw-gpio:b4/descriptors-wireless 2/2] drivers/gpio/gpio-ath79.c:240:32: error: 'pdev' undeclared; did you mean 'dev'? 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).