All of lore.kernel.org
 help / color / mirror / Atom feed
* [xlnx:xlnx_rebase_v5.4 1116/1704] drivers/gpio/gpio-xilinx.c:377:12: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744071562067967' to '2147483647'
@ 2021-04-07 16:04 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-04-07 16:04 UTC (permalink / raw)
  To: Srinivas Neeli; +Cc: kbuild-all, linux-arm-kernel, Michal Simek

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

Hi Srinivas,

FYI, the error/warning still remains.

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   914337937cb6a106a2942347d8c8feacd2223299
commit: 256f37f6020654ff3d8044852f75542882301a26 [1116/1704] gpio: xilinx: Add irq support to the driver
config: alpha-randconfig-r012-20210407 (attached as .config)
compiler: alpha-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
        # https://github.com/Xilinx/linux-xlnx/commit/256f37f6020654ff3d8044852f75542882301a26
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx xlnx_rebase_v5.4
        git checkout 256f37f6020654ff3d8044852f75542882301a26
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

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

All warnings (new ones prefixed by >>):

   drivers/gpio/gpio-xilinx.c: In function 'xgpio_irq_mask':
>> drivers/gpio/gpio-xilinx.c:377:12: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744071562067967' to '2147483647' [-Woverflow]
     377 |            ~XGPIO_GIER_IE);
   drivers/gpio/gpio-xilinx.c:42:51: note: in definition of macro 'xgpio_writereg'
      42 | # define xgpio_writereg(offset, val) __raw_writel(val, offset)
         |                                                   ^~~
   drivers/gpio/gpio-xilinx.c: In function 'xgpio_irqhandler':
   drivers/gpio/gpio-xilinx.c:472:14: warning: variable 'status' set but not used [-Wunused-but-set-variable]
     472 |  u32 offset, status, channel = 1;
         |              ^~~~~~


vim +377 drivers/gpio/gpio-xilinx.c

   342	
   343	/**
   344	 * xgpiops_irq_mask - Write the specified signal of the GPIO device.
   345	 * @irq_data: per irq and chip data passed down to chip functions
   346	 */
   347	static void xgpio_irq_mask(struct irq_data *irq_data)
   348	{
   349		unsigned long flags;
   350		struct xgpio_instance *chip = irq_data_get_irq_chip_data(irq_data);
   351		u32 offset = irq_data->irq - chip->irq_base;
   352		u32 temp;
   353		s32 val;
   354		int index = xgpio_index(chip, 0);
   355	
   356		pr_debug("%s: Disable %d irq, irq_enable_mask 0x%x\n",
   357			 __func__, offset, chip->irq_enable);
   358	
   359		spin_lock_irqsave(&chip->gpio_lock[index], flags);
   360	
   361		chip->irq_enable &= ~BIT(offset);
   362	
   363		if (!chip->irq_enable) {
   364			/* Enable per channel interrupt */
   365			temp = xgpio_readreg(chip->regs + XGPIO_IPIER_OFFSET);
   366			val = offset - chip->gpio_width[0] + 1;
   367			if (val > 0)
   368				temp &= 1;
   369			else
   370				temp &= 2;
   371			xgpio_writereg(chip->regs + XGPIO_IPIER_OFFSET, temp);
   372	
   373			/* Disable global interrupt if channel interrupts are unused */
   374			temp = xgpio_readreg(chip->regs + XGPIO_IPIER_OFFSET);
   375			if (!temp)
   376				xgpio_writereg(chip->regs + XGPIO_GIER_OFFSET,
 > 377					       ~XGPIO_GIER_IE);
   378		}
   379		spin_unlock_irqrestore(&chip->gpio_lock[index], flags);
   380	}
   381	

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

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [xlnx:xlnx_rebase_v5.4 1116/1704] drivers/gpio/gpio-xilinx.c:377:12: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744071562067967' to '2147483647'
@ 2021-04-07 16:04 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-04-07 16:04 UTC (permalink / raw)
  To: kbuild-all

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

Hi Srinivas,

FYI, the error/warning still remains.

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   914337937cb6a106a2942347d8c8feacd2223299
commit: 256f37f6020654ff3d8044852f75542882301a26 [1116/1704] gpio: xilinx: Add irq support to the driver
config: alpha-randconfig-r012-20210407 (attached as .config)
compiler: alpha-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
        # https://github.com/Xilinx/linux-xlnx/commit/256f37f6020654ff3d8044852f75542882301a26
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx xlnx_rebase_v5.4
        git checkout 256f37f6020654ff3d8044852f75542882301a26
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

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

All warnings (new ones prefixed by >>):

   drivers/gpio/gpio-xilinx.c: In function 'xgpio_irq_mask':
>> drivers/gpio/gpio-xilinx.c:377:12: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744071562067967' to '2147483647' [-Woverflow]
     377 |            ~XGPIO_GIER_IE);
   drivers/gpio/gpio-xilinx.c:42:51: note: in definition of macro 'xgpio_writereg'
      42 | # define xgpio_writereg(offset, val) __raw_writel(val, offset)
         |                                                   ^~~
   drivers/gpio/gpio-xilinx.c: In function 'xgpio_irqhandler':
   drivers/gpio/gpio-xilinx.c:472:14: warning: variable 'status' set but not used [-Wunused-but-set-variable]
     472 |  u32 offset, status, channel = 1;
         |              ^~~~~~


vim +377 drivers/gpio/gpio-xilinx.c

   342	
   343	/**
   344	 * xgpiops_irq_mask - Write the specified signal of the GPIO device.
   345	 * @irq_data: per irq and chip data passed down to chip functions
   346	 */
   347	static void xgpio_irq_mask(struct irq_data *irq_data)
   348	{
   349		unsigned long flags;
   350		struct xgpio_instance *chip = irq_data_get_irq_chip_data(irq_data);
   351		u32 offset = irq_data->irq - chip->irq_base;
   352		u32 temp;
   353		s32 val;
   354		int index = xgpio_index(chip, 0);
   355	
   356		pr_debug("%s: Disable %d irq, irq_enable_mask 0x%x\n",
   357			 __func__, offset, chip->irq_enable);
   358	
   359		spin_lock_irqsave(&chip->gpio_lock[index], flags);
   360	
   361		chip->irq_enable &= ~BIT(offset);
   362	
   363		if (!chip->irq_enable) {
   364			/* Enable per channel interrupt */
   365			temp = xgpio_readreg(chip->regs + XGPIO_IPIER_OFFSET);
   366			val = offset - chip->gpio_width[0] + 1;
   367			if (val > 0)
   368				temp &= 1;
   369			else
   370				temp &= 2;
   371			xgpio_writereg(chip->regs + XGPIO_IPIER_OFFSET, temp);
   372	
   373			/* Disable global interrupt if channel interrupts are unused */
   374			temp = xgpio_readreg(chip->regs + XGPIO_IPIER_OFFSET);
   375			if (!temp)
   376				xgpio_writereg(chip->regs + XGPIO_GIER_OFFSET,
 > 377					       ~XGPIO_GIER_IE);
   378		}
   379		spin_unlock_irqrestore(&chip->gpio_lock[index], flags);
   380	}
   381	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-07 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 16:04 [xlnx:xlnx_rebase_v5.4 1116/1704] drivers/gpio/gpio-xilinx.c:377:12: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744071562067967' to '2147483647' kernel test robot
2021-04-07 16:04 ` kernel test robot

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.