Hi Herve, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on geert-renesas-drivers/renesas-clk] [also build test WARNING on usb/usb-testing geert-renesas-devel/next linus/master v6.1-rc4 next-20221109] [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/Herve-Codina/Add-the-Renesas-USBF-controller-support/20221107-220159 base: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git renesas-clk patch link: https://lore.kernel.org/r/20221107135825.583877-6-herve.codina%40bootlin.com patch subject: [PATCH 5/7] usb: gadget: udc: add Renesas RZ/N1 USBF controller support config: arm64-allyesconfig compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 463da45892e2d2a262277b91b96f5f8c05dc25d0) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/3f9bd513c21f6d289ffad6868aa19732b0ee63c0 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Herve-Codina/Add-the-Renesas-USBF-controller-support/20221107-220159 git checkout 3f9bd513c21f6d289ffad6868aa19732b0ee63c0 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpio/ drivers/gpu/drm/ drivers/thermal/intel/ drivers/usb/gadget/udc/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/usb/gadget/udc/renesas_usbf.c:370:15: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 0x0020, USBF_DOUBLE_BUFFER, 512), ^~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:345:28: note: expanded from macro 'USBF_DOUBLE_BUFFER' #define USBF_DOUBLE_BUFFER 1 ^ drivers/usb/gadget/udc/renesas_usbf.c:351:22: note: expanded from macro 'USBF_EP_INFO' .is_double = _is_double, \ ^~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:375:15: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 0x0120, USBF_DOUBLE_BUFFER, 512), ^~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:345:28: note: expanded from macro 'USBF_DOUBLE_BUFFER' #define USBF_DOUBLE_BUFFER 1 ^ drivers/usb/gadget/udc/renesas_usbf.c:351:22: note: expanded from macro 'USBF_EP_INFO' .is_double = _is_double, \ ^~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:415:16: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 0x0720, USBF_DOUBLE_BUFFER, 1024), ^~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:345:28: note: expanded from macro 'USBF_DOUBLE_BUFFER' #define USBF_DOUBLE_BUFFER 1 ^ drivers/usb/gadget/udc/renesas_usbf.c:351:22: note: expanded from macro 'USBF_EP_INFO' .is_double = _is_double, \ ^~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:420:16: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 0x0920, USBF_DOUBLE_BUFFER, 1024), ^~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:345:28: note: expanded from macro 'USBF_DOUBLE_BUFFER' #define USBF_DOUBLE_BUFFER 1 ^ drivers/usb/gadget/udc/renesas_usbf.c:351:22: note: expanded from macro 'USBF_EP_INFO' .is_double = _is_double, \ ^~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:425:16: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 0x0B20, USBF_DOUBLE_BUFFER, 1024), ^~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:345:28: note: expanded from macro 'USBF_DOUBLE_BUFFER' #define USBF_DOUBLE_BUFFER 1 ^ drivers/usb/gadget/udc/renesas_usbf.c:351:22: note: expanded from macro 'USBF_EP_INFO' .is_double = _is_double, \ ^~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:430:16: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 0x0D20, USBF_DOUBLE_BUFFER, 1024), ^~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:345:28: note: expanded from macro 'USBF_DOUBLE_BUFFER' #define USBF_DOUBLE_BUFFER 1 ^ drivers/usb/gadget/udc/renesas_usbf.c:351:22: note: expanded from macro 'USBF_EP_INFO' .is_double = _is_double, \ ^~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:435:16: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 0x0F20, USBF_DOUBLE_BUFFER, 1024), ^~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:345:28: note: expanded from macro 'USBF_DOUBLE_BUFFER' #define USBF_DOUBLE_BUFFER 1 ^ drivers/usb/gadget/udc/renesas_usbf.c:351:22: note: expanded from macro 'USBF_EP_INFO' .is_double = _is_double, \ ^~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:440:16: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 0x1120, USBF_DOUBLE_BUFFER, 1024), ^~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:345:28: note: expanded from macro 'USBF_DOUBLE_BUFFER' #define USBF_DOUBLE_BUFFER 1 ^ drivers/usb/gadget/udc/renesas_usbf.c:351:22: note: expanded from macro 'USBF_EP_INFO' .is_double = _is_double, \ ^~~~~~~~~~ >> drivers/usb/gadget/udc/renesas_usbf.c:906:47: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] TRACEEP(epn, "ep%d dma xfer %u\n", epn->id, req->dma_size); ~~ ^~~~~~~~~~~~~ %zu drivers/usb/gadget/udc/renesas_usbf.c:32:42: note: expanded from macro 'TRACEEP' trace_printk("%s: " _fmt, __func__, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ include/linux/kernel.h:374:26: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/kernel.h:385:37: note: expanded from macro 'do_trace_printk' __trace_printk_check_format(fmt, ##args); \ ~~~ ^~~~ include/linux/kernel.h:337:40: note: expanded from macro '__trace_printk_check_format' ____trace_printk_check_format(fmt, ##args); \ ~~~ ^~~~ >> drivers/usb/gadget/udc/renesas_usbf.c:906:47: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] TRACEEP(epn, "ep%d dma xfer %u\n", epn->id, req->dma_size); ~~ ^~~~~~~~~~~~~ %zu drivers/usb/gadget/udc/renesas_usbf.c:32:42: note: expanded from macro 'TRACEEP' trace_printk("%s: " _fmt, __func__, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ include/linux/kernel.h:374:26: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/kernel.h:390:36: note: expanded from macro 'do_trace_printk' __trace_printk(_THIS_IP_, fmt, ##args); \ ~~~ ^~~~ >> drivers/usb/gadget/udc/renesas_usbf.c:897:48: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073709551487 to 4294967167 [-Wconstant-conversion] usbf_ep_reg_writel(epn, USBF_REG_EPN_STATUS, ~USBF_EPN_IN_END_INT); ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:931:49: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073709551607 to 4294967287 [-Wconstant-conversion] usbf_ep_reg_writel(epn, USBF_REG_EPN_STATUS, ~USBF_EPN_IN_INT); ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:948:5: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073709551607 to 4294967287 [-Wconstant-conversion] ~USBF_EPN_IN_INT); ^~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:1114:4: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073701163007 to 4286578687 [-Wconstant-conversion] ~USBF_EPN_OUT_END_INT); ^~~~~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:1150:3: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073701163007 to 4286578687 [-Wconstant-conversion] ~USBF_EPN_OUT_END_INT); ^~~~~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:1292:5: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] req->dma_size); ^~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:32:42: note: expanded from macro 'TRACEEP' trace_printk("%s: " _fmt, __func__, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ include/linux/kernel.h:374:26: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/kernel.h:385:37: note: expanded from macro 'do_trace_printk' __trace_printk_check_format(fmt, ##args); \ ~~~ ^~~~ include/linux/kernel.h:337:40: note: expanded from macro '__trace_printk_check_format' ____trace_printk_check_format(fmt, ##args); \ ~~~ ^~~~ drivers/usb/gadget/udc/renesas_usbf.c:1292:5: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] req->dma_size); ^~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:32:42: note: expanded from macro 'TRACEEP' trace_printk("%s: " _fmt, __func__, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ include/linux/kernel.h:374:26: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/kernel.h:390:36: note: expanded from macro 'do_trace_printk' __trace_printk(_THIS_IP_, fmt, ##args); \ ~~~ ^~~~ drivers/usb/gadget/udc/renesas_usbf.c:1318:4: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] req->dma_size, npkt); ^~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:32:42: note: expanded from macro 'TRACEEP' trace_printk("%s: " _fmt, __func__, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ include/linux/kernel.h:374:26: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/kernel.h:385:37: note: expanded from macro 'do_trace_printk' __trace_printk_check_format(fmt, ##args); \ ~~~ ^~~~ include/linux/kernel.h:337:40: note: expanded from macro '__trace_printk_check_format' ____trace_printk_check_format(fmt, ##args); \ ~~~ ^~~~ drivers/usb/gadget/udc/renesas_usbf.c:1318:4: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] req->dma_size, npkt); ^~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:32:42: note: expanded from macro 'TRACEEP' trace_printk("%s: " _fmt, __func__, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ include/linux/kernel.h:374:26: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/kernel.h:390:36: note: expanded from macro 'do_trace_printk' __trace_printk(_THIS_IP_, fmt, ##args); \ ~~~ ^~~~ drivers/usb/gadget/udc/renesas_usbf.c:1417:6: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] req->dma_size); ^~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:32:42: note: expanded from macro 'TRACEEP' trace_printk("%s: " _fmt, __func__, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ include/linux/kernel.h:374:26: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/kernel.h:385:37: note: expanded from macro 'do_trace_printk' __trace_printk_check_format(fmt, ##args); \ ~~~ ^~~~ include/linux/kernel.h:337:40: note: expanded from macro '__trace_printk_check_format' ____trace_printk_check_format(fmt, ##args); \ ~~~ ^~~~ drivers/usb/gadget/udc/renesas_usbf.c:1417:6: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] req->dma_size); ^~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:32:42: note: expanded from macro 'TRACEEP' trace_printk("%s: " _fmt, __func__, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ include/linux/kernel.h:374:26: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/kernel.h:390:36: note: expanded from macro 'do_trace_printk' __trace_printk(_THIS_IP_, fmt, ##args); \ ~~~ ^~~~ drivers/usb/gadget/udc/renesas_usbf.c:1380:6: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073709289471 to 4294705151 [-Wconstant-conversion] ~USBF_EPN_OUT_NULL_INT); ^~~~~~~~~~~~~~~~~~~~~~ drivers/usb/gadget/udc/renesas_usbf.c:1714:21: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] ep->is_processing = 1; vim +/int +370 drivers/usb/gadget/udc/renesas_usbf.c 343 344 #define USBF_SINGLE_BUFFER 0 345 #define USBF_DOUBLE_BUFFER 1 346 #define USBF_EP_INFO(_name, _caps, _base_addr, _is_double, _maxpacket_limit) \ 347 { \ 348 .name = _name, \ 349 .caps = _caps, \ 350 .base_addr = _base_addr, \ 351 .is_double = _is_double, \ 352 .maxpacket_limit = _maxpacket_limit, \ 353 } 354 355 /* This table is computed from the recommended values provided in the SOC 356 * datasheet. The buffer type (single/double) and the endpoint type cannot 357 * be changed. The mapping in internal RAM (base_addr and number of words) 358 * for each endpoints depends on the max packet size and the buffer type. 359 */ 360 static const struct usbf_ep_info usbf_ep_info[USBF_NUM_ENDPOINTS] = { 361 /* ep0: buf @0x0000 64 bytes, fixed 32 words */ 362 [0] = USBF_EP_INFO("ep0-ctrl", 363 USB_EP_CAPS(USB_EP_CAPS_TYPE_CONTROL, 364 USB_EP_CAPS_DIR_ALL), 365 0x0000, USBF_SINGLE_BUFFER, USBF_EP0_MAX_PCKT_SIZE), 366 /* ep1: buf @0x0020, 2 buffers 512 bytes -> (512 * 2 / 4) words */ 367 [1] = USBF_EP_INFO("ep1-bulk", 368 USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK, 369 USB_EP_CAPS_DIR_ALL), > 370 0x0020, USBF_DOUBLE_BUFFER, 512), 371 /* ep2: buf @0x0120, 2 buffers 512 bytes -> (512 * 2 / 4) words */ 372 [2] = USBF_EP_INFO("ep2-bulk", 373 USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK, 374 USB_EP_CAPS_DIR_ALL), 375 0x0120, USBF_DOUBLE_BUFFER, 512), 376 /* ep3: buf @0x0220, 1 buffer 512 bytes -> (512 * 2 / 4) words */ 377 [3] = USBF_EP_INFO("ep3-bulk", 378 USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK, 379 USB_EP_CAPS_DIR_ALL), 380 0x0220, USBF_SINGLE_BUFFER, 512), 381 /* ep4: buf @0x02A0, 1 buffer 512 bytes -> (512 * 1 / 4) words */ 382 [4] = USBF_EP_INFO("ep4-bulk", 383 USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK, 384 USB_EP_CAPS_DIR_ALL), 385 0x02A0, USBF_SINGLE_BUFFER, 512), 386 /* ep5: buf @0x0320, 1 buffer 512 bytes -> (512 * 2 / 4) words */ 387 [5] = USBF_EP_INFO("ep5-bulk", 388 USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK, 389 USB_EP_CAPS_DIR_ALL), 390 0x0320, USBF_SINGLE_BUFFER, 512), 391 /* ep6: buf @0x03A0, 1 buffer 1024 bytes -> (1024 * 1 / 4) words */ 392 [6] = USBF_EP_INFO("ep6-int", 393 USB_EP_CAPS(USB_EP_CAPS_TYPE_INT, 394 USB_EP_CAPS_DIR_ALL), 395 0x03A0, USBF_SINGLE_BUFFER, 1024), 396 /* ep7: buf @0x04A0, 1 buffer 1024 bytes -> (1024 * 1 / 4) words */ 397 [7] = USBF_EP_INFO("ep7-int", 398 USB_EP_CAPS(USB_EP_CAPS_TYPE_INT, 399 USB_EP_CAPS_DIR_ALL), 400 0x04A0, USBF_SINGLE_BUFFER, 1024), 401 /* ep8: buf @0x0520, 1 buffer 1024 bytes -> (1024 * 1 / 4) words */ 402 [8] = USBF_EP_INFO("ep8-int", 403 USB_EP_CAPS(USB_EP_CAPS_TYPE_INT, 404 USB_EP_CAPS_DIR_ALL), 405 0x0520, USBF_SINGLE_BUFFER, 1024), 406 /* ep9: buf @0x0620, 1 buffer 1024 bytes -> (1024 * 1 / 4) words */ 407 [9] = USBF_EP_INFO("ep9-int", 408 USB_EP_CAPS(USB_EP_CAPS_TYPE_INT, 409 USB_EP_CAPS_DIR_ALL), 410 0x0620, USBF_SINGLE_BUFFER, 1024), 411 /* ep10: buf @0x0720, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */ 412 [10] = USBF_EP_INFO("ep10-iso", 413 USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO, 414 USB_EP_CAPS_DIR_ALL), 415 0x0720, USBF_DOUBLE_BUFFER, 1024), 416 /* ep11: buf @0x0920, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */ 417 [11] = USBF_EP_INFO("ep11-iso", 418 USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO, 419 USB_EP_CAPS_DIR_ALL), 420 0x0920, USBF_DOUBLE_BUFFER, 1024), 421 /* ep12: buf @0x0B20, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */ 422 [12] = USBF_EP_INFO("ep12-iso", 423 USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO, 424 USB_EP_CAPS_DIR_ALL), 425 0x0B20, USBF_DOUBLE_BUFFER, 1024), 426 /* ep13: buf @0x0D20, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */ 427 [13] = USBF_EP_INFO("ep13-iso", 428 USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO, 429 USB_EP_CAPS_DIR_ALL), 430 0x0D20, USBF_DOUBLE_BUFFER, 1024), 431 /* ep14: buf @0x0F20, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */ 432 [14] = USBF_EP_INFO("ep14-iso", 433 USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO, 434 USB_EP_CAPS_DIR_ALL), 435 0x0F20, USBF_DOUBLE_BUFFER, 1024), 436 /* ep15: buf @0x1120, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */ 437 [15] = USBF_EP_INFO("ep15-iso", 438 USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO, 439 USB_EP_CAPS_DIR_ALL), 440 0x1120, USBF_DOUBLE_BUFFER, 1024), 441 }; 442 -- 0-DAY CI Kernel Test Service https://01.org/lkp