* [jsarha:topic/cros-sof-v4.14-rebase 1859/9999] drivers/base/devres.c:92:13: sparse: sparse: incompatible types in comparison expression (different type sizes):
@ 2023-02-06 23:31 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-06 23:31 UTC (permalink / raw)
To: Kees Cook; +Cc: oe-kbuild-all, Cheng-Yi Chiang
tree: https://github.com/jsarha/linux topic/cros-sof-v4.14-rebase
head: 18a233f3f676a98dde00947535d99ab1a54da340
commit: 9780924cd85d20dca59c929153c3004ed41208be [1859/9999] UPSTREAM: device: Use overflow helpers for devm_kmalloc()
config: m68k-randconfig-s051-20230205 (https://download.01.org/0day-ci/archive/20230207/202302070750.lcRhdtUN-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/jsarha/linux/commit/9780924cd85d20dca59c929153c3004ed41208be
git remote add jsarha https://github.com/jsarha/linux
git fetch --no-tags jsarha topic/cros-sof-v4.14-rebase
git checkout 9780924cd85d20dca59c929153c3004ed41208be
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash drivers/base/ drivers/iio/adc/ drivers/usb/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/base/devres.c:1055:9: sparse: sparse: cast removes address space '<asn:3>' of expression
>> drivers/base/devres.c:92:13: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/base/devres.c:92:13: sparse: unsigned long *
>> drivers/base/devres.c:92:13: sparse: unsigned int *
>> drivers/base/devres.c:92:13: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/base/devres.c:92:13: sparse: unsigned long *
>> drivers/base/devres.c:92:13: sparse: unsigned int *
>> drivers/base/devres.c:92:13: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/base/devres.c:92:13: sparse: unsigned long *
>> drivers/base/devres.c:92:13: sparse: unsigned int *
>> drivers/base/devres.c:92:13: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/base/devres.c:92:13: sparse: unsigned long *
>> drivers/base/devres.c:92:13: sparse: unsigned int *
vim +92 drivers/base/devres.c
84
85 static __always_inline struct devres * alloc_dr(dr_release_t release,
86 size_t size, gfp_t gfp, int nid)
87 {
88 size_t tot_size;
89 struct devres *dr;
90
91 /* We must catch any near-SIZE_MAX cases that could overflow. */
> 92 if (unlikely(check_add_overflow(sizeof(struct devres), size,
93 &tot_size)))
94 return NULL;
95
96 dr = kmalloc_node_track_caller(tot_size, gfp, nid);
97 if (unlikely(!dr))
98 return NULL;
99
100 memset(dr, 0, offsetof(struct devres, data));
101
102 INIT_LIST_HEAD(&dr->node.entry);
103 dr->node.release = release;
104 return dr;
105 }
106
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-06 23:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 23:31 [jsarha:topic/cros-sof-v4.14-rebase 1859/9999] drivers/base/devres.c:92:13: sparse: sparse: incompatible types in comparison expression (different type sizes): kernel test robot
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.