From: kernel test robot <lkp@intel.com>
To: Maximilian Luz <luzmaximilian@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: drivers/power/supply/surface_charger.c:69:21: sparse: sparse: incorrect type in initializer (different base types)
Date: Tue, 11 May 2021 13:07:04 +0800 [thread overview]
Message-ID: <202105111357.pxMwMajI-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2778 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: e61ffb344591fca443be4fc633290cbf15ee3298 power: supply: Add AC driver for Surface Aggregator Module
date: 5 weeks ago
config: i386-randconfig-s032-20210511 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e61ffb344591fca443be4fc633290cbf15ee3298
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e61ffb344591fca443be4fc633290cbf15ee3298
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
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/power/supply/surface_charger.c:31:1: sparse: sparse: symbol '__raw_ssam_bat_get_sta' was not declared. Should it be static?
drivers/power/supply/surface_charger.c:31:1: sparse: sparse: symbol 'ssam_bat_get_sta' was not declared. Should it be static?
drivers/power/supply/surface_charger.c:37:1: sparse: sparse: symbol '__raw_ssam_bat_get_psrc' was not declared. Should it be static?
drivers/power/supply/surface_charger.c:37:1: sparse: sparse: symbol 'ssam_bat_get_psrc' was not declared. Should it be static?
>> drivers/power/supply/surface_charger.c:69:21: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] old @@ got restricted __le32 [usertype] state @@
drivers/power/supply/surface_charger.c:69:21: sparse: expected unsigned int [usertype] old
drivers/power/supply/surface_charger.c:69:21: sparse: got restricted __le32 [usertype] state
>> drivers/power/supply/surface_charger.c:78:25: sparse: sparse: restricted __le32 degrades to integer
drivers/power/supply/surface_charger.c:229:1: sparse: sparse: symbol 'surface_ac_pm_ops' was not declared. Should it be static?
vim +69 drivers/power/supply/surface_charger.c
66
67 static int spwr_ac_update_unlocked(struct spwr_ac_device *ac)
68 {
> 69 u32 old = ac->state;
70 int status;
71
72 lockdep_assert_held(&ac->lock);
73
74 status = ssam_retry(ssam_bat_get_psrc, ac->sdev, &ac->state);
75 if (status < 0)
76 return status;
77
> 78 return old != ac->state;
79 }
80
---
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: 39194 bytes --]
reply other threads:[~2021-05-11 5:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202105111357.pxMwMajI-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=sebastian.reichel@collabora.com \
/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