All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>,
	linux-kernel@vger.kernel.org, jic23@kernel.org, lars@metafoo.de,
	linux-iio@vger.kernel.org, git@xilinx.com,
	michal.simek@xilinx.com, gregkh@linuxfoundation.org,
	rafael@kernel.org, linux-acpi@vger.kernel.org,
	andriy.shevchenko@linux.intel.com
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH v10 3/5] iio: adc: Add Xilinx AMS driver
Date: Fri, 19 Nov 2021 06:25:25 +0800	[thread overview]
Message-ID: <202111190648.nmBpiRhf-lkp@intel.com> (raw)
In-Reply-To: <20211117161028.11775-4-anand.ashok.dumbre@xilinx.com>

[-- Attachment #1: Type: text/plain, Size: 14550 bytes --]

Hi Anand,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linux/master linus/master v5.16-rc1 next-20211118]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20211118-001150
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: arc-randconfig-r035-20211118 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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
        # https://github.com/0day-ci/linux/commit/196a4a5b4232a4a12d0843a0002b664720b5d200
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20211118-001150
        git checkout 196a4a5b4232a4a12d0843a0002b664720b5d200
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

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

All error/warnings (new ones prefixed by >>):

   drivers/iio/adc/xilinx-ams.c: In function 'ams_update_intrmask':
>> drivers/iio/adc/xilinx-ams.c:323:20: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
     323 |         regval = ~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask));
         |                    ^~~~~~~~~
   In file included from drivers/iio/adc/xilinx-ams.c:11:
>> include/linux/bits.h:35:29: warning: left shift count >= width of type [-Wshift-count-overflow]
      35 |         (((~UL(0)) - (UL(1) << (l)) + 1) & \
         |                             ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:131:41: note: in expansion of macro 'GENMASK'
     131 | #define AMS_ISR1_INTR_MASK              GENMASK(63, 32)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:323:30: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
     323 |         regval = ~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask));
         |                              ^~~~~~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:131:41: note: in expansion of macro 'GENMASK'
     131 | #define AMS_ISR1_INTR_MASK              GENMASK(63, 32)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:323:30: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
     323 |         regval = ~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask));
         |                              ^~~~~~~~~~~~~~~~~~
>> include/linux/bits.h:35:29: warning: left shift count >= width of type [-Wshift-count-overflow]
      35 |         (((~UL(0)) - (UL(1) << (l)) + 1) & \
         |                             ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:131:41: note: in expansion of macro 'GENMASK'
     131 | #define AMS_ISR1_INTR_MASK              GENMASK(63, 32)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:329:28: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
     329 |         regval = FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask);
         |                            ^~~~~~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:131:41: note: in expansion of macro 'GENMASK'
     131 | #define AMS_ISR1_INTR_MASK              GENMASK(63, 32)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:329:28: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
     329 |         regval = FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask);
         |                            ^~~~~~~~~~~~~~~~~~
   drivers/iio/adc/xilinx-ams.c: In function 'ams_update_ps_alarm':
