mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* gpio-mockup-cdev.c:24:37: warning: unused variable 'req'
@ 2022-07-19  5:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-19  5:43 UTC (permalink / raw)
  To: Kent Gibson; +Cc: kbuild-all, linux-kernel, Bartosz Golaszewski

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ca85855bdcae8f84f1512e88b4c75009ea17ea2f
commit: 4f4d0af7b2d997635b08fabd748673eff1bb12d6 selftests: gpio: restore CFLAGS options
date:   8 months ago
reproduce: make O=/tmp/kselftest -C tools/testing/selftests

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   gpio-mockup-cdev.c: In function 'request_line_v2':
   gpio-mockup-cdev.c:24:37: error: storage size of 'req' isn't known
      24 |         struct gpio_v2_line_request req;
         |                                     ^~~
   gpio-mockup-cdev.c:32:21: error: 'GPIO_V2_LINE_FLAG_OUTPUT' undeclared (first use in this function); did you mean 'GPIOLINE_FLAG_IS_OUT'?
      32 |         if (flags & GPIO_V2_LINE_FLAG_OUTPUT) {
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~
         |                     GPIOLINE_FLAG_IS_OUT
   gpio-mockup-cdev.c:32:21: note: each undeclared identifier is reported only once for each function it appears in
   gpio-mockup-cdev.c:35:47: error: 'GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES' undeclared (first use in this function)
      35 |                 req.config.attrs[0].attr.id = GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES;
         |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   gpio-mockup-cdev.c:39:26: error: 'GPIO_V2_GET_LINE_IOCTL' undeclared (first use in this function); did you mean 'GPIO_GET_LINEINFO_IOCTL'?
      39 |         ret = ioctl(cfd, GPIO_V2_GET_LINE_IOCTL, &req);
         |                          ^~~~~~~~~~~~~~~~~~~~~~
         |                          GPIO_GET_LINEINFO_IOCTL
>> gpio-mockup-cdev.c:24:37: warning: unused variable 'req' [-Wunused-variable]
      24 |         struct gpio_v2_line_request req;
         |                                     ^~~
   gpio-mockup-cdev.c: In function 'get_value_v2':
   gpio-mockup-cdev.c:48:36: error: storage size of 'vals' isn't known
      48 |         struct gpio_v2_line_values vals;
         |                                    ^~~~
   gpio-mockup-cdev.c:53:26: error: 'GPIO_V2_LINE_GET_VALUES_IOCTL' undeclared (first use in this function); did you mean 'GPIOHANDLE_GET_LINE_VALUES_IOCTL'?
      53 |         ret = ioctl(lfd, GPIO_V2_LINE_GET_VALUES_IOCTL, &vals);
         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                          GPIOHANDLE_GET_LINE_VALUES_IOCTL
>> gpio-mockup-cdev.c:48:36: warning: unused variable 'vals' [-Wunused-variable]
      48 |         struct gpio_v2_line_values vals;
         |                                    ^~~~
   gpio-mockup-cdev.c: In function 'main':
   gpio-mockup-cdev.c:127:20: error: 'GPIO_V2_LINE_FLAG_INPUT' undeclared (first use in this function); did you mean 'GPIOLINE_FLAG_IS_OUT'?
     127 |         flags_v2 = GPIO_V2_LINE_FLAG_INPUT;
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
         |                    GPIOLINE_FLAG_IS_OUT
   gpio-mockup-cdev.c:133:37: error: 'GPIO_V2_LINE_FLAG_ACTIVE_LOW' undeclared (first use in this function); did you mean 'GPIOLINE_FLAG_ACTIVE_LOW'?
     133 |                         flags_v2 |= GPIO_V2_LINE_FLAG_ACTIVE_LOW;
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                     GPIOLINE_FLAG_ACTIVE_LOW
   gpio-mockup-cdev.c:137:45: error: 'GPIOHANDLE_REQUEST_BIAS_PULL_UP' undeclared (first use in this function); did you mean 'GPIOHANDLE_REQUEST_INPUT'?
     137 |                                 flags_v1 |= GPIOHANDLE_REQUEST_BIAS_PULL_UP;
         |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                             GPIOHANDLE_REQUEST_INPUT
   gpio-mockup-cdev.c:138:45: error: 'GPIO_V2_LINE_FLAG_BIAS_PULL_UP' undeclared (first use in this function)
     138 |                                 flags_v2 |= GPIO_V2_LINE_FLAG_BIAS_PULL_UP;
         |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   gpio-mockup-cdev.c:140:45: error: 'GPIOHANDLE_REQUEST_BIAS_PULL_DOWN' undeclared (first use in this function); did you mean 'GPIOHANDLE_REQUEST_ACTIVE_LOW'?
     140 |                                 flags_v1 |= GPIOHANDLE_REQUEST_BIAS_PULL_DOWN;
         |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                             GPIOHANDLE_REQUEST_ACTIVE_LOW
   gpio-mockup-cdev.c:141:45: error: 'GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN' undeclared (first use in this function)
     141 |                                 flags_v2 |= GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN;
         |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   gpio-mockup-cdev.c:143:45: error: 'GPIOHANDLE_REQUEST_BIAS_DISABLE' undeclared (first use in this function); did you mean 'GPIOHANDLE_REQUEST_OPEN_DRAIN'?
     143 |                                 flags_v1 |= GPIOHANDLE_REQUEST_BIAS_DISABLE;
         |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                             GPIOHANDLE_REQUEST_OPEN_DRAIN
   gpio-mockup-cdev.c:144:45: error: 'GPIO_V2_LINE_FLAG_BIAS_DISABLED' undeclared (first use in this function)
     144 |                                 flags_v2 |= GPIO_V2_LINE_FLAG_BIAS_DISABLED;
         |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   gpio-mockup-cdev.c:152:37: error: 'GPIO_V2_LINE_FLAG_OUTPUT' undeclared (first use in this function); did you mean 'GPIOLINE_FLAG_IS_OUT'?
     152 |                         flags_v2 |= GPIO_V2_LINE_FLAG_OUTPUT;
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~
         |                                     GPIOLINE_FLAG_IS_OUT
   gpio-mockup-cdev.c: In function 'request_line_v2':
>> gpio-mockup-cdev.c:43:1: warning: control reaches end of non-void function [-Wreturn-type]
      43 | }
         | ^

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-19  5:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19  5:43 gpio-mockup-cdev.c:24:37: warning: unused variable 'req' 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

all inboxes | Powered by JetHome®