[PATCH 01/26] Staging: fbtft: fbtft-core: Switch to the gpio descriptor interface

kbuild test robot lkp at intel.com
Sun Nov 25 16:12:06 UTC 2018


Hi Nishad,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.20-rc3 next-20181123]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Nishad-Kamdar/Staging-fbtft-Switch-to-the-gpio-descriptor-interface/20181125-232835
config: x86_64-randconfig-x001-201847 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   drivers/staging/fbtft/fbtft-core.c: In function 'fbtft_request_one_gpio':
>> drivers/staging/fbtft/fbtft-core.c:167:21: error: storage size of 'of_flags' isn't known
     enum of_gpio_flags of_flags;
                        ^~~~~~~~
   drivers/staging/fbtft/fbtft-core.c:167:21: warning: unused variable 'of_flags' [-Wunused-variable]
   drivers/staging/fbtft/fbtft-core.c:166:12: warning: unused variable 'flags' [-Wunused-variable]
     int gpio, flags, ret = 0;
               ^~~~~
   drivers/staging/fbtft/fbtft-core.c:166:6: warning: unused variable 'gpio' [-Wunused-variable]
     int gpio, flags, ret = 0;
         ^~~~
--
   drivers/staging/fbtft/fb_agm1264k-fl.c: In function 'reset':
>> drivers/staging/fbtft/fb_agm1264k-fl.c:82:22: warning: comparison between pointer and integer
     if (par->gpio.reset == -1)
                         ^~
>> drivers/staging/fbtft/fb_agm1264k-fl.c:87:17: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
     gpio_set_value(par->gpio.reset, 0);
                    ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:89:17: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
     gpio_set_value(par->gpio.reset, 1);
                    ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c: In function 'write_reg8_bus8':
   drivers/staging/fbtft/fb_agm1264k-fl.c:197:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->CS0, 1);
                     ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:198:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->CS1, 0);
                     ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:201:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->CS0, 0);
                     ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:202:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->CS1, 1);
                     ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:205:17: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
     gpio_set_value(par->RS, 0); /* RS->0 (command mode) */
                    ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c: In function 'write_vmem':
   drivers/staging/fbtft/fb_agm1264k-fl.c:367:19: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
       gpio_set_value(par->RS, 1); /* RS->1 (data mode) */
                      ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:390:19: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
       gpio_set_value(par->RS, 1); /* RS->1 (data mode) */
                      ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:400:17: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
     gpio_set_value(par->CS0, 1);
                    ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:401:17: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
     gpio_set_value(par->CS1, 1);
                    ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c: In function 'write':
   drivers/staging/fbtft/fb_agm1264k-fl.c:411:17: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
     gpio_set_value(par->RW, 0); /* set write mode */
                    ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:420:19: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
       gpio_set_value(par->gpio.db[i], data & (1 << i));
                      ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:422:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->EPIN, 1);
                     ^~~
   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
--
   drivers/staging/fbtft/fb_bd663474.c: In function 'init_display':
>> drivers/staging/fbtft/fb_bd663474.c:27:19: warning: comparison between pointer and integer
     if (par->gpio.cs != -1)
                      ^~
>> drivers/staging/fbtft/fb_bd663474.c:28:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->gpio.cs, 0);  /* Activate chip */
                     ^~~
   In file included from drivers/staging/fbtft/fb_bd663474.c:15:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
--
   drivers/staging/fbtft/fb_pcd8544.c: In function 'write_vmem':
>> drivers/staging/fbtft/fb_pcd8544.c:122:17: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
     gpio_set_value(par->gpio.dc, 1);
                    ^~~
   In file included from drivers/staging/fbtft/fb_pcd8544.c:14:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
--
   drivers/staging/fbtft/fb_ssd1305.c: In function 'write_vmem':
>> drivers/staging/fbtft/fb_ssd1305.c:171:17: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
     gpio_set_value(par->gpio.dc, 1);
                    ^~~
   In file included from drivers/staging/fbtft/fb_ssd1305.c:11:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
--
   drivers/staging/fbtft/fb_ssd1331.c: In function 'write_reg8_bus8':
>> drivers/staging/fbtft/fb_ssd1331.c:83:19: warning: comparison between pointer and integer
     if (par->gpio.dc != -1)
                      ^~