>> drivers/iio/adc/xilinx-ams.c:360:17: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
     360 |         cfg = ~(FIELD_PREP(AMS_CONF1_ALARM_2_TO_0_MASK, val));
         |                 ^~~~~~~~~~
   In file included from drivers/iio/adc/xilinx-ams.c:11:
   drivers/iio/adc/xilinx-ams.c: In function 'ams_enable_channel_sequence':
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:102:41: note: in expansion of macro 'GENMASK'
     102 | #define AMS_PL_SEQ_MASK                 GENMASK(59, 22)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:448:39: note: in expansion of macro 'AMS_PL_SEQ_MASK'
     448 |                 scan_mask = FIELD_GET(AMS_PL_SEQ_MASK, scan_mask);
         |                                       ^~~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:99:41: note: in expansion of macro 'GENMASK'
      99 | #define AMS_REG_SEQ1_MASK               GENMASK(37, 22)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:453:36: note: in expansion of macro 'AMS_REG_SEQ1_MASK'
     453 |                 regval = FIELD_GET(AMS_REG_SEQ1_MASK, scan_mask);
         |                                    ^~~~~~~~~~~~~~~~~
   drivers/iio/adc/xilinx-ams.c: In function 'ams_init_device':
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:501:34: note: in expansion of macro 'AMS_ALARM_MASK'
     501 |         ams_update_intrmask(ams, AMS_ALARM_MASK, AMS_ALARM_MASK);
         |                                  ^~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:501:50: note: in expansion of macro 'AMS_ALARM_MASK'
     501 |         ams_update_intrmask(ams, AMS_ALARM_MASK, AMS_ALARM_MASK);
         |                                                  ^~~~~~~~~~~~~~
   drivers/iio/adc/xilinx-ams.c: In function 'ams_unmask_worker':
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:1017:35: note: in expansion of macro 'AMS_ALARM_MASK'
    1017 |         ams_update_intrmask(ams, ~AMS_ALARM_MASK, ~AMS_ALARM_MASK);
         |                                   ^~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:1017:52: note: in expansion of macro 'AMS_ALARM_MASK'
    1017 |         ams_update_intrmask(ams, ~AMS_ALARM_MASK, ~AMS_ALARM_MASK);
         |                                                    ^~~~~~~~~~~~~~
   drivers/iio/adc/xilinx-ams.c: In function 'ams_irq':
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:1049:35: note: in expansion of macro 'AMS_ALARM_MASK'
    1049 |         ams_update_intrmask(ams, ~AMS_ALARM_MASK, ~AMS_ALARM_MASK);
         |                                   ^~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:1049:52: note: in expansion of macro 'AMS_ALARM_MASK'
    1049 |         ams_update_intrmask(ams, ~AMS_ALARM_MASK, ~AMS_ALARM_MASK);
         |                                                    ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/FIELD_GET +323 drivers/iio/adc/xilinx-ams.c

   313	
   314	static void ams_update_intrmask(struct ams *ams, u64 mask, u64 val)
   315	{
   316		u32 regval;
   317	
   318		ams->intr_mask = (ams->intr_mask & ~mask) | (val & mask);
   319	
   320		regval = ~(ams->intr_mask | ams->masked_alarm);
   321		writel(regval, ams->base + AMS_IER_0);
   322	
 > 323		regval = ~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask));
   324		writel(regval, ams->base + AMS_IER_1);
   325	
   326		regval = ams->intr_mask | ams->masked_alarm;
   327		writel(regval, ams->base + AMS_IDR_0);
   328	
   329		regval = FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask);
   330		writel(regval, ams->base + AMS_IDR_1);
   331	}
   332	
   333	static void ams_disable_all_alarms(struct ams *ams)
   334	{
   335		/* disable PS module alarm */
   336		if (ams->ps_base) {
   337			ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_REGCFG1_ALARM_MASK,
   338					  AMS_REGCFG1_ALARM_MASK);
   339			ams_ps_update_reg(ams, AMS_REG_CONFIG3, AMS_REGCFG3_ALARM_MASK,
   340					  AMS_REGCFG3_ALARM_MASK);
   341		}
   342	
   343		/* disable PL module alarm */
   344		if (ams->pl_base) {
   345			ams_pl_update_reg(ams, AMS_REG_CONFIG1,
   346					  AMS_REGCFG1_ALARM_MASK,
   347					  AMS_REGCFG1_ALARM_MASK);
   348			ams_pl_update_reg(ams, AMS_REG_CONFIG3,
   349					  AMS_REGCFG3_ALARM_MASK,
   350					  AMS_REGCFG3_ALARM_MASK);
   351		}
   352	}
   353	
   354	static void ams_update_ps_alarm(struct ams *ams, unsigned long alarm_mask)
   355	{
   356		u32 cfg;
   357		u32 val;
   358	
   359		val = FIELD_GET(AMS_ISR0_ALARM_2_TO_0_MASK, alarm_mask);
 > 360		cfg = ~(FIELD_PREP(AMS_CONF1_ALARM_2_TO_0_MASK, val));
   361	
   362		val = FIELD_GET(AMS_ISR0_ALARM_6_TO_3_MASK, alarm_mask);
   363		cfg &= ~(FIELD_PREP(AMS_CONF1_ALARM_6_TO_3_MASK, val));
   364	
   365		ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_REGCFG1_ALARM_MASK, cfg);
   366	
   367		val = FIELD_GET(AMS_ISR0_ALARM_12_TO_7_MASK, alarm_mask);
   368		cfg = ~(FIELD_PREP(AMS_CONF1_ALARM_12_TO_7_MASK, val));
   369		ams_ps_update_reg(ams, AMS_REG_CONFIG3, AMS_REGCFG3_ALARM_MASK, cfg);
   370	}
   371	

