mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kent Gibson <warthog618@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: gpio-mockup-cdev.c:24:37: warning: unused variable 'req'
Date: Tue, 19 Jul 2022 13:43:26 +0800	[thread overview]
Message-ID: <202207191305.jL0JzHsp-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-07-19  5:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202207191305.jL0JzHsp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brgl@bgdev.pl \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=warthog618@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®