From: kernel test robot <lkp@intel.com>
To: Guenter Roeck <groeck@chromium.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Luigi Semenzato <semenzato@chromium.org>
Subject: [jsarha:topic/cros-sof-v4.19 949/6555] mm/low-mem-notify.c:87:16: sparse: sparse: incorrect type in return expression (different base types)
Date: Thu, 12 May 2022 10:00:34 +0800 [thread overview]
Message-ID: <202205120909.GVWyvFOU-lkp@intel.com> (raw)
tree: https://github.com/jsarha/linux topic/cros-sof-v4.19
head: d7a3e91d8d16d1ef8653deec5a1fffc4de034a0c
commit: b7ec7fb624dfc8d07e722cf2e0e72ff82ebaec7b [949/6555] CHROMIUM: low-mem: Fix return type of low_mem_notify_poll
config: i386-randconfig-s001-20220509 (https://download.01.org/0day-ci/archive/20220512/202205120909.GVWyvFOU-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/jsarha/linux/commit/b7ec7fb624dfc8d07e722cf2e0e72ff82ebaec7b
git remote add jsarha https://github.com/jsarha/linux
git fetch --no-tags jsarha topic/cros-sof-v4.19
git checkout b7ec7fb624dfc8d07e722cf2e0e72ff82ebaec7b
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
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 >>)
>> mm/low-mem-notify.c:87:16: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got unsigned int [assigned] ret @@
mm/low-mem-notify.c:87:16: sparse: expected restricted __poll_t
mm/low-mem-notify.c:87:16: sparse: got unsigned int [assigned] ret
vim +87 mm/low-mem-notify.c
89587e9d1c30b5 Luigi Semenzato 2014-04-03 74
b7ec7fb624dfc8 Guenter Roeck 2018-11-01 75 static __poll_t low_mem_notify_poll(struct file *file, poll_table *wait)
89587e9d1c30b5 Luigi Semenzato 2014-04-03 76 {
89587e9d1c30b5 Luigi Semenzato 2014-04-03 77 unsigned int ret = 0;
89587e9d1c30b5 Luigi Semenzato 2014-04-03 78
89587e9d1c30b5 Luigi Semenzato 2014-04-03 79 /* Update state to reflect any recent freeing. */
89587e9d1c30b5 Luigi Semenzato 2014-04-03 80 atomic_set(&low_mem_state, is_low_mem_situation());
89587e9d1c30b5 Luigi Semenzato 2014-04-03 81
89587e9d1c30b5 Luigi Semenzato 2014-04-03 82 poll_wait(file, &low_mem_wait, wait);
89587e9d1c30b5 Luigi Semenzato 2014-04-03 83
1fa6b9516423e6 Luigi Semenzato 2012-04-18 84 if (low_mem_margin_enabled && atomic_read(&low_mem_state) != 0)
89587e9d1c30b5 Luigi Semenzato 2014-04-03 85 ret = POLLIN;
89587e9d1c30b5 Luigi Semenzato 2014-04-03 86
89587e9d1c30b5 Luigi Semenzato 2014-04-03 @87 return ret;
89587e9d1c30b5 Luigi Semenzato 2014-04-03 88 }
89587e9d1c30b5 Luigi Semenzato 2014-04-03 89
:::::: The code at line 87 was first introduced by commit
:::::: 89587e9d1c30b5f908d4bfe5f2ee0b920c156c14 CHROMIUM: Add /dev/low-mem device for low-memory notification.
:::::: TO: Luigi Semenzato <semenzato@chromium.org>
:::::: CC: Guenter Roeck <groeck@chromium.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-05-12 2:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 2:00 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-02-04 7:34 [jsarha:topic/cros-sof-v4.19 949/6555] mm/low-mem-notify.c:87:16: sparse: sparse: incorrect type in return expression (different base types) kernel test robot
2023-06-06 20:16 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=202205120909.GVWyvFOU-lkp@intel.com \
--to=lkp@intel.com \
--cc=groeck@chromium.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=semenzato@chromium.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 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.