From: kbuild test robot <lkp@intel.com>
To: Kent Gibson <warthog618@gmail.com>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
bgolaszewski@baylibre.com, linus.walleij@linaro.org
Cc: kbuild-all@lists.01.org, Kent Gibson <warthog618@gmail.com>
Subject: Re: [PATCH] gpiolib: split character device into gpiolib-cdev
Date: Thu, 28 May 2020 12:56:54 +0800 [thread overview]
Message-ID: <202005281202.LxUqXyMm%lkp@intel.com> (raw)
In-Reply-To: <20200527154005.6827-1-warthog618@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4187 bytes --]
Hi Kent,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on v5.7-rc5]
[cannot apply to gpio/for-next linus/master linux/master v5.7-rc7 v5.7-rc6 next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kent-Gibson/gpiolib-split-character-device-into-gpiolib-cdev/20200528-000035
base: 2ef96a5bb12be62ef75b5828c0aab838ebb29cb8
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/gpio/gpiolib-cdev.c:1092:5: warning: no previous prototype for 'gpiolib_cdev_register' [-Wmissing-prototypes]
1092 | int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpiolib-cdev.c:1110:6: warning: no previous prototype for 'gpiolib_cdev_unregister' [-Wmissing-prototypes]
1110 | void gpiolib_cdev_unregister(struct gpio_device *gdev)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpiolib-cdev.c: In function 'gpio_desc_to_lineinfo':
>> drivers/gpio/gpiolib-cdev.c:779:3: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
779 | strncpy(info->name, desc->name, sizeof(info->name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +779 drivers/gpio/gpiolib-cdev.c
769
770 static void gpio_desc_to_lineinfo(struct gpio_desc *desc,
771 struct gpioline_info *info)
772 {
773 struct gpio_chip *gc = desc->gdev->chip;
774 unsigned long flags;
775
776 spin_lock_irqsave(&gpio_lock, flags);
777
778 if (desc->name) {
> 779 strncpy(info->name, desc->name, sizeof(info->name));
780 info->name[sizeof(info->name) - 1] = '\0';
781 } else {
782 info->name[0] = '\0';
783 }
784
785 if (desc->label) {
786 strncpy(info->consumer, desc->label, sizeof(info->consumer));
787 info->consumer[sizeof(info->consumer) - 1] = '\0';
788 } else {
789 info->consumer[0] = '\0';
790 }
791
792 /*
793 * Userspace only need to know that the kernel is using this GPIO so
794 * it can't use it.
795 */
796 info->flags = 0;
797 if (test_bit(FLAG_REQUESTED, &desc->flags) ||
798 test_bit(FLAG_IS_HOGGED, &desc->flags) ||
799 test_bit(FLAG_USED_AS_IRQ, &desc->flags) ||
800 test_bit(FLAG_EXPORT, &desc->flags) ||
801 test_bit(FLAG_SYSFS, &desc->flags) ||
802 !pinctrl_gpio_can_use_line(gc->base + info->line_offset))
803 info->flags |= GPIOLINE_FLAG_KERNEL;
804 if (test_bit(FLAG_IS_OUT, &desc->flags))
805 info->flags |= GPIOLINE_FLAG_IS_OUT;
806 if (test_bit(FLAG_ACTIVE_LOW, &desc->flags))
807 info->flags |= GPIOLINE_FLAG_ACTIVE_LOW;
808 if (test_bit(FLAG_OPEN_DRAIN, &desc->flags))
809 info->flags |= (GPIOLINE_FLAG_OPEN_DRAIN |
810 GPIOLINE_FLAG_IS_OUT);
811 if (test_bit(FLAG_OPEN_SOURCE, &desc->flags))
812 info->flags |= (GPIOLINE_FLAG_OPEN_SOURCE |
813 GPIOLINE_FLAG_IS_OUT);
814 if (test_bit(FLAG_BIAS_DISABLE, &desc->flags))
815 info->flags |= GPIOLINE_FLAG_BIAS_DISABLE;
816 if (test_bit(FLAG_PULL_DOWN, &desc->flags))
817 info->flags |= GPIOLINE_FLAG_BIAS_PULL_DOWN;
818 if (test_bit(FLAG_PULL_UP, &desc->flags))
819 info->flags |= GPIOLINE_FLAG_BIAS_PULL_UP;
820
821 spin_unlock_irqrestore(&gpio_lock, flags);
822 }
823
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 63412 bytes --]
next prev parent reply other threads:[~2020-05-28 4:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 15:40 [PATCH] gpiolib: split character device into gpiolib-cdev Kent Gibson
2020-05-28 0:47 ` kbuild test robot
2020-05-28 4:56 ` kbuild test robot [this message]
2020-06-01 18:33 ` kbuild test robot
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=202005281202.LxUqXyMm%lkp@intel.com \
--to=lkp@intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=kbuild-all@lists.01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.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