linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/rtc/rtc-ntxec.c:91:53: sparse: sparse: incorrect type in initializer (different base types)
@ 2021-11-14 20:36 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-14 20:36 UTC (permalink / raw)
  To: Jonathan Neuschäfer; +Cc: kbuild-all, linux-kernel, Lee Jones

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c8c109546a19613d323a319d0c921cb1f317e629
commit: 435af89786c674583b188f7322fee5c03894b8b7 rtc: New driver for RTC in Netronix embedded controller
date:   8 months ago
config: riscv-randconfig-s031-20211109 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=435af89786c674583b188f7322fee5c03894b8b7
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 435af89786c674583b188f7322fee5c03894b8b7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash block/ drivers/hid/ drivers/i2c/busses/ drivers/message/fusion/ drivers/net/ethernet/ drivers/net/wireless/intel/iwlwifi/ drivers/pci/ drivers/remoteproc/ drivers/rtc/ drivers/staging/rts5208/ drivers/staging/vc04_services/ drivers/vdpa/ drivers/video/fbdev/ net/qrtr/ net/sched/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/rtc/rtc-ntxec.c:91:53: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:91:53: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:91:53: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:92:51: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:92:51: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:92:51: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:93:52: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:93:52: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:93:52: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:94:50: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:94:50: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:94:50: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:95:51: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:95:51: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:95:51: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:96:53: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:96:53: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:96:53: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:97:53: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:97:53: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:97:53: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c: note: in included file:
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int

vim +91 drivers/rtc/rtc-ntxec.c

    78	
    79	static int ntxec_set_time(struct device *dev, struct rtc_time *tm)
    80	{
    81		struct ntxec_rtc *rtc = dev_get_drvdata(dev);
    82	
    83		/*
    84		 * To avoid time overflows while we're writing the full date/time,
    85		 * set the seconds field to zero before doing anything else. For the
    86		 * next 59 seconds (plus however long it takes until the RTC's next
    87		 * update of the second field), the seconds field will not overflow
    88		 * into the other fields.
    89		 */
    90		struct reg_sequence regs[] = {
  > 91			{ NTXEC_REG_WRITE_SECOND, ntxec_reg8(0) },
    92			{ NTXEC_REG_WRITE_YEAR, ntxec_reg8(tm->tm_year - 100) },
    93			{ NTXEC_REG_WRITE_MONTH, ntxec_reg8(tm->tm_mon + 1) },
    94			{ NTXEC_REG_WRITE_DAY, ntxec_reg8(tm->tm_mday) },
    95			{ NTXEC_REG_WRITE_HOUR, ntxec_reg8(tm->tm_hour) },
    96			{ NTXEC_REG_WRITE_MINUTE, ntxec_reg8(tm->tm_min) },
    97			{ NTXEC_REG_WRITE_SECOND, ntxec_reg8(tm->tm_sec) },
    98		};
    99	
   100		return regmap_multi_reg_write(rtc->ec->regmap, regs, ARRAY_SIZE(regs));
   101	}
   102	

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

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

* drivers/rtc/rtc-ntxec.c:91:53: sparse: sparse: incorrect type in initializer (different base types)
@ 2021-11-12 17:45 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-12 17:45 UTC (permalink / raw)
  To: Jonathan Neuschäfer; +Cc: kbuild-all, linux-kernel, Lee Jones

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5833291ab6de9c3e2374336b51c814e515e8f3a5
commit: 435af89786c674583b188f7322fee5c03894b8b7 rtc: New driver for RTC in Netronix embedded controller
date:   8 months ago
config: riscv-randconfig-s031-20211109 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=435af89786c674583b188f7322fee5c03894b8b7
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 435af89786c674583b188f7322fee5c03894b8b7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash block/ drivers/hid/ drivers/i2c/busses/ drivers/message/fusion/ drivers/net/ethernet/ drivers/net/wireless/intel/iwlwifi/ drivers/pci/ drivers/remoteproc/ drivers/rtc/ drivers/staging/rts5208/ drivers/staging/vc04_services/ drivers/vdpa/ drivers/video/fbdev/ net/qrtr/ net/sched/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/rtc/rtc-ntxec.c:91:53: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:91:53: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:91:53: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:92:51: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:92:51: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:92:51: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:93:52: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:93:52: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:93:52: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:94:50: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:94:50: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:94:50: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:95:51: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:95:51: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:95:51: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:96:53: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:96:53: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:96:53: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c:97:53: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int def @@     got restricted __be16 @@
   drivers/rtc/rtc-ntxec.c:97:53: sparse:     expected unsigned int def
   drivers/rtc/rtc-ntxec.c:97:53: sparse:     got restricted __be16
   drivers/rtc/rtc-ntxec.c: note: in included file:
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int
   include/linux/mfd/ntxec.h:31:22: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be16 @@     got int @@
   include/linux/mfd/ntxec.h:31:22: sparse:     expected restricted __be16
   include/linux/mfd/ntxec.h:31:22: sparse:     got int

vim +91 drivers/rtc/rtc-ntxec.c

    78	
    79	static int ntxec_set_time(struct device *dev, struct rtc_time *tm)
    80	{
    81		struct ntxec_rtc *rtc = dev_get_drvdata(dev);
    82	
    83		/*
    84		 * To avoid time overflows while we're writing the full date/time,
    85		 * set the seconds field to zero before doing anything else. For the
    86		 * next 59 seconds (plus however long it takes until the RTC's next
    87		 * update of the second field), the seconds field will not overflow
    88		 * into the other fields.
    89		 */
    90		struct reg_sequence regs[] = {
  > 91			{ NTXEC_REG_WRITE_SECOND, ntxec_reg8(0) },
    92			{ NTXEC_REG_WRITE_YEAR, ntxec_reg8(tm->tm_year - 100) },
    93			{ NTXEC_REG_WRITE_MONTH, ntxec_reg8(tm->tm_mon + 1) },
    94			{ NTXEC_REG_WRITE_DAY, ntxec_reg8(tm->tm_mday) },
    95			{ NTXEC_REG_WRITE_HOUR, ntxec_reg8(tm->tm_hour) },
    96			{ NTXEC_REG_WRITE_MINUTE, ntxec_reg8(tm->tm_min) },
    97			{ NTXEC_REG_WRITE_SECOND, ntxec_reg8(tm->tm_sec) },
    98		};
    99	
   100		return regmap_multi_reg_write(rtc->ec->regmap, regs, ARRAY_SIZE(regs));
   101	}
   102	

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

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

end of thread, other threads:[~2021-11-14 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14 20:36 drivers/rtc/rtc-ntxec.c:91:53: sparse: sparse: incorrect type in initializer (different base types) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-11-12 17:45 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).