>> drivers/staging/fbtft/fb_ssd1331.c:84:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->gpio.dc, 0);
                     ^~~
   In file included from drivers/staging/fbtft/fb_ssd1331.c:5:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ssd1331.c:106:19: warning: comparison between pointer and integer
     if (par->gpio.dc != -1)
                      ^~
   drivers/staging/fbtft/fb_ssd1331.c:107:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->gpio.dc, 1);
                     ^~~
   In file included from drivers/staging/fbtft/fb_ssd1331.c:5:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
--
   drivers/staging/fbtft/fb_uc1701.c: In function 'write_vmem':
>> drivers/staging/fbtft/fb_uc1701.c:139:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->gpio.dc, 1);
                     ^~~
   In file included from drivers/staging/fbtft/fb_uc1701.c:14:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_uc1701.c:141:18: warning: passing argument 1 of 'gpio_set_value' makes integer from pointer without a cast [-Wint-conversion]
      gpio_set_value(par->gpio.dc, 0);
                     ^~~
   In file included from drivers/staging/fbtft/fb_uc1701.c:14:0:
   include/linux/gpio.h:69:20: note: expected 'unsigned int' but argument is of type 'struct gpio_desc *'
    static inline void gpio_set_value(unsigned int gpio, int value)
                       ^~~~~~~~~~~~~~

vim +167 drivers/staging/fbtft/fbtft-core.c

c296d5f9 Thomas Petazzoni 2014-12-31  158  
c296d5f9 Thomas Petazzoni 2014-12-31  159  #ifdef CONFIG_OF
c296d5f9 Thomas Petazzoni 2014-12-31  160  static int fbtft_request_one_gpio(struct fbtft_par *par,
1dd49836 Nishad Kamdar    2018-11-25  161  				  const char *name, int index,
1dd49836 Nishad Kamdar    2018-11-25  162  				  struct gpio_desc **gpiop)
c296d5f9 Thomas Petazzoni 2014-12-31  163  {
c296d5f9 Thomas Petazzoni 2014-12-31  164  	struct device *dev = par->info->device;
c296d5f9 Thomas Petazzoni 2014-12-31  165  	struct device_node *node = dev->of_node;
c296d5f9 Thomas Petazzoni 2014-12-31  166  	int gpio, flags, ret = 0;
c296d5f9 Thomas Petazzoni 2014-12-31 @167  	enum of_gpio_flags of_flags;
c296d5f9 Thomas Petazzoni 2014-12-31  168  
c296d5f9 Thomas Petazzoni 2014-12-31  169  	if (of_find_property(node, name, NULL)) {
1dd49836 Nishad Kamdar    2018-11-25  170  		*gpiop = devm_gpiod_get_index(dev, dev->driver->name, index,
1dd49836 Nishad Kamdar    2018-11-25  171  					      GPIOD_OUT_HIGH);
1dd49836 Nishad Kamdar    2018-11-25  172  		if (IS_ERR(*gpiop)) {
1dd49836 Nishad Kamdar    2018-11-25  173  			ret = PTR_ERR(*gpiop);
c296d5f9 Thomas Petazzoni 2014-12-31  174  			dev_err(dev,
1dd49836 Nishad Kamdar    2018-11-25  175  				"Failed to request %s GPIO:%d\n", name, ret);
c296d5f9 Thomas Petazzoni 2014-12-31  176  			return ret;
1dd49836 Nishad Kamdar    2018-11-25  177  
c296d5f9 Thomas Petazzoni 2014-12-31  178  		}
1dd49836 Nishad Kamdar    2018-11-25  179  		fbtft_par_dbg(DEBUG_REQUEST_GPIOS, par, "%s: '%s' GPIO\n",
1dd49836 Nishad Kamdar    2018-11-25  180  			      __func__, name);
c296d5f9 Thomas Petazzoni 2014-12-31  181  	}
c296d5f9 Thomas Petazzoni 2014-12-31  182  
c296d5f9 Thomas Petazzoni 2014-12-31  183  	return ret;
c296d5f9 Thomas Petazzoni 2014-12-31  184  }
c296d5f9 Thomas Petazzoni 2014-12-31  185  

:::::: The code at line 167 was first introduced by commit
:::::: c296d5f9957c03994a699d6739c27d4581a9f6c7 staging: fbtft: core support

:::::: TO: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
:::::: CC: Greg Kroah-Hartman <gregkh at linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29578 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20181126/cd36cf57/attachment-0001.bin>


More information about the devel mailing list