[Intel-gfx] [drm-intel:drm-intel-next-queued 13/14] drivers/gpu/drm/i915/intel_guc.c:230:12-17: WARNING: Unsigned expression compared with zero: level < 0 (fwd)

Julia Lawall julia.lawall at lip6.fr
Tue Mar 20 08:44:52 UTC 2018


Level is unsigned, so not less than 0 (line 230).

julia

---------- Forwarded message ----------
Date: Tue, 20 Mar 2018 16:39:16 +0800
From: kbuild test robot <fengguang.wu at intel.com>
To: kbuild at 01.org
Cc: Julia Lawall <julia.lawall at lip6.fr>
Subject: [drm-intel:drm-intel-next-queued 13/14]
    drivers/gpu/drm/i915/intel_guc.c:230:12-17: WARNING: Unsigned expression
    compared with zero: level < 0

CC: kbuild-all at 01.org
CC: intel-gfx at lists.freedesktop.org
CC: dri-devel at lists.freedesktop.org
TO: Chris Wilson <chris at chris-wilson.co.uk>
CC: Matthew Auld <matthew.auld at intel.com>

tree:   git://anongit.freedesktop.org/drm-intel drm-intel-next-queued
head:   873d66fb9b1d4f4cd441f84068abb5457c60f127
commit: 46b863325c2f58b564463c4d6e66ee0d4f2f3244 [13/14] drm/i915: Prefer memset64() when filling the iomap
:::::: branch date: 16 hours ago
:::::: commit date: 18 hours ago

>> drivers/gpu/drm/i915/intel_guc.c:230:12-17: WARNING: Unsigned expression compared with zero: level < 0

git remote add drm-intel git://anongit.freedesktop.org/drm-intel
git remote update drm-intel
git checkout 46b863325c2f58b564463c4d6e66ee0d4f2f3244
vim +230 drivers/gpu/drm/i915/intel_guc.c

5d53be45 Michal Wajdeczko 2017-10-16  224
cb5d64e9 Michał Winiarski 2018-03-19  225  static u32 get_log_control_flags(void)
0ed87953 Michal Wajdeczko 2018-01-11  226  {
cb5d64e9 Michał Winiarski 2018-03-19  227  	u32 level = i915_modparams.guc_log_level;
cb5d64e9 Michał Winiarski 2018-03-19  228  	u32 flags = 0;
0ed87953 Michal Wajdeczko 2018-01-11  229
cb5d64e9 Michał Winiarski 2018-03-19 @230  	GEM_BUG_ON(level < 0);
cb5d64e9 Michał Winiarski 2018-03-19  231
cb5d64e9 Michał Winiarski 2018-03-19  232  	if (!GUC_LOG_LEVEL_TO_ENABLED(level))
cb5d64e9 Michał Winiarski 2018-03-19  233  		flags |= GUC_LOG_DEFAULT_DISABLED;
cb5d64e9 Michał Winiarski 2018-03-19  234
cb5d64e9 Michał Winiarski 2018-03-19  235  	if (!GUC_LOG_LEVEL_TO_VERBOSE(level))
cb5d64e9 Michał Winiarski 2018-03-19  236  		flags |= GUC_LOG_DISABLED;
cb5d64e9 Michał Winiarski 2018-03-19  237  	else
cb5d64e9 Michał Winiarski 2018-03-19  238  		flags |= GUC_LOG_LEVEL_TO_VERBOSITY(level) <<
cb5d64e9 Michał Winiarski 2018-03-19  239  			 GUC_LOG_VERBOSITY_SHIFT;
0ed87953 Michal Wajdeczko 2018-01-11  240
cb5d64e9 Michał Winiarski 2018-03-19  241  	return flags;
0ed87953 Michal Wajdeczko 2018-01-11  242  }
0ed87953 Michal Wajdeczko 2018-01-11  243

:::::: The code at line 230 was first introduced by commit
:::::: cb5d64e9f13e0dd817c3ae2dbe73c3b8c6c13f95 drm/i915/guc: Allow user to control default GuC logging

:::::: TO: Michał Winiarski <michal.winiarski at intel.com>
:::::: CC: Chris Wilson <chris at chris-wilson.co.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


More information about the Intel-gfx mailing list