From: kernel test robot <lkp@intel.com>
To: Chen Yufan <chenyufan@vivo.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: [tip:timers/core 5/5] kernel/time/timekeeping.c:220:21: sparse: sparse: incompatible types in comparison expression (different signedness):
Date: Sun, 25 Aug 2024 23:26:48 +0800 [thread overview]
Message-ID: <202408252309.2gUjhXOF-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
head: 42db2c2cb5ac3572380a9489b8f8bbe0e534dfc7
commit: 42db2c2cb5ac3572380a9489b8f8bbe0e534dfc7 [5/5] timekeeping: Use time_after() in timekeeping_check_update()
config: x86_64-randconfig-121-20240825 (https://download.01.org/0day-ci/archive/20240825/202408252309.2gUjhXOF-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240825/202408252309.2gUjhXOF-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408252309.2gUjhXOF-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/time/timekeeping.c:220:21: sparse: sparse: incompatible types in comparison expression (different signedness):
kernel/time/timekeeping.c:220:21: sparse: unsigned long *
kernel/time/timekeeping.c:220:21: sparse: long *
kernel/time/timekeeping.c:230:21: sparse: sparse: incompatible types in comparison expression (different signedness):
kernel/time/timekeeping.c:230:21: sparse: unsigned long *
kernel/time/timekeeping.c:230:21: sparse: long *
kernel/time/timekeeping.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
include/linux/page-flags.h:235:46: sparse: sparse: self-comparison always evaluates to false
include/linux/page-flags.h:235:46: sparse: sparse: self-comparison always evaluates to false
vim +220 kernel/time/timekeeping.c
203
204 u64 max_cycles = tk->tkr_mono.clock->max_cycles;
205 const char *name = tk->tkr_mono.clock->name;
206
207 if (offset > max_cycles) {
208 printk_deferred("WARNING: timekeeping: Cycle offset (%lld) is larger than allowed by the '%s' clock's max_cycles value (%lld): time overflow danger\n",
209 offset, name, max_cycles);
210 printk_deferred(" timekeeping: Your kernel is sick, but tries to cope by capping time updates\n");
211 } else {
212 if (offset > (max_cycles >> 1)) {
213 printk_deferred("INFO: timekeeping: Cycle offset (%lld) is larger than the '%s' clock's 50%% safety margin (%lld)\n",
214 offset, name, max_cycles >> 1);
215 printk_deferred(" timekeeping: Your kernel is still fine, but is feeling a bit nervous\n");
216 }
217 }
218
219 if (tk->underflow_seen) {
> 220 if (time_after(jiffies, tk->last_warning + WARNING_FREQ)) {
221 printk_deferred("WARNING: Underflow in clocksource '%s' observed, time update ignored.\n", name);
222 printk_deferred(" Please report this, consider using a different clocksource, if possible.\n");
223 printk_deferred(" Your kernel is probably still fine.\n");
224 tk->last_warning = jiffies;
225 }
226 tk->underflow_seen = 0;
227 }
228
229 if (tk->overflow_seen) {
230 if (time_after(jiffies, tk->last_warning + WARNING_FREQ)) {
231 printk_deferred("WARNING: Overflow in clocksource '%s' observed, time update capped.\n", name);
232 printk_deferred(" Please report this, consider using a different clocksource, if possible.\n");
233 printk_deferred(" Your kernel is probably still fine.\n");
234 tk->last_warning = jiffies;
235 }
236 tk->overflow_seen = 0;
237 }
238 }
239
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-08-25 15:27 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=202408252309.2gUjhXOF-lkp@intel.com \
--to=lkp@intel.com \
--cc=chenyufan@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tglx@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®