[gpio:gpio-descriptors-input-cleanup 2/5] drivers//gpio/gpio-pca953x.c:423:56: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-input-cleanup
head:   5a5874a09f57d33e962da7e147cfc10a45ed7aac
commit: e1c56cc01b2148c75168dd19fc81daf0e12024d3 [2/5] gpio: pca953x: Name the gpiochip after the I2C address
config: x86_64-randconfig-x008-201748 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout e1c56cc01b2148c75168dd19fc81daf0e12024d3
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers//gpio/gpio-pca953x.c: In function 'pca953x_setup_gpio':
>> drivers//gpio/gpio-pca953x.c:423:56: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
     chipname = devm_kasprintf(&client->dev, GFP_KERNEL, "%s-%d-%02x",
                                                          ~^
                                                          %d
          client->adapter->nr,
          ~~~~~~~~~~~~~~~~~~~                               
>> drivers//gpio/gpio-pca953x.c:423:59: warning: format '%d' expects argument of type 'int', but argument 5 has type 'char *' [-Wformat=]
     chipname = devm_kasprintf(&client->dev, GFP_KERNEL, "%s-%d-%02x",
                                                             ~^
                                                             %s
   drivers//gpio/gpio-pca953x.c:425:7:
          client->name, client->addr);
          ~~~~~~                                               

vim +423 drivers//gpio/gpio-pca953x.c

   415	
   416	static int pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
   417	{
   418		struct i2c_client *client = chip->client;
   419		struct gpio_chip *gc;
   420		static char *chipname;
   421	
   422		/* Gives a chip name from the chip name and I2C address */
 > 423		chipname = devm_kasprintf(&client->dev, GFP_KERNEL, "%s-%d-%02x",
   424					  client->adapter->nr,
   425					  client->name, client->addr);
   426		if (!chipname)
   427			return -ENOMEM;
   428		gc = &chip->gpio_chip;
   429	
   430		gc->direction_input  = pca953x_gpio_direction_input;
   431		gc->direction_output = pca953x_gpio_direction_output;
   432		gc->get = pca953x_gpio_get_value;
   433		gc->set = pca953x_gpio_set_value;
   434		gc->get_direction = pca953x_gpio_get_direction;
   435		gc->set_multiple = pca953x_gpio_set_multiple;
   436		gc->can_sleep = true;
   437	
   438		gc->base = chip->gpio_start;
   439		gc->ngpio = gpios;
   440		gc->label = chipname;
   441		gc->parent = &chip->client->dev;
   442		gc->owner = THIS_MODULE;
   443		gc->names = chip->names;
   444	
   445		return 0;
   446	}
   447	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux