linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Lee Jones <lee.jones@linaro.org>
Subject: drivers/rtc/rtc-ntxec.c:91:53: sparse: sparse: incorrect type in initializer (different base types)
Date: Sat, 13 Nov 2021 01:45:32 +0800	[thread overview]
Message-ID: <202111130119.5K2T1JoO-lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-11-12 17:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 17:45 kernel test robot [this message]
2021-11-14 20:36 drivers/rtc/rtc-ntxec.c:91:53: sparse: sparse: incorrect type in initializer (different base types) kernel test robot

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=202111130119.5K2T1JoO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=j.neuschaefer@gmx.net \
    --cc=kbuild-all@lists.01.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.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 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).