---
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: 42140 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v10 3/5] iio: adc: Add Xilinx AMS driver
Date: Fri, 19 Nov 2021 06:25:25 +0800	[thread overview]
Message-ID: <202111190648.nmBpiRhf-lkp@intel.com> (raw)
In-Reply-To: <20211117161028.11775-4-anand.ashok.dumbre@xilinx.com>

[-- Attachment #1: Type: text/plain, Size: 14808 bytes --]

Hi Anand,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linux/master linus/master v5.16-rc1 next-20211118]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20211118-001150
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: arc-randconfig-r035-20211118 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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
        # https://github.com/0day-ci/linux/commit/196a4a5b4232a4a12d0843a0002b664720b5d200
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20211118-001150
        git checkout 196a4a5b4232a4a12d0843a0002b664720b5d200
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

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

All error/warnings (new ones prefixed by >>):

   drivers/iio/adc/xilinx-ams.c: In function 'ams_update_intrmask':
>> drivers/iio/adc/xilinx-ams.c:323:20: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
     323 |         regval = ~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask));
         |                    ^~~~~~~~~
   In file included from drivers/iio/adc/xilinx-ams.c:11:
>> include/linux/bits.h:35:29: warning: left shift count >= width of type [-Wshift-count-overflow]
      35 |         (((~UL(0)) - (UL(1) << (l)) + 1) & \
         |                             ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:131:41: note: in expansion of macro 'GENMASK'
     131 | #define AMS_ISR1_INTR_MASK              GENMASK(63, 32)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:323:30: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
     323 |         regval = ~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask));
         |                              ^~~~~~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:131:41: note: in expansion of macro 'GENMASK'
     131 | #define AMS_ISR1_INTR_MASK              GENMASK(63, 32)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:323:30: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
     323 |         regval = ~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask));
         |                              ^~~~~~~~~~~~~~~~~~
>> include/linux/bits.h:35:29: warning: left shift count >= width of type [-Wshift-count-overflow]
      35 |         (((~UL(0)) - (UL(1) << (l)) + 1) & \
         |                             ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:131:41: note: in expansion of macro 'GENMASK'
     131 | #define AMS_ISR1_INTR_MASK              GENMASK(63, 32)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:329:28: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
     329 |         regval = FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask);
         |                            ^~~~~~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:131:41: note: in expansion of macro 'GENMASK'
     131 | #define AMS_ISR1_INTR_MASK              GENMASK(63, 32)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:329:28: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
     329 |         regval = FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask);
         |                            ^~~~~~~~~~~~~~~~~~
   drivers/iio/adc/xilinx-ams.c: In function 'ams_update_ps_alarm':
