Hi Damien,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master] [also build test WARNING on v6.18 next-20251212] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Damien-Ri-gel/greybus-cpc-add... base: linus/master patch link: https://lore.kernel.org/r/20251212161308.25678-15-damien.riegel%40silabs.com patch subject: [PATCH 14/14] greybus: cpc: add CPC SDIO host driver config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20251214/202512140305.VFN3KkVr-lkp@i...) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251214/202512140305.VFN3KkVr-lkp@i...)
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/202512140305.VFN3KkVr-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/greybus/cpc/sdio.c:166:59: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
166 | dev_dbg(ctx->dev, "Invalid Greybus header size: %lu\n", gb_size); | ~~~ ^~~~~~~ | %zu include/linux/dev_printk.h:165:39: note: expanded from macro 'dev_dbg' 165 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ~~~ ^~~~~~~~~~~ include/linux/dynamic_debug.h:285:19: note: expanded from macro 'dynamic_dev_dbg' 285 | dev, fmt, ##__VA_ARGS__) | ~~~ ^~~~~~~~~~~ include/linux/dynamic_debug.h:261:59: note: expanded from macro '_dynamic_func_call' 261 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~ include/linux/dynamic_debug.h:259:65: note: expanded from macro '_dynamic_func_call_cls' 259 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~ include/linux/dynamic_debug.h:231:15: note: expanded from macro '__dynamic_func_call_cls' 231 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ drivers/greybus/cpc/sdio.c:172:60: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] 172 | dev_dbg(ctx->dev, "Payload size exceeds maximum: %lu\n", gb_size); | ~~~ ^~~~~~~ | %zu include/linux/dev_printk.h:165:39: note: expanded from macro 'dev_dbg' 165 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ~~~ ^~~~~~~~~~~ include/linux/dynamic_debug.h:285:19: note: expanded from macro 'dynamic_dev_dbg' 285 | dev, fmt, ##__VA_ARGS__) | ~~~ ^~~~~~~~~~~ include/linux/dynamic_debug.h:261:59: note: expanded from macro '_dynamic_func_call' 261 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~ include/linux/dynamic_debug.h:259:65: note: expanded from macro '_dynamic_func_call_cls' 259 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~ include/linux/dynamic_debug.h:231:15: note: expanded from macro '__dynamic_func_call_cls' 231 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ 2 warnings generated.
vim +166 drivers/greybus/cpc/sdio.c
156 157 static bool cpc_sdio_get_payload_size(struct cpc_sdio *ctx, const struct frame_header *header, 158 size_t *payload_size) 159 { 160 size_t gb_size; 161 162 gb_size = le16_to_cpu(header->gb.size); 163 164 /* Validate that the size is at least as large as the Greybus header */ 165 if (gb_size < GREYBUS_HEADER_SIZE) {
166 dev_dbg(ctx->dev, "Invalid Greybus header size: %lu\n", gb_size);
167 return false; 168 } 169 170 /* Validate maximum size */ 171 if (gb_size > (GB_CPC_SDIO_MSG_SIZE_MAX + GREYBUS_HEADER_SIZE)) { 172 dev_dbg(ctx->dev, "Payload size exceeds maximum: %lu\n", gb_size); 173 return false; 174 } 175 176 /* Size includes the Greybus header, so subtract it to get payload size */ 177 *payload_size = gb_size - GREYBUS_HEADER_SIZE; 178 179 return true; 180 } 181