Skip to contentSkip to conversation

drivers/gpu/drm/v3d/v3d_perfmon.c:317:9: sparse: sparse: Using plain integer as NULL pointer

PATCH kernel test robot 1 participant 1 message Jan 3, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2
commit: c6eabbab359c156669e10d5dec3e71e80ff09bd2 [1073/5236] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL
config: hexagon-randconfig-r133-20241229 (https://download.01.org/0day-ci/archive/20250103/[email protected]/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 319b89197348b7cad1215e235bdc7b5ec8f9b72c)
reproduce: (https://download.01.org/0day-ci/archive/20250103/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/v3d/v3d_perfmon.c:317:9: sparse: sparse: Using plain integer as NULL pointer

drivers/gpu/drm/v3d/v3d_perfmon.c:405:9: sparse: sparse: Using plain integer as NULL pointer drivers/gpu/drm/v3d/v3d_perfmon.c:492:13: sparse: sparse: Using plain integer as NULL pointer drivers/gpu/drm/v3d/v3d_perfmon.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/stackdepot.h, ...):
include/linux/page-flags.h:237:46: sparse: sparse: self-comparison always evaluates to false include/linux/page-flags.h:237:46: sparse: sparse: self-comparison always evaluates to false

vim +317 drivers/gpu/drm/v3d/v3d_perfmon.c

306
307 static int v3d_perfmon_idr_del(int id, void *elem, void *data)
308 {
309 struct v3d_perfmon *perfmon = elem;
310 struct v3d_dev *v3d = (struct v3d_dev *)data;
311
312 /* If the active perfmon is being destroyed, stop it first */
313 if (perfmon == v3d->active_perfmon)
314 v3d_perfmon_stop(v3d, perfmon, false);
315
316 /* If the global perfmon is being destroyed, set it to NULL */

 > 317		cmpxchg(&v3d->global_perfmon, perfmon, NULL);

318
319 v3d_perfmon_put(perfmon);
320
321 return 0;
322 }
323

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki