lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202509210436.v24lwANK-lkp@intel.com>
Date: Sun, 21 Sep 2025 04:49:08 +0800
From: kernel test robot <lkp@...el.com>
To: Kamal Wadhwa <kamal.wadhwa@....qualcomm.com>,
	Stephen Boyd <sboyd@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org, linux-gpio@...r.kernel.org,
	Kamal Wadhwa <kamal.wadhwa@....qualcomm.com>,
	Jishnu Prakash <jishnu.prakash@....qualcomm.com>,
	David Collins <david.collins@....qualcomm.com>
Subject: Re: [PATCH 1/3] spmi: spmi-pmic-arb: add support for PMIC arbiter v8

Hi Kamal,

kernel test robot noticed the following build errors:

[auto build test ERROR on c3067c2c38316c3ef013636c93daa285ee6aaa2e]

url:    https://github.com/intel-lab-lkp/linux/commits/Kamal-Wadhwa/spmi-spmi-pmic-arb-add-support-for-PMIC-arbiter-v8/20250920-040410
base:   c3067c2c38316c3ef013636c93daa285ee6aaa2e
patch link:    https://lore.kernel.org/r/20250920-glymur-spmi-v8-gpio-driver-v1-1-23df93b7818a%40oss.qualcomm.com
patch subject: [PATCH 1/3] spmi: spmi-pmic-arb: add support for PMIC arbiter v8
config: nios2-randconfig-001-20250921 (https://download.01.org/0day-ci/archive/20250921/202509210436.v24lwANK-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250921/202509210436.v24lwANK-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509210436.v24lwANK-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/spmi/spmi-pmic-arb.c: In function 'qpnpint_spmi_write':
>> drivers/spmi/spmi-pmic-arb.c:129:30: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
    #define hwirq_to_sid(hwirq)  FIELD_GET(GENMASK(32, 28), (hwirq))
                                 ^~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c:620:11: note: in expansion of macro 'hwirq_to_sid'
     u8 sid = hwirq_to_sid(d->hwirq);
              ^~~~~~~~~~~~
   In file included from include/linux/bitops.h:6,
                    from include/linux/bitmap.h:8,
                    from drivers/spmi/spmi-pmic-arb.c:5:
   include/linux/bits.h:49:20: warning: right shift count >= width of type [-Wshift-count-overflow]
           type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
                       ^~
   include/linux/bits.h:51:24: note: in expansion of macro 'GENMASK_TYPE'
    #define GENMASK(h, l)  GENMASK_TYPE(unsigned long, h, l)
                           ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c:129:40: note: in expansion of macro 'GENMASK'
    #define hwirq_to_sid(hwirq)  FIELD_GET(GENMASK(32, 28), (hwirq))
                                           ^~~~~~~
   drivers/spmi/spmi-pmic-arb.c:620:11: note: in expansion of macro 'hwirq_to_sid'
     u8 sid = hwirq_to_sid(d->hwirq);
              ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c: In function 'qpnpint_spmi_read':
   include/linux/bits.h:49:20: warning: right shift count >= width of type [-Wshift-count-overflow]
           type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
                       ^~
   include/linux/bits.h:51:24: note: in expansion of macro 'GENMASK_TYPE'
    #define GENMASK(h, l)  GENMASK_TYPE(unsigned long, h, l)
                           ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c:129:40: note: in expansion of macro 'GENMASK'
    #define hwirq_to_sid(hwirq)  FIELD_GET(GENMASK(32, 28), (hwirq))
                                           ^~~~~~~
   drivers/spmi/spmi-pmic-arb.c:632:11: note: in expansion of macro 'hwirq_to_sid'
     u8 sid = hwirq_to_sid(d->hwirq);
              ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c: In function 'qpnpint_spmi_masked_write':
   include/linux/bits.h:49:20: warning: right shift count >= width of type [-Wshift-count-overflow]
           type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
                       ^~
   include/linux/bits.h:51:24: note: in expansion of macro 'GENMASK_TYPE'
    #define GENMASK(h, l)  GENMASK_TYPE(unsigned long, h, l)
                           ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c:129:40: note: in expansion of macro 'GENMASK'
    #define hwirq_to_sid(hwirq)  FIELD_GET(GENMASK(32, 28), (hwirq))
                                           ^~~~~~~
   drivers/spmi/spmi-pmic-arb.c:646:11: note: in expansion of macro 'hwirq_to_sid'
     u8 sid = hwirq_to_sid(d->hwirq);
              ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c: In function 'periph_interrupt':
>> drivers/spmi/spmi-pmic-arb.c:124:3: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
     (FIELD_PREP(GENMASK(32, 28), (slave_id))  | \
      ^~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c:685:12: note: in expansion of macro 'spec_to_hwirq'
               spec_to_hwirq(sid, per, id, apid));
               ^~~~~~~~~~~~~
   In file included from include/linux/bitops.h:6,
                    from include/linux/bitmap.h:8,
                    from drivers/spmi/spmi-pmic-arb.c:5:
   include/linux/bits.h:49:20: warning: right shift count >= width of type [-Wshift-count-overflow]
           type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
                       ^~
   include/linux/bits.h:51:24: note: in expansion of macro 'GENMASK_TYPE'
    #define GENMASK(h, l)  GENMASK_TYPE(unsigned long, h, l)
                           ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c:124:14: note: in expansion of macro 'GENMASK'
     (FIELD_PREP(GENMASK(32, 28), (slave_id))  | \
                 ^~~~~~~
   drivers/spmi/spmi-pmic-arb.c:685:12: note: in expansion of macro 'spec_to_hwirq'
               spec_to_hwirq(sid, per, id, apid));
               ^~~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c: In function 'qpnpint_irq_domain_activate':
   include/linux/bits.h:49:20: warning: right shift count >= width of type [-Wshift-count-overflow]
           type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
                       ^~
   include/linux/bits.h:51:24: note: in expansion of macro 'GENMASK_TYPE'
    #define GENMASK(h, l)  GENMASK_TYPE(unsigned long, h, l)
                           ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c:129:40: note: in expansion of macro 'GENMASK'
    #define hwirq_to_sid(hwirq)  FIELD_GET(GENMASK(32, 28), (hwirq))
                                           ^~~~~~~
   drivers/spmi/spmi-pmic-arb.c:887:12: note: in expansion of macro 'hwirq_to_sid'
     u16 sid = hwirq_to_sid(d->hwirq);
               ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c: In function 'qpnpint_irq_domain_translate':
   include/linux/bits.h:49:20: warning: right shift count >= width of type [-Wshift-count-overflow]
           type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
                       ^~
   include/linux/bits.h:51:24: note: in expansion of macro 'GENMASK_TYPE'
    #define GENMASK(h, l)  GENMASK_TYPE(unsigned long, h, l)
                           ^~~~~~~~~~~~
   drivers/spmi/spmi-pmic-arb.c:124:14: note: in expansion of macro 'GENMASK'
     (FIELD_PREP(GENMASK(32, 28), (slave_id))  | \
                 ^~~~~~~
   drivers/spmi/spmi-pmic-arb.c:952:15: note: in expansion of macro 'spec_to_hwirq'
     *out_hwirq = spec_to_hwirq(intspec[0], intspec[1], intspec[2], apid);
                  ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/FIELD_GET +129 drivers/spmi/spmi-pmic-arb.c

   118	
   119	/*
   120	 * hwirq value crosses 32 bits only for platforms with more than 16 PMICs,
   121	 * none of which happen to support booting Linux in 32-bit mode.
   122	 */
   123	#define spec_to_hwirq(slave_id, periph_id, irq_id, apid) \
 > 124		(FIELD_PREP(GENMASK(32, 28), (slave_id))  | \
   125		FIELD_PREP(GENMASK(27, 20), (periph_id)) | \
   126		FIELD_PREP(GENMASK(18, 16), (irq_id))    | \
   127		FIELD_PREP(GENMASK(12, 0),  (apid)))
   128	
 > 129	#define hwirq_to_sid(hwirq)  FIELD_GET(GENMASK(32, 28), (hwirq))
   130	#define hwirq_to_per(hwirq)  FIELD_GET(GENMASK(27, 20), (hwirq))
   131	#define hwirq_to_irq(hwirq)  FIELD_GET(GENMASK(18, 16), (hwirq))
   132	#define hwirq_to_apid(hwirq) FIELD_GET(GENMASK(12, 0), (hwirq))
   133	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