lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 9 Dec 2022 02:07:16 +0800
From:   kernel test robot <lkp@...el.com>
To:     Herve Codina <herve.codina@...tlin.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Magnus Damm <magnus.damm@...il.com>,
        Gareth Williams <gareth.williams.jx@...esas.com>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-renesas-soc@...r.kernel.org, linux-clk@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: [PATCH v3 7/9] usb: gadget: udc: add Renesas RZ/N1 USBF
 controller support

Hi Herve,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus helgaas-pci/next helgaas-pci/for-linus geert-renesas-devel/next robh/for-next linus/master v6.1-rc8 next-20221207]
[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/20221208-002809
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link:    https://lore.kernel.org/r/20221207162435.1001782-8-herve.codina%40bootlin.com
patch subject: [PATCH v3 7/9] usb: gadget: udc: add Renesas RZ/N1 USBF controller support
config: powerpc-allyesconfig
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6e4cea55f0d1104408b26ac574566a0e4de48036)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/879f66e8c366e0979acae7fe5ec74786184626a0
        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/20221208-002809
        git checkout 879f66e8c366e0979acae7fe5ec74786184626a0
        # 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=powerpc SHELL=/bin/bash drivers/thermal/ drivers/usb/gadget/udc/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/usb/gadget/udc/renesas_usbf.c:367: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:342:28: note: expanded from macro 'USBF_DOUBLE_BUFFER'
   #define USBF_DOUBLE_BUFFER 1
                              ^
   drivers/usb/gadget/udc/renesas_usbf.c:348:22: note: expanded from macro 'USBF_EP_INFO'
                   .is_double       = _is_double,                                \
                                      ^~~~~~~~~~
   drivers/usb/gadget/udc/renesas_usbf.c:372: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:342:28: note: expanded from macro 'USBF_DOUBLE_BUFFER'
   #define USBF_DOUBLE_BUFFER 1
                              ^
   drivers/usb/gadget/udc/renesas_usbf.c:348:22: note: expanded from macro 'USBF_EP_INFO'
                   .is_double       = _is_double,                                \
                                      ^~~~~~~~~~
   drivers/usb/gadget/udc/renesas_usbf.c:412: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:342:28: note: expanded from macro 'USBF_DOUBLE_BUFFER'
   #define USBF_DOUBLE_BUFFER 1
                              ^
   drivers/usb/gadget/udc/renesas_usbf.c:348:22: note: expanded from macro 'USBF_EP_INFO'
                   .is_double       = _is_double,                                \
                                      ^~~~~~~~~~
   drivers/usb/gadget/udc/renesas_usbf.c:417: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:342:28: note: expanded from macro 'USBF_DOUBLE_BUFFER'
   #define USBF_DOUBLE_BUFFER 1
                              ^
   drivers/usb/gadget/udc/renesas_usbf.c:348:22: note: expanded from macro 'USBF_EP_INFO'
                   .is_double       = _is_double,                                \
                                      ^~~~~~~~~~
   drivers/usb/gadget/udc/renesas_usbf.c:422: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:342:28: note: expanded from macro 'USBF_DOUBLE_BUFFER'
   #define USBF_DOUBLE_BUFFER 1
                              ^
   drivers/usb/gadget/udc/renesas_usbf.c:348:22: note: expanded from macro 'USBF_EP_INFO'
                   .is_double       = _is_double,                                \
                                      ^~~~~~~~~~
   drivers/usb/gadget/udc/renesas_usbf.c:427: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:342:28: note: expanded from macro 'USBF_DOUBLE_BUFFER'
   #define USBF_DOUBLE_BUFFER 1
                              ^
   drivers/usb/gadget/udc/renesas_usbf.c:348:22: note: expanded from macro 'USBF_EP_INFO'
                   .is_double       = _is_double,                                \
                                      ^~~~~~~~~~
   drivers/usb/gadget/udc/renesas_usbf.c:432: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:342:28: note: expanded from macro 'USBF_DOUBLE_BUFFER'
   #define USBF_DOUBLE_BUFFER 1
                              ^
   drivers/usb/gadget/udc/renesas_usbf.c:348:22: note: expanded from macro 'USBF_EP_INFO'
                   .is_double       = _is_double,                                \
                                      ^~~~~~~~~~
   drivers/usb/gadget/udc/renesas_usbf.c:437: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:342:28: note: expanded from macro 'USBF_DOUBLE_BUFFER'
   #define USBF_DOUBLE_BUFFER 1
                              ^
   drivers/usb/gadget/udc/renesas_usbf.c:348:22: note: expanded from macro 'USBF_EP_INFO'
                   .is_double       = _is_double,                                \
                                      ^~~~~~~~~~
   drivers/usb/gadget/udc/renesas_usbf.c:1711: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;
                                     ^ ~
   drivers/usb/gadget/udc/renesas_usbf.c:2059:20: 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;
                             ^ ~
   drivers/usb/gadget/udc/renesas_usbf.c:2495:15: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
                           ep0->is_in = 1;
                                      ^ ~
   drivers/usb/gadget/udc/renesas_usbf.c:2504:14: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
                   ep0->is_in = 1;
                              ^ ~
   drivers/usb/gadget/udc/renesas_usbf.c:2611:13: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
           ep0->is_in = 1;
                      ^ ~
   drivers/usb/gadget/udc/renesas_usbf.c:561:20: warning: unused function 'usbf_ep_dma_reg_clrset' [-Wunused-function]
   static inline void usbf_ep_dma_reg_clrset(struct usbf_ep *ep, uint offset,
                      ^
   14 warnings generated.


vim +/int +367 drivers/usb/gadget/udc/renesas_usbf.c

   340	
   341	#define USBF_SINGLE_BUFFER 0
   342	#define USBF_DOUBLE_BUFFER 1
   343	#define USBF_EP_INFO(_name, _caps, _base_addr, _is_double, _maxpacket_limit)  \
   344		{                                                                     \
   345			.name            = _name,                                     \
   346			.caps            = _caps,                                     \
   347			.base_addr       = _base_addr,                                \
   348			.is_double       = _is_double,                                \
   349			.maxpacket_limit = _maxpacket_limit,                          \
   350		}
   351	
   352	/* This table is computed from the recommended values provided in the SOC
   353	 * datasheet. The buffer type (single/double) and the endpoint type cannot
   354	 * be changed. The mapping in internal RAM (base_addr and number of words)
   355	 * for each endpoints depends on the max packet size and the buffer type.
   356	 */
   357	static const struct usbf_ep_info usbf_ep_info[USBF_NUM_ENDPOINTS] = {
   358		/* ep0: buf @0x0000 64 bytes, fixed 32 words */
   359		[0] = USBF_EP_INFO("ep0-ctrl",
   360				   USB_EP_CAPS(USB_EP_CAPS_TYPE_CONTROL,
   361					       USB_EP_CAPS_DIR_ALL),
   362				   0x0000, USBF_SINGLE_BUFFER, USBF_EP0_MAX_PCKT_SIZE),
   363		/* ep1: buf @0x0020, 2 buffers 512 bytes -> (512 * 2 / 4) words */
   364		[1] = USBF_EP_INFO("ep1-bulk",
   365				   USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK,
   366					       USB_EP_CAPS_DIR_ALL),
 > 367				   0x0020, USBF_DOUBLE_BUFFER, 512),
   368		/* ep2: buf @0x0120, 2 buffers 512 bytes -> (512 * 2 / 4) words */
   369		[2] = USBF_EP_INFO("ep2-bulk",
   370				   USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK,
   371					       USB_EP_CAPS_DIR_ALL),
   372				   0x0120, USBF_DOUBLE_BUFFER, 512),
   373		/* ep3: buf @0x0220, 1 buffer 512 bytes -> (512 * 2 / 4) words */
   374		[3] = USBF_EP_INFO("ep3-bulk",
   375				   USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK,
   376					       USB_EP_CAPS_DIR_ALL),
   377				   0x0220, USBF_SINGLE_BUFFER, 512),
   378		/* ep4: buf @0x02A0, 1 buffer 512 bytes -> (512 * 1 / 4) words */
   379		[4] = USBF_EP_INFO("ep4-bulk",
   380				   USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK,
   381					       USB_EP_CAPS_DIR_ALL),
   382				   0x02A0, USBF_SINGLE_BUFFER, 512),
   383		/* ep5: buf @0x0320, 1 buffer 512 bytes -> (512 * 2 / 4) words */
   384		[5] = USBF_EP_INFO("ep5-bulk",
   385				   USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK,
   386					       USB_EP_CAPS_DIR_ALL),
   387				   0x0320, USBF_SINGLE_BUFFER, 512),
   388		/* ep6: buf @0x03A0, 1 buffer 1024 bytes -> (1024 * 1 / 4) words */
   389		[6] = USBF_EP_INFO("ep6-int",
   390				   USB_EP_CAPS(USB_EP_CAPS_TYPE_INT,
   391					       USB_EP_CAPS_DIR_ALL),
   392				   0x03A0, USBF_SINGLE_BUFFER, 1024),
   393		/* ep7: buf @0x04A0, 1 buffer 1024 bytes -> (1024 * 1 / 4) words */
   394		[7] = USBF_EP_INFO("ep7-int",
   395				   USB_EP_CAPS(USB_EP_CAPS_TYPE_INT,
   396					       USB_EP_CAPS_DIR_ALL),
   397				   0x04A0, USBF_SINGLE_BUFFER, 1024),
   398		/* ep8: buf @0x0520, 1 buffer 1024 bytes -> (1024 * 1 / 4) words */
   399		[8] = USBF_EP_INFO("ep8-int",
   400				   USB_EP_CAPS(USB_EP_CAPS_TYPE_INT,
   401					       USB_EP_CAPS_DIR_ALL),
   402				   0x0520, USBF_SINGLE_BUFFER, 1024),
   403		/* ep9: buf @0x0620, 1 buffer 1024 bytes -> (1024 * 1 / 4) words */
   404		[9] = USBF_EP_INFO("ep9-int",
   405				   USB_EP_CAPS(USB_EP_CAPS_TYPE_INT,
   406					       USB_EP_CAPS_DIR_ALL),
   407				   0x0620, USBF_SINGLE_BUFFER, 1024),
   408		/* ep10: buf @0x0720, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */
   409		[10] = USBF_EP_INFO("ep10-iso",
   410				    USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO,
   411						USB_EP_CAPS_DIR_ALL),
   412				    0x0720, USBF_DOUBLE_BUFFER, 1024),
   413		/* ep11: buf @0x0920, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */
   414		[11] = USBF_EP_INFO("ep11-iso",
   415				    USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO,
   416						USB_EP_CAPS_DIR_ALL),
   417				    0x0920, USBF_DOUBLE_BUFFER, 1024),
   418		/* ep12: buf @0x0B20, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */
   419		[12] = USBF_EP_INFO("ep12-iso",
   420				    USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO,
   421						USB_EP_CAPS_DIR_ALL),
   422				    0x0B20, USBF_DOUBLE_BUFFER, 1024),
   423		/* ep13: buf @0x0D20, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */
   424		[13] = USBF_EP_INFO("ep13-iso",
   425				    USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO,
   426						USB_EP_CAPS_DIR_ALL),
   427				    0x0D20, USBF_DOUBLE_BUFFER, 1024),
   428		/* ep14: buf @0x0F20, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */
   429		[14] = USBF_EP_INFO("ep14-iso",
   430				    USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO,
   431						USB_EP_CAPS_DIR_ALL),
   432				    0x0F20, USBF_DOUBLE_BUFFER, 1024),
   433		/* ep15: buf @0x1120, 2 buffers 1024 bytes -> (1024 * 2 / 4) words */
   434		[15] = USBF_EP_INFO("ep15-iso",
   435				    USB_EP_CAPS(USB_EP_CAPS_TYPE_ISO,
   436						USB_EP_CAPS_DIR_ALL),
   437				    0x1120, USBF_DOUBLE_BUFFER, 1024),
   438	};
   439	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (329569 bytes)

Powered by blists - more mailing lists