>> drivers/iio/adc/xilinx-ams.c:360:17: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
     360 |         cfg = ~(FIELD_PREP(AMS_CONF1_ALARM_2_TO_0_MASK, val));
         |                 ^~~~~~~~~~
   In file included from drivers/iio/adc/xilinx-ams.c:11:
   drivers/iio/adc/xilinx-ams.c: In function 'ams_enable_channel_sequence':
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:102:41: note: in expansion of macro 'GENMASK'
     102 | #define AMS_PL_SEQ_MASK                 GENMASK(59, 22)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:448:39: note: in expansion of macro 'AMS_PL_SEQ_MASK'
     448 |                 scan_mask = FIELD_GET(AMS_PL_SEQ_MASK, scan_mask);
         |                                       ^~~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:99:41: note: in expansion of macro 'GENMASK'
      99 | #define AMS_REG_SEQ1_MASK               GENMASK(37, 22)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:453:36: note: in expansion of macro 'AMS_REG_SEQ1_MASK'
     453 |                 regval = FIELD_GET(AMS_REG_SEQ1_MASK, scan_mask);
         |                                    ^~~~~~~~~~~~~~~~~
   drivers/iio/adc/xilinx-ams.c: In function 'ams_init_device':
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:501:34: note: in expansion of macro 'AMS_ALARM_MASK'
     501 |         ams_update_intrmask(ams, AMS_ALARM_MASK, AMS_ALARM_MASK);
         |                                  ^~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:501:50: note: in expansion of macro 'AMS_ALARM_MASK'
     501 |         ams_update_intrmask(ams, AMS_ALARM_MASK, AMS_ALARM_MASK);
         |                                                  ^~~~~~~~~~~~~~
   drivers/iio/adc/xilinx-ams.c: In function 'ams_unmask_worker':
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:1017:35: note: in expansion of macro 'AMS_ALARM_MASK'
    1017 |         ams_update_intrmask(ams, ~AMS_ALARM_MASK, ~AMS_ALARM_MASK);
         |                                   ^~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:1017:52: note: in expansion of macro 'AMS_ALARM_MASK'
    1017 |         ams_update_intrmask(ams, ~AMS_ALARM_MASK, ~AMS_ALARM_MASK);
         |                                                    ^~~~~~~~~~~~~~
   drivers/iio/adc/xilinx-ams.c: In function 'ams_irq':
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:1049:35: note: in expansion of macro 'AMS_ALARM_MASK'
    1049 |         ams_update_intrmask(ams, ~AMS_ALARM_MASK, ~AMS_ALARM_MASK);
         |                                   ^~~~~~~~~~~~~~
