From: kernel test robot <lkp@intel.com>
To: Potin Lai <potin.lai.pt@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Patrick Williams <patrick@stwcx.xyz>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Cosmo Chou <cosmo.chou@quantatw.com>,
Potin Lai <potin.lai@quantatw.com>
Subject: Re: [PATCH] gpio: pca953x: Add support for level-triggered interrupts
Date: Tue, 18 Mar 2025 12:51:43 +0800 [thread overview]
Message-ID: <202503181231.ZqKVm0Z8-lkp@intel.com> (raw)
In-Reply-To: <20250318-gpio-pca953x-level-triggered-irq-v1-1-0c4943d92425@gmail.com>
Hi Potin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 2014c95afecee3e76ca4a56956a936e23283f05b]
url: https://github.com/intel-lab-lkp/linux/commits/Potin-Lai/gpio-pca953x-Add-support-for-level-triggered-interrupts/20250318-004441
base: 2014c95afecee3e76ca4a56956a936e23283f05b
patch link: https://lore.kernel.org/r/20250318-gpio-pca953x-level-triggered-irq-v1-1-0c4943d92425%40gmail.com
patch subject: [PATCH] gpio: pca953x: Add support for level-triggered interrupts
config: x86_64-buildonly-randconfig-002-20250318 (https://download.01.org/0day-ci/archive/20250318/202503181231.ZqKVm0Z8-lkp@intel.com/config)
compiler: clang version 20.1.0 (https://github.com/llvm/llvm-project 24a30daaa559829ad079f2ff7f73eb4e18095f88)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250318/202503181231.ZqKVm0Z8-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503181231.ZqKVm0Z8-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-pca953x.c:887:43: warning: address of array 'chip->irq_trig_level_low' will always evaluate to 'true' [-Wpointer-bool-conversion]
887 | if (!chip->irq_trig_level_high && !chip->irq_trig_level_low) {
| ~~~~~~~^~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-pca953x.c:887:13: warning: address of array 'chip->irq_trig_level_high' will always evaluate to 'true' [-Wpointer-bool-conversion]
887 | if (!chip->irq_trig_level_high && !chip->irq_trig_level_low) {
| ~~~~~~~^~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +887 drivers/gpio/gpio-pca953x.c
841
842 static bool pca953x_irq_pending(struct pca953x_chip *chip, unsigned long *pending)
843 {
844 struct gpio_chip *gc = &chip->gpio_chip;
845 DECLARE_BITMAP(reg_direction, MAX_LINE);
846 DECLARE_BITMAP(old_stat, MAX_LINE);
847 DECLARE_BITMAP(cur_stat, MAX_LINE);
848 DECLARE_BITMAP(new_stat, MAX_LINE);
849 DECLARE_BITMAP(trigger, MAX_LINE);
850 DECLARE_BITMAP(edges, MAX_LINE);
851 int ret;
852
853 if (chip->driver_data & PCA_PCAL) {
854 /* Read the current interrupt status from the device */
855 ret = pca953x_read_regs(chip, PCAL953X_INT_STAT, trigger);
856 if (ret)
857 return false;
858
859 /* Check latched inputs and clear interrupt status */
860 ret = pca953x_read_regs(chip, chip->regs->input, cur_stat);
861 if (ret)
862 return false;
863
864 /* Apply filter for rising/falling edge selection */
865 bitmap_replace(new_stat, chip->irq_trig_fall, chip->irq_trig_raise, cur_stat, gc->ngpio);
866
867 bitmap_and(pending, new_stat, trigger, gc->ngpio);
868
869 return !bitmap_empty(pending, gc->ngpio);
870 }
871
872 ret = pca953x_read_regs(chip, chip->regs->input, cur_stat);
873 if (ret)
874 return false;
875
876 /* Remove output pins from the equation */
877 pca953x_read_regs(chip, chip->regs->direction, reg_direction);
878
879 bitmap_copy(old_stat, chip->irq_stat, gc->ngpio);
880
881 bitmap_and(new_stat, cur_stat, reg_direction, gc->ngpio);
882 bitmap_xor(cur_stat, new_stat, old_stat, gc->ngpio);
883 bitmap_and(trigger, cur_stat, chip->irq_mask, gc->ngpio);
884
885 bitmap_copy(chip->irq_stat, new_stat, gc->ngpio);
886
> 887 if (!chip->irq_trig_level_high && !chip->irq_trig_level_low) {
888 if (bitmap_empty(trigger, gc->ngpio))
889 return false;
890 }
891
892 bitmap_and(cur_stat, chip->irq_trig_fall, old_stat, gc->ngpio);
893 bitmap_and(old_stat, chip->irq_trig_raise, new_stat, gc->ngpio);
894 bitmap_or(edges, old_stat, cur_stat, gc->ngpio);
895 bitmap_and(pending, edges, trigger, gc->ngpio);
896
897 bitmap_and(cur_stat, new_stat, chip->irq_trig_level_high, gc->ngpio);
898 bitmap_and(cur_stat, cur_stat, chip->irq_mask, gc->ngpio);
899 bitmap_or(pending, pending, cur_stat, gc->ngpio);
900
901 bitmap_complement(cur_stat, new_stat, gc->ngpio);
902 bitmap_and(cur_stat, cur_stat, reg_direction, gc->ngpio);
903 bitmap_and(old_stat, cur_stat, chip->irq_trig_level_low, gc->ngpio);
904 bitmap_and(old_stat, old_stat, chip->irq_mask, gc->ngpio);
905 bitmap_or(pending, pending, old_stat, gc->ngpio);
906
907 return !bitmap_empty(pending, gc->ngpio);
908 }
909
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2025-03-18 4:52 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20250318-gpio-pca953x-level-triggered-irq-v1-1-0c4943d92425@gmail.com>]
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=202503181231.ZqKVm0Z8-lkp@intel.com \
--to=lkp@intel.com \
--cc=brgl@bgdev.pl \
--cc=cosmo.chou@quantatw.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=patrick@stwcx.xyz \
--cc=potin.lai.pt@gmail.com \
--cc=potin.lai@quantatw.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