[PATCH v2] staging: olpc_dcon: olpc_dcon_xo_1.c: Switch to the gpio descriptor interface

kbuild test robot lkp at intel.com
Sun Nov 4 01:23:34 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.19 next-20181102]
[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-olpc_dcon-olpc_dcon_xo_1-c-Switch-to-the-gpio-descriptor-interface/20181104-041335
config: i386-allmodconfig (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=i386 

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

   In file included from drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:18:0:
>> drivers/staging/olpc_dcon/olpc_dcon.h:58:33: error: expected identifier before numeric constant
    #define DCON_IRQ                6
                                    ^
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:23:2: note: in expansion of macro 'DCON_IRQ'
     DCON_IRQ,
     ^~~~~~~~
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:34:50: error: 'GPIO_ASIS' undeclared here (not in a function); did you mean 'GPIOD_ASIS'?
     [DCON_STAT0] = { .name = "dcon_stat0", .flags = GPIO_ASIS },
                                                     ^~~~~~~~~
                                                     GPIOD_ASIS
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:37:3: error: 'DCON_LOAD' undeclared here (not in a function); did you mean 'DCON_STAT1'?
     [DCON_LOAD] = { .name = "dcon_load", .flags = GPIO_ASIS },
      ^~~~~~~~~
      DCON_STAT1
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:37:3: error: array index in initializer not of integer type
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:37:3: note: (near initialization for 'gpios_asis')
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:38:3: error: 'DCON_BLANK' undeclared here (not in a function); did you mean 'DCON_LOAD'?
     [DCON_BLANK] = { .name = "dcon_blank", .flag = GPIO_ASIS },
      ^~~~~~~~~~
      DCON_LOAD
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:38:3: error: array index in initializer not of integer type
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:38:3: note: (near initialization for 'gpios_asis')
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:38:42: error: 'const struct dcon_gpio' has no member named 'flag'; did you mean 'flags'?
     [DCON_BLANK] = { .name = "dcon_blank", .flag = GPIO_ASIS },
                                             ^~~~
                                             flags
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c: In function 'dcon_init_xo_1':
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:47:26: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     struct dcon_gpio *pin = &gpios_asis[0];
                             ^
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:50:42: error: dereferencing pointer to incomplete type 'struct i2c_client'
      gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i]->name,
                                             ^~
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:50:42: error: request for member 'dev' in something not a structure or union
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:50:55: error: invalid type argument of '->' (have 'struct dcon_gpio')
      gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i]->name,
                                                          ^~
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:50:55: error: request for member 'name' in something not a structure or union
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:51:14: error: invalid type argument of '->' (have 'struct dcon_gpio')
           pin[i]->flags);
                 ^~
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:51:14: error: request for member 'flags' in something not a structure or union
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:50:29: error: passing argument 1 of 'devm_gpiod_get' from incompatible pointer type [-Werror=incompatible-pointer-types]
      gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i]->name,
                                ^
   In file included from drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:14:0:
   include/linux/gpio/consumer.h:87:32: note: expected 'struct device *' but argument is of type 'const struct dcon_gpio (*)[1]'
    struct gpio_desc *__must_check devm_gpiod_get(struct device *dev,
                                   ^~~~~~~~~~~~~~
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:50:49: error: passing argument 2 of 'devm_gpiod_get' from incompatible pointer type [-Werror=incompatible-pointer-types]
      gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i]->name,
                                                    ^~~
   In file included from drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:14:0:
   include/linux/gpio/consumer.h:87:32: note: expected 'const char *' but argument is of type 'const struct dcon_gpio *'
    struct gpio_desc *__must_check devm_gpiod_get(struct device *dev,
                                   ^~~~~~~~~~~~~~
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:51:8: error: incompatible type for argument 3 of 'devm_gpiod_get'
           pin[i]->flags);
           ^~~
   In file included from drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:14:0:
   include/linux/gpio/consumer.h:87:32: note: expected 'enum gpiod_flags' but argument is of type 'const struct dcon_gpio *'
    struct gpio_desc *__must_check devm_gpiod_get(struct device *dev,
                                   ^~~~~~~~~~~~~~
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:50:12: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
      gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i]->name,
               ^
   In file included from include/linux/kernel.h:14:0,
                    from include/linux/cpumask.h:10,
                    from arch/x86/include/asm/cpumask.h:5,
                    from arch/x86/include/asm/msr.h:11,
                    from include/linux/cs5535.h:14,
                    from drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:13:
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:54:52: error: invalid type argument of '->' (have 'struct dcon_gpio')
       pr_err("failed to request %s GPIO: %d\n", pin[i]->name,
                                                       ^
   include/linux/printk.h:308:33: note: in definition of macro 'pr_err'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
                                    ^~~~~~~~~~~
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:54:52: error: request for member 'name' in something not a structure or union
       pr_err("failed to request %s GPIO: %d\n", pin[i]->name,
                                                       ^
   include/linux/printk.h:308:33: note: in definition of macro 'pr_err'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
                                    ^~~~~~~~~~~
   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:14,
                    from include/linux/cpumask.h:10,
                    from arch/x86/include/asm/cpumask.h:5,
                    from arch/x86/include/asm/msr.h:11,
                    from include/linux/cs5535.h:14,
                    from drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:13:
>> include/linux/kern_levels.h:5:18: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'const struct dcon_gpio *' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
   include/linux/printk.h:308:9: note: in expansion of macro 'KERN_ERR'
     printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:54:4: note: in expansion of macro 'pr_err'
       pr_err("failed to request %s GPIO: %d\n", pin[i]->name,
       ^~~~~~
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:82:29: error: array subscript is not an integer
     gpiod_direction_input(gpios[DCON_BLANK]);
                                ^
>> drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:82:24: error: passing argument 1 of 'gpiod_direction_input' from incompatible pointer type [-Werror=incompatible-pointer-types]
     gpiod_direction_input(gpios[DCON_BLANK]);
                           ^~~~~
   In file included from drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:14:0:
   include/linux/gpio/consumer.h:110:5: note: expected 'struct gpio_desc *' but argument is of type 'const struct dcon_gpio *'
    int gpiod_direction_input(struct gpio_desc *desc);
        ^~~~~~~~~~~~~~~~~~~~~
   drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:83:30: error: array subscript is not an integer
     gpiod_direction_output(gpios[DCON_LOAD],
                                 ^

vim +58 drivers/staging/olpc_dcon/olpc_dcon.h

53c43c5ca Greg Kroah-Hartman 2016-04-04  56  
53c43c5ca Greg Kroah-Hartman 2016-04-04  57  /* Interrupt */
53c43c5ca Greg Kroah-Hartman 2016-04-04 @58  #define DCON_IRQ                6
53c43c5ca Greg Kroah-Hartman 2016-04-04  59  

:::::: The code at line 58 was first introduced by commit
:::::: 53c43c5ca13328ac8f415aa2251791b441a12b51 Revert "Staging: olpc_dcon: Remove obsolete driver"

:::::: TO: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
:::::: 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: 65877 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20181104/929c388e/attachment-0001.bin>


More information about the devel mailing list