>> include/linux/bits.h:36:18: warning: right shift count is negative [-Wshift-count-negative]
      36 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
      38 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/iio/adc/xilinx-ams.c:124:41: note: in expansion of macro 'GENMASK'
     124 | #define AMS_ALARM_MASK                  GENMASK(63, 0)
         |                                         ^~~~~~~
   drivers/iio/adc/xilinx-ams.c:1049:52: note: in expansion of macro 'AMS_ALARM_MASK'
    1049 |         ams_update_intrmask(ams, ~AMS_ALARM_MASK, ~AMS_ALARM_MASK);
         |                                                    ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/FIELD_GET +323 drivers/iio/adc/xilinx-ams.c

   313	
   314	static void ams_update_intrmask(struct ams *ams, u64 mask, u64 val)
   315	{
   316		u32 regval;
   317	
   318		ams->intr_mask = (ams->intr_mask & ~mask) | (val & mask);
   319	
   320		regval = ~(ams->intr_mask | ams->masked_alarm);
   321		writel(regval, ams->base + AMS_IER_0);
   322	
 > 323		regval = ~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask));
   324		writel(regval, ams->base + AMS_IER_1);
   325	
   326		regval = ams->intr_mask | ams->masked_alarm;
   327		writel(regval, ams->base + AMS_IDR_0);
   328	
   329		regval = FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask);
   330		writel(regval, ams->base + AMS_IDR_1);
   331	}
   332	
   333	static void ams_disable_all_alarms(struct ams *ams)
   334	{
   335		/* disable PS module alarm */
   336		if (ams->ps_base) {
   337			ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_REGCFG1_ALARM_MASK,
   338					  AMS_REGCFG1_ALARM_MASK);
   339			ams_ps_update_reg(ams, AMS_REG_CONFIG3, AMS_REGCFG3_ALARM_MASK,
   340					  AMS_REGCFG3_ALARM_MASK);
   341		}
   342	
   343		/* disable PL module alarm */
   344		if (ams->pl_base) {
   345			ams_pl_update_reg(ams, AMS_REG_CONFIG1,
   346					  AMS_REGCFG1_ALARM_MASK,
   347					  AMS_REGCFG1_ALARM_MASK);
   348			ams_pl_update_reg(ams, AMS_REG_CONFIG3,
   349					  AMS_REGCFG3_ALARM_MASK,
   350					  AMS_REGCFG3_ALARM_MASK);
   351		}
   352	}
   353	
   354	static void ams_update_ps_alarm(struct ams *ams, unsigned long alarm_mask)
   355	{
   356		u32 cfg;
   357		u32 val;
   358	
   359		val = FIELD_GET(AMS_ISR0_ALARM_2_TO_0_MASK, alarm_mask);
 > 360		cfg = ~(FIELD_PREP(AMS_CONF1_ALARM_2_TO_0_MASK, val));
   361	
   362		val = FIELD_GET(AMS_ISR0_ALARM_6_TO_3_MASK, alarm_mask);
   363		cfg &= ~(FIELD_PREP(AMS_CONF1_ALARM_6_TO_3_MASK, val));
   364	
   365		ams_ps_update_reg(ams, AMS_REG_CONFIG1, AMS_REGCFG1_ALARM_MASK, cfg);
   366	
   367		val = FIELD_GET(AMS_ISR0_ALARM_12_TO_7_MASK, alarm_mask);
   368		cfg = ~(FIELD_PREP(AMS_CONF1_ALARM_12_TO_7_MASK, val));
   369		ams_ps_update_reg(ams, AMS_REG_CONFIG3, AMS_REGCFG3_ALARM_MASK, cfg);
   370	}
   371	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42140 bytes --]

  parent reply	other threads:[~2021-11-18 22:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 16:10 [PATCH v10 0/5] Add Xilinx AMS Driver Anand Ashok Dumbre
2021-11-17 16:10 ` [PATCH v10 1/5] device property: Add fwnode_iomap() Anand Ashok Dumbre
2021-11-17 16:10 ` [PATCH v10 2/5] arm64: zynqmp: DT: Add Xilinx AMS node Anand Ashok Dumbre
2021-11-17 16:10 ` [PATCH v10 3/5] iio: adc: Add Xilinx AMS driver Anand Ashok Dumbre
2021-11-17 19:01   ` kernel test robot
2021-11-17 19:01     ` kernel test robot
2021-11-17 20:03   ` Andy Shevchenko
2021-11-18  8:07     ` Michal Simek
2021-11-18 14:14     ` Anand Ashok Dumbre
2021-11-18 15:42       ` Andy Shevchenko
2021-11-21 12:29         ` Anand Ashok Dumbre
2021-11-18 22:25   ` kernel test robot [this message]
2021-11-18 22:25     ` kernel test robot
2021-11-20 16:54   ` Jonathan Cameron
2021-11-21 11:27     ` Anand Ashok Dumbre
2021-11-17 16:10 ` [PATCH v10 4/5] dt-bindings: iio: adc: Add Xilinx AMS binding documentation Anand Ashok Dumbre
2021-11-17 16:10 ` [PATCH v10 5/5] MAINTAINERS: Add maintainer for xilinx-ams Anand Ashok Dumbre
2021-11-17 17:13 ` [PATCH v10 0/5] Add Xilinx AMS Driver Andy Shevchenko
2021-11-18 15:03   ` Anand Ashok Dumbre

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=202111190648.nmBpiRhf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anand.ashok.dumbre@xilinx.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=git@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lars@metafoo.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=rafael@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.