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>] [day] [month] [year] [list]
Message-ID: <202111150443.vNvNM41W-lkp@intel.com>
Date:   Mon, 15 Nov 2021 04:36:49 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jonathan Neuschäfer <j.neuschaefer@....net>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Lee Jones <lee.jones@...aro.org>
Subject: drivers/rtc/rtc-ntxec.c:91:53: sparse: sparse: incorrect type in
 initializer (different base types)

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (40268 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