LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] usb: cdns3: make signed 1 bit bitfields unsigned
@ 2020-03-25 12:50 Colin King
  2020-03-26 11:46 ` Peter Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Colin King @ 2020-03-25 12:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sekhar Nori, Roger Quadros, Felipe Balbi,
	Pawel Laszczak, linux-usb
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The signed 1 bit bitfields should be unsigned, so make them unsigned.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/cdns3/cdns3-ti.c | 4 ++--
 drivers/usb/cdns3/gadget.h   | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index c6a79ca15858..5685ba11480b 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -52,8 +52,8 @@ enum modestrap_mode { USBSS_MODESTRAP_MODE_NONE,
 struct cdns_ti {
 	struct device *dev;
 	void __iomem *usbss;
-	int usb2_only:1;
-	int vbus_divider:1;
+	unsigned usb2_only:1;
+	unsigned vbus_divider:1;
 	struct clk *usb2_refclk;
 	struct clk *lpm_clk;
 };
diff --git a/drivers/usb/cdns3/gadget.h b/drivers/usb/cdns3/gadget.h
index f003a7801872..bf2828e4df2c 100644
--- a/drivers/usb/cdns3/gadget.h
+++ b/drivers/usb/cdns3/gadget.h
@@ -1199,7 +1199,7 @@ struct cdns3_aligned_buf {
 	void			*buf;
 	dma_addr_t		dma;
 	u32			size;
-	int			in_use:1;
+	unsigned		in_use:1;
 	struct list_head	list;
 };
 
@@ -1308,8 +1308,8 @@ struct cdns3_device {
 	unsigned			u2_allowed:1;
 	unsigned			is_selfpowered:1;
 	unsigned			setup_pending:1;
-	int				hw_configured_flag:1;
-	int				wake_up_flag:1;
+	unsigned			hw_configured_flag:1;
+	unsigned			wake_up_flag:1;
 	unsigned			status_completion_no_call:1;
 	unsigned			using_streams:1;
 	int				out_mem_is_allocated;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] usb: cdns3: make signed 1 bit bitfields unsigned
  2020-03-25 12:50 [PATCH] usb: cdns3: make signed 1 bit bitfields unsigned Colin King
@ 2020-03-26 11:46 ` Peter Chen
  2020-03-26 12:28 ` kbuild test robot
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Peter Chen @ 2020-03-26 11:46 UTC (permalink / raw)
  To: Colin King
  Cc: Greg Kroah-Hartman, Sekhar Nori, Roger Quadros, Felipe Balbi,
	Pawel Laszczak, linux-usb, kernel-janitors, linux-kernel

On 20-03-25 12:50:41, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The signed 1 bit bitfields should be unsigned, so make them unsigned.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/usb/cdns3/cdns3-ti.c | 4 ++--
>  drivers/usb/cdns3/gadget.h   | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
> index c6a79ca15858..5685ba11480b 100644
> --- a/drivers/usb/cdns3/cdns3-ti.c
> +++ b/drivers/usb/cdns3/cdns3-ti.c
> @@ -52,8 +52,8 @@ enum modestrap_mode { USBSS_MODESTRAP_MODE_NONE,
>  struct cdns_ti {
>  	struct device *dev;
>  	void __iomem *usbss;
> -	int usb2_only:1;
> -	int vbus_divider:1;
> +	unsigned usb2_only:1;
> +	unsigned vbus_divider:1;
>  	struct clk *usb2_refclk;
>  	struct clk *lpm_clk;
>  };
> diff --git a/drivers/usb/cdns3/gadget.h b/drivers/usb/cdns3/gadget.h
> index f003a7801872..bf2828e4df2c 100644
> --- a/drivers/usb/cdns3/gadget.h
> +++ b/drivers/usb/cdns3/gadget.h
> @@ -1199,7 +1199,7 @@ struct cdns3_aligned_buf {
>  	void			*buf;
>  	dma_addr_t		dma;
>  	u32			size;
> -	int			in_use:1;
> +	unsigned		in_use:1;
>  	struct list_head	list;
>  };
>  
> @@ -1308,8 +1308,8 @@ struct cdns3_device {
>  	unsigned			u2_allowed:1;
>  	unsigned			is_selfpowered:1;
>  	unsigned			setup_pending:1;
> -	int				hw_configured_flag:1;
> -	int				wake_up_flag:1;
> +	unsigned			hw_configured_flag:1;
> +	unsigned			wake_up_flag:1;
>  	unsigned			status_completion_no_call:1;
>  	unsigned			using_streams:1;
>  	int				out_mem_is_allocated;
> -- 

Reviewed-by: Peter Chen <peter.chen@nxp.com>

-- 

Thanks,
Peter Chen

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] usb: cdns3: make signed 1 bit bitfields unsigned
  2020-03-25 12:50 [PATCH] usb: cdns3: make signed 1 bit bitfields unsigned Colin King
  2020-03-26 11:46 ` Peter Chen
@ 2020-03-26 12:28 ` kbuild test robot
  2020-03-26 12:28 ` [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static kbuild test robot
  2020-03-27  1:12 ` [kbuild-all] [RFC PATCH v2] " kbuild test robot
  3 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2020-03-26 12:28 UTC (permalink / raw)
  To: Colin King
  Cc: kbuild-all, Greg Kroah-Hartman, Sekhar Nori, Roger Quadros,
	Felipe Balbi, Pawel Laszczak, linux-usb, kernel-janitors,
	linux-kernel

Hi Colin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on v5.6-rc7 next-20200326]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Colin-King/usb-cdns3-make-signed-1-bit-bitfields-unsigned/20200326-075855
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-187-gbff9b106-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/usb/cdns3/drd.c:43:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
>> drivers/usb/cdns3/drd.c:43:42: sparse:    expected void const volatile [noderef] <asn:2> *addr
>> drivers/usb/cdns3/drd.c:43:42: sparse:    got restricted __le32 *
>> drivers/usb/cdns3/drd.c:45:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
>> drivers/usb/cdns3/drd.c:45:42: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:45:42: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:47:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:47:42: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:47:42: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:49:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:49:42: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:49:42: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:71:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:71:25: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:71:25: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:81:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:81:30: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:81:30: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:114:24: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:114:24: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:114:24: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:124:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:124:48: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:124:48: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:141:56: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:141:56: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:141:56: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:144:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:144:23: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:144:23: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:144:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:144:23: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:144:23: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:154:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:154:29: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:154:29: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:156:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:156:17: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:156:17: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:156:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:156:17: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:156:17: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:178:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:178:55: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:178:55: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:182:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:182:23: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:182:23: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:182:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:182:23: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:182:23: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:197:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:197:29: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:197:29: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:199:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:199:17: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:199:17: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:199:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:199:17: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:199:17: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:219:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:219:25: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:219:25: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:284:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:284:26: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:284:26: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:303:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:303:25: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:303:25: sparse:    got restricted __le32 *
>> drivers/usb/cdns3/drd.c:326:27: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct cdns3_otg_legacy_regs *otg_v0_regs @@    got void struct cdns3_otg_legacy_regs *otg_v0_regs @@
>> drivers/usb/cdns3/drd.c:326:27: sparse:    expected struct cdns3_otg_legacy_regs *otg_v0_regs
>> drivers/usb/cdns3/drd.c:326:27: sparse:    got void [noderef] <asn:2> *[assigned] regs
   drivers/usb/cdns3/drd.c:327:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:327:25: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:327:25: sparse:    got restricted __le32 *
>> drivers/usb/cdns3/drd.c:330:32: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct cdns3_otg_common_regs *otg_regs @@    got void struct cdns3_otg_common_regs *otg_regs @@
>> drivers/usb/cdns3/drd.c:330:32: sparse:    expected struct cdns3_otg_common_regs *otg_regs
   drivers/usb/cdns3/drd.c:330:32: sparse:    got void [noderef] <asn:2> *[assigned] regs
   drivers/usb/cdns3/drd.c:331:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:331:32: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:331:32: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:332:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:332:17: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:332:17: sparse:    got restricted __le32 *
>> drivers/usb/cdns3/drd.c:336:35: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct cdns3_otg_regs *otg_v1_regs @@    got void [noderestruct cdns3_otg_regs *otg_v1_regs @@
>> drivers/usb/cdns3/drd.c:336:35: sparse:    expected struct cdns3_otg_regs *otg_v1_regs
   drivers/usb/cdns3/drd.c:336:35: sparse:    got void [noderef] <asn:2> *[assigned] regs
   drivers/usb/cdns3/drd.c:339:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:339:32: sparse:    expected void volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:339:32: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:340:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:340:17: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:340:17: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:340:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:340:17: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:340:17: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:345:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:345:17: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:345:17: sparse:    got restricted __le32 *
   drivers/usb/cdns3/drd.c:368:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got [noderef] <asn:2> *addr @@
   drivers/usb/cdns3/drd.c:368:28: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/usb/cdns3/drd.c:368:28: sparse:    got restricted __le32 *
--
>> drivers/usb/cdns3/gadget.c:1157:35: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got 2 [usertype] control @@
>> drivers/usb/cdns3/gadget.c:1157:35: sparse:    expected restricted __le32 [usertype] control
>> drivers/usb/cdns3/gadget.c:1157:35: sparse:    got unsigned long
>> drivers/usb/cdns3/gadget.c:1173:29: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] buffer @@    got __le32 [usertype] buffer @@
>> drivers/usb/cdns3/gadget.c:1173:29: sparse:    expected restricted __le32 [usertype] buffer
>> drivers/usb/cdns3/gadget.c:1173:29: sparse:    got unsigned long long
>> drivers/usb/cdns3/gadget.c:1188:29: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] length @@    got 2 [usertype] length @@
>> drivers/usb/cdns3/gadget.c:1188:29: sparse:    expected restricted __le32 [usertype] length
   drivers/usb/cdns3/gadget.c:1188:29: sparse:    got unsigned long
>> drivers/usb/cdns3/gadget.c:1191:37: sparse: sparse: invalid assignment: |=
>> drivers/usb/cdns3/gadget.c:1191:37: sparse:    left side has type restricted __le32
>> drivers/usb/cdns3/gadget.c:1191:37: sparse:    right side has type unsigned long
>> drivers/usb/cdns3/gadget.c:1213:38: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got unsignrestricted __le32 [usertype] control @@
   drivers/usb/cdns3/gadget.c:1213:38: sparse:    expected restricted __le32 [usertype] control
>> drivers/usb/cdns3/gadget.c:1213:38: sparse:    got unsigned int [assigned] [usertype] control
   drivers/usb/cdns3/gadget.c:1215:48: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got unsignrestricted __le32 [usertype] control @@
   drivers/usb/cdns3/gadget.c:1215:48: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/gadget.c:1215:48: sparse:    got unsigned int [assigned] [usertype] control
   drivers/usb/cdns3/gadget.c:1229:30: sparse: sparse: invalid assignment: |=
   drivers/usb/cdns3/gadget.c:1229:30: sparse:    left side has type restricted __le32
   drivers/usb/cdns3/gadget.c:1229:30: sparse:    right side has type unsigned long
>> drivers/usb/cdns3/gadget.c:1255:36: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/gadget.c:1255:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got  [usertype] control @@
   drivers/usb/cdns3/gadget.c:1255:30: sparse:    expected restricted __le32 [usertype] control
>> drivers/usb/cdns3/gadget.c:1255:30: sparse:    got unsigned int
   drivers/usb/cdns3/gadget.c:1010:29: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] buffer @@    got __le32 [usertype] buffer @@
   drivers/usb/cdns3/gadget.c:1010:29: sparse:    expected restricted __le32 [usertype] buffer
   drivers/usb/cdns3/gadget.c:1010:29: sparse:    got unsigned long long
   drivers/usb/cdns3/gadget.c:1013:29: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] buffer @@    got __le32 [usertype] buffer @@
   drivers/usb/cdns3/gadget.c:1013:29: sparse:    expected restricted __le32 [usertype] buffer
   drivers/usb/cdns3/gadget.c:1013:29: sparse:    got unsigned long long
   drivers/usb/cdns3/gadget.c:1019:21: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] length @@    got 2 [usertype] length @@
   drivers/usb/cdns3/gadget.c:1019:21: sparse:    expected restricted __le32 [usertype] length
   drivers/usb/cdns3/gadget.c:1019:21: sparse:    got unsigned long
   drivers/usb/cdns3/gadget.c:1029:37: sparse: sparse: invalid assignment: |=
   drivers/usb/cdns3/gadget.c:1029:37: sparse:    left side has type restricted __le32
   drivers/usb/cdns3/gadget.c:1029:37: sparse:    right side has type unsigned long
   drivers/usb/cdns3/gadget.c:1033:22: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got unsignrestricted __le32 [usertype] control @@
   drivers/usb/cdns3/gadget.c:1033:22: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/gadget.c:1033:22: sparse:    got unsigned int [assigned] [usertype] control
>> drivers/usb/cdns3/gadget.c:85:6: sparse: sparse: symbol 'cdns3_clear_register_bit' was not declared. Should it be static?
>> drivers/usb/cdns3/gadget.c:140:26: sparse: sparse: symbol 'cdns3_next_align_buf' was not declared. Should it be static?
>> drivers/usb/cdns3/gadget.c:151:22: sparse: sparse: symbol 'cdns3_next_priv_request' was not declared. Should it be static?
>> drivers/usb/cdns3/gadget.c:193:5: sparse: sparse: symbol 'cdns3_ring_size' was not declared. Should it be static?
   drivers/usb/cdns3/gadget.c:263:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] buffer @@    got __le32 [usertype] buffer @@
   drivers/usb/cdns3/gadget.c:263:34: sparse:    expected restricted __le32 [usertype] buffer
   drivers/usb/cdns3/gadget.c:263:34: sparse:    got unsigned long long
   drivers/usb/cdns3/gadget.c:264:35: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got 2 [usertype] control @@
   drivers/usb/cdns3/gadget.c:264:35: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/gadget.c:264:35: sparse:    got unsigned long
>> drivers/usb/cdns3/gadget.c:348:6: sparse: sparse: symbol 'cdns3_move_deq_to_next_trb' was not declared. Should it be static?
>> drivers/usb/cdns3/gadget.c:514:20: sparse: sparse: symbol 'cdns3_wa2_gadget_giveback' was not declared. Should it be static?
>> drivers/usb/cdns3/gadget.c:554:5: sparse: sparse: symbol 'cdns3_wa2_gadget_ep_queue' was not declared. Should it be static?
   drivers/usb/cdns3/gadget.c:849:49: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/gadget.c:848:51: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got  [usertype] control @@
   drivers/usb/cdns3/gadget.c:848:51: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/gadget.c:848:51: sparse:    got unsigned int
   drivers/usb/cdns3/gadget.c:852:49: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/gadget.c:851:51: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got  [usertype] control @@
   drivers/usb/cdns3/gadget.c:851:51: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/gadget.c:851:51: sparse:    got unsigned int
>> drivers/usb/cdns3/gadget.c:839:6: sparse: sparse: symbol 'cdns3_wa1_restore_cycle_bit' was not declared. Should it be static?
   drivers/usb/cdns3/gadget.c:1393:17: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/gadget.c:1442:21: sparse: sparse: restricted __le32 degrades to integer
>> drivers/usb/cdns3/gadget.c:1574:35: sparse: sparse: dubious: x | !y
>> drivers/usb/cdns3/gadget.c:1907:6: sparse: sparse: symbol 'cdns3_stream_ep_reconfig' was not declared. Should it be static?
>> drivers/usb/cdns3/gadget.c:1928:6: sparse: sparse: symbol 'cdns3_configure_dmult' was not declared. Should it be static?
   drivers/usb/cdns3/gadget.c:2552:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] buffer @@    got __le32 [usertype] buffer @@
   drivers/usb/cdns3/gadget.c:2552:34: sparse:    expected restricted __le32 [usertype] buffer
   drivers/usb/cdns3/gadget.c:2552:34: sparse:    got unsigned long long
   drivers/usb/cdns3/gadget.c:2554:46: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/gadget.c:2554:35: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got 2 [usertype] control @@
   drivers/usb/cdns3/gadget.c:2554:35: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/gadget.c:2554:35: sparse:    got unsigned long
   drivers/usb/cdns3/gadget.c:2610:43: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/gadget.c:2610:38: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got 2 [usertype] control @@
   drivers/usb/cdns3/gadget.c:2610:38: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/gadget.c:2610:38: sparse:    got unsigned long
   drivers/usb/cdns3/gadget.c:2625:43: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/gadget.c:2625:38: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got 2 [usertype] control @@
   drivers/usb/cdns3/gadget.c:2625:38: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/gadget.c:2625:38: sparse:    got unsigned long
--
>> drivers/usb/cdns3/ep0.c:40:37: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] buffer @@    got __le32 [usertype] buffer @@
>> drivers/usb/cdns3/ep0.c:40:37: sparse:    expected restricted __le32 [usertype] buffer
>> drivers/usb/cdns3/ep0.c:40:37: sparse:    got unsigned long long
>> drivers/usb/cdns3/ep0.c:41:37: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] length @@    got 2 [usertype] length @@
>> drivers/usb/cdns3/ep0.c:41:37: sparse:    expected restricted __le32 [usertype] length
>> drivers/usb/cdns3/ep0.c:41:37: sparse:    got unsigned long
>> drivers/usb/cdns3/ep0.c:44:46: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got 2 [usertype] control @@
>> drivers/usb/cdns3/ep0.c:44:46: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/ep0.c:44:46: sparse:    got unsigned long
   drivers/usb/cdns3/ep0.c:45:45: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] buffer @@    got __le32 [usertype] buffer @@
   drivers/usb/cdns3/ep0.c:45:45: sparse:    expected restricted __le32 [usertype] buffer
   drivers/usb/cdns3/ep0.c:45:45: sparse:    got unsigned long long
   drivers/usb/cdns3/ep0.c:46:45: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] length @@    got 2 [usertype] length @@
   drivers/usb/cdns3/ep0.c:46:45: sparse:    expected restricted __le32 [usertype] length
   drivers/usb/cdns3/ep0.c:46:45: sparse:    got unsigned long
   drivers/usb/cdns3/ep0.c:47:46: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got 2 [usertype] control @@
   drivers/usb/cdns3/ep0.c:47:46: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/ep0.c:47:46: sparse:    got unsigned long
   drivers/usb/cdns3/ep0.c:50:46: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 [usertype] control @@    got 2 [usertype] control @@
   drivers/usb/cdns3/ep0.c:50:46: sparse:    expected restricted __le32 [usertype] control
   drivers/usb/cdns3/ep0.c:50:46: sparse:    got unsigned long
>> drivers/usb/cdns3/ep0.c:267:52: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected unsigned char [usertype] ep_addr @@    got restunsigned char [usertype] ep_addr @@
>> drivers/usb/cdns3/ep0.c:267:52: sparse:    expected unsigned char [usertype] ep_addr
>> drivers/usb/cdns3/ep0.c:267:52: sparse:    got restricted __le16 [usertype] wIndex
>> drivers/usb/cdns3/ep0.c:271:47: sparse: sparse: incorrect type in argument 2 (different base types) @@    expected unsigned int [usertype] ep @@    got restrunsigned int [usertype] ep @@
>> drivers/usb/cdns3/ep0.c:271:47: sparse:    expected unsigned int [usertype] ep
   drivers/usb/cdns3/ep0.c:271:47: sparse:    got restricted __le16 [usertype] wIndex
>> drivers/usb/cdns3/ep0.c:387:19: sparse: sparse: restricted __le16 degrades to integer
   drivers/usb/cdns3/ep0.c:390:44: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected unsigned char [usertype] ep_addr @@    got restunsigned char [usertype] ep_addr @@
   drivers/usb/cdns3/ep0.c:390:44: sparse:    expected unsigned char [usertype] ep_addr
   drivers/usb/cdns3/ep0.c:390:44: sparse:    got restricted __le16 [usertype] wIndex
   drivers/usb/cdns3/ep0.c:393:39: sparse: sparse: incorrect type in argument 2 (different base types) @@    expected unsigned int [usertype] ep @@    got restrunsigned int [usertype] ep @@
   drivers/usb/cdns3/ep0.c:393:39: sparse:    expected unsigned int [usertype] ep
   drivers/usb/cdns3/ep0.c:393:39: sparse:    got restricted __le16 [usertype] wIndex
   drivers/usb/cdns3/ep0.c:454:21: sparse: sparse: restricted __le16 degrades to integer
>> drivers/usb/cdns3/ep0.c:478:31: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] isoch_delay @@    got resunsigned short [usertype] isoch_delay @@
>> drivers/usb/cdns3/ep0.c:478:31: sparse:    expected unsigned short [usertype] isoch_delay
>> drivers/usb/cdns3/ep0.c:478:31: sparse:    got restricted __le16 [usertype] wValue
--
>> drivers/usb/cdns3/./trace.h:392:1: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] buffer @@    got restrunsigned int [usertype] buffer @@
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    expected unsigned int [usertype] buffer
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    got restricted __le32 [usertype] buffer
>> drivers/usb/cdns3/./trace.h:392:1: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] length @@    got restrunsigned int [usertype] length @@
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    expected unsigned int [usertype] length
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    got restricted __le32 [usertype] length
>> drivers/usb/cdns3/./trace.h:392:1: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] control @@    got restrunsigned int [usertype] control @@
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    expected unsigned int [usertype] control
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    got restricted __le32 [usertype] control
>> drivers/usb/cdns3/./trace.h:392:1: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] buffer @@    got restrunsigned int [usertype] buffer @@
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    expected unsigned int [usertype] buffer
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    got restricted __le32 [usertype] buffer
>> drivers/usb/cdns3/./trace.h:392:1: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] length @@    got restrunsigned int [usertype] length @@
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    expected unsigned int [usertype] length
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    got restricted __le32 [usertype] length
>> drivers/usb/cdns3/./trace.h:392:1: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] control @@    got restrunsigned int [usertype] control @@
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    expected unsigned int [usertype] control
>> drivers/usb/cdns3/./trace.h:392:1: sparse:    got restricted __le32 [usertype] control

Please review and possibly fold the followup patch.

vim +43 drivers/usb/cdns3/drd.c

7733f6c32e36ff Pawel Laszczak 2019-08-26  22  
7733f6c32e36ff Pawel Laszczak 2019-08-26  23  /**
7733f6c32e36ff Pawel Laszczak 2019-08-26  24   * cdns3_set_mode - change mode of OTG Core
7733f6c32e36ff Pawel Laszczak 2019-08-26  25   * @cdns: pointer to context structure
7733f6c32e36ff Pawel Laszczak 2019-08-26  26   * @mode: selected mode from cdns_role
7733f6c32e36ff Pawel Laszczak 2019-08-26  27   *
7733f6c32e36ff Pawel Laszczak 2019-08-26  28   * Returns 0 on success otherwise negative errno
7733f6c32e36ff Pawel Laszczak 2019-08-26  29   */
7733f6c32e36ff Pawel Laszczak 2019-08-26  30  int cdns3_set_mode(struct cdns3 *cdns, enum usb_dr_mode mode)
7733f6c32e36ff Pawel Laszczak 2019-08-26  31  {
7733f6c32e36ff Pawel Laszczak 2019-08-26  32  	int ret = 0;
7733f6c32e36ff Pawel Laszczak 2019-08-26  33  	u32 reg;
7733f6c32e36ff Pawel Laszczak 2019-08-26  34  
7733f6c32e36ff Pawel Laszczak 2019-08-26  35  	switch (mode) {
7733f6c32e36ff Pawel Laszczak 2019-08-26  36  	case USB_DR_MODE_PERIPHERAL:
7733f6c32e36ff Pawel Laszczak 2019-08-26  37  		break;
7733f6c32e36ff Pawel Laszczak 2019-08-26  38  	case USB_DR_MODE_HOST:
7733f6c32e36ff Pawel Laszczak 2019-08-26  39  		break;
7733f6c32e36ff Pawel Laszczak 2019-08-26  40  	case USB_DR_MODE_OTG:
7733f6c32e36ff Pawel Laszczak 2019-08-26  41  		dev_dbg(cdns->dev, "Set controller to OTG mode\n");
7733f6c32e36ff Pawel Laszczak 2019-08-26  42  		if (cdns->version == CDNS3_CONTROLLER_V1) {
7733f6c32e36ff Pawel Laszczak 2019-08-26 @43  			reg = readl(&cdns->otg_v1_regs->override);
7733f6c32e36ff Pawel Laszczak 2019-08-26  44  			reg |= OVERRIDE_IDPULLUP;
7733f6c32e36ff Pawel Laszczak 2019-08-26 @45  			writel(reg, &cdns->otg_v1_regs->override);
7733f6c32e36ff Pawel Laszczak 2019-08-26  46  		} else {
7733f6c32e36ff Pawel Laszczak 2019-08-26  47  			reg = readl(&cdns->otg_v0_regs->ctrl1);
7733f6c32e36ff Pawel Laszczak 2019-08-26  48  			reg |= OVERRIDE_IDPULLUP_V0;
7733f6c32e36ff Pawel Laszczak 2019-08-26  49  			writel(reg, &cdns->otg_v0_regs->ctrl1);
7733f6c32e36ff Pawel Laszczak 2019-08-26  50  		}
7733f6c32e36ff Pawel Laszczak 2019-08-26  51  
7733f6c32e36ff Pawel Laszczak 2019-08-26  52  		/*
7733f6c32e36ff Pawel Laszczak 2019-08-26  53  		 * Hardware specification says: "ID_VALUE must be valid within
7733f6c32e36ff Pawel Laszczak 2019-08-26  54  		 * 50ms after idpullup is set to '1" so driver must wait
7733f6c32e36ff Pawel Laszczak 2019-08-26  55  		 * 50ms before reading this pin.
7733f6c32e36ff Pawel Laszczak 2019-08-26  56  		 */
7733f6c32e36ff Pawel Laszczak 2019-08-26  57  		usleep_range(50000, 60000);
7733f6c32e36ff Pawel Laszczak 2019-08-26  58  		break;
7733f6c32e36ff Pawel Laszczak 2019-08-26  59  	default:
7733f6c32e36ff Pawel Laszczak 2019-08-26  60  		dev_err(cdns->dev, "Unsupported mode of operation %d\n", mode);
7733f6c32e36ff Pawel Laszczak 2019-08-26  61  		return -EINVAL;
7733f6c32e36ff Pawel Laszczak 2019-08-26  62  	}
7733f6c32e36ff Pawel Laszczak 2019-08-26  63  
7733f6c32e36ff Pawel Laszczak 2019-08-26  64  	return ret;
7733f6c32e36ff Pawel Laszczak 2019-08-26  65  }
7733f6c32e36ff Pawel Laszczak 2019-08-26  66  

:::::: The code at line 43 was first introduced by commit
:::::: 7733f6c32e36ff9d7adadf40001039bf219b1cbe usb: cdns3: Add Cadence USB3 DRD Driver

:::::: TO: Pawel Laszczak <pawell@cadence.com>
:::::: CC: Felipe Balbi <felipe.balbi@linux.intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static
  2020-03-25 12:50 [PATCH] usb: cdns3: make signed 1 bit bitfields unsigned Colin King
  2020-03-26 11:46 ` Peter Chen
  2020-03-26 12:28 ` kbuild test robot
@ 2020-03-26 12:28 ` kbuild test robot
  2020-03-26 13:04   ` Greg Kroah-Hartman
  2020-03-27  1:12 ` [kbuild-all] [RFC PATCH v2] " kbuild test robot
  3 siblings, 1 reply; 10+ messages in thread
From: kbuild test robot @ 2020-03-26 12:28 UTC (permalink / raw)
  To: Colin King
  Cc: kbuild-all, Greg Kroah-Hartman, Sekhar Nori, Roger Quadros,
	Felipe Balbi, Pawel Laszczak, linux-usb, kernel-janitors,
	linux-kernel


Fixes: 87db1192dc33 ("usb: cdns3: make signed 1 bit bitfields unsigned")
Signed-off-by: kbuild test robot <lkp@intel.com>
---
 gadget.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 372460ea4df9a..54a04614d336f 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -82,7 +82,7 @@ static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep,
  * @ptr: address of device controller register to be read and changed
  * @mask: bits requested to clar
  */
-void cdns3_clear_register_bit(void __iomem *ptr, u32 mask)
+static void cdns3_clear_register_bit(void __iomem *ptr, u32 mask)
 {
 	mask = readl(ptr) & ~mask;
 	writel(mask, ptr);
@@ -137,7 +137,7 @@ struct usb_request *cdns3_next_request(struct list_head *list)
  *
  * Returns buffer or NULL if no buffers in list
  */
-struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
+static struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
 {
 	return list_first_entry_or_null(list, struct cdns3_aligned_buf, list);
 }
@@ -148,7 +148,7 @@ struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
  *
  * Returns request or NULL if no requests in list
  */
-struct cdns3_request *cdns3_next_priv_request(struct list_head *list)
+static struct cdns3_request *cdns3_next_priv_request(struct list_head *list)
 {
 	return list_first_entry_or_null(list, struct cdns3_request, list);
 }
@@ -190,7 +190,7 @@ dma_addr_t cdns3_trb_virt_to_dma(struct cdns3_endpoint *priv_ep,
 	return priv_ep->trb_pool_dma + offset;
 }
 
-int cdns3_ring_size(struct cdns3_endpoint *priv_ep)
+static int cdns3_ring_size(struct cdns3_endpoint *priv_ep)
 {
 	switch (priv_ep->type) {
 	case USB_ENDPOINT_XFER_ISOC:
@@ -345,7 +345,7 @@ static void cdns3_ep_inc_deq(struct cdns3_endpoint *priv_ep)
 	cdns3_ep_inc_trb(&priv_ep->dequeue, &priv_ep->ccs, priv_ep->num_trbs);
 }
 
-void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req)
+static void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req)
 {
 	struct cdns3_endpoint *priv_ep = priv_req->priv_ep;
 	int current_trb = priv_req->start_trb;
@@ -511,9 +511,9 @@ static void cdns3_wa2_descmiss_copy_data(struct cdns3_endpoint *priv_ep,
 	}
 }
 
-struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
-					      struct cdns3_endpoint *priv_ep,
-					      struct cdns3_request *priv_req)
+static struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
+						     struct cdns3_endpoint *priv_ep,
+						     struct cdns3_request *priv_req)
 {
 	if (priv_ep->flags & EP_QUIRK_EXTRA_BUF_EN &&
 	    priv_req->flags & REQUEST_INTERNAL) {
@@ -551,9 +551,9 @@ struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
 	return &priv_req->request;
 }
 
-int cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev,
-			      struct cdns3_endpoint *priv_ep,
-			      struct cdns3_request *priv_req)
+static int cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev,
+				     struct cdns3_endpoint *priv_ep,
+				     struct cdns3_request *priv_req)
 {
 	int deferred = 0;
 
@@ -836,7 +836,7 @@ void cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep,
 		cdns3_gadget_ep_free_request(&priv_ep->endpoint, request);
 }
 
-void cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep)
+static void cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep)
 {
 	/* Work around for stale data address in TRB*/
 	if (priv_ep->wa1_set) {
@@ -1904,8 +1904,8 @@ static int cdns3_ep_onchip_buffer_reserve(struct cdns3_device *priv_dev,
 	return 0;
 }
 
-void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
-			      struct cdns3_endpoint *priv_ep)
+static void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
+				     struct cdns3_endpoint *priv_ep)
 {
 	if (!priv_ep->use_streams || priv_dev->gadget.speed < USB_SPEED_SUPER)
 		return;
@@ -1925,8 +1925,8 @@ void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
 			       EP_CFG_TDL_CHK | EP_CFG_SID_CHK);
 }
 
-void cdns3_configure_dmult(struct cdns3_device *priv_dev,
-			   struct cdns3_endpoint *priv_ep)
+static void cdns3_configure_dmult(struct cdns3_device *priv_dev,
+				  struct cdns3_endpoint *priv_ep)
 {
 	struct cdns3_usb_regs __iomem *regs = priv_dev->regs;
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static
  2020-03-26 12:28 ` [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static kbuild test robot
@ 2020-03-26 13:04   ` Greg Kroah-Hartman
  2020-03-27  0:34     ` [kbuild-all] " Rong Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-26 13:04 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Colin King, kbuild-all, Sekhar Nori, Roger Quadros, Felipe Balbi,
	Pawel Laszczak, linux-usb, kernel-janitors, linux-kernel

On Thu, Mar 26, 2020 at 08:28:58PM +0800, kbuild test robot wrote:
> 
> Fixes: 87db1192dc33 ("usb: cdns3: make signed 1 bit bitfields unsigned")

This original patch did not "cause" this problem, it's just that you for
some reason ran sparse for the first time on the file.

So I can't take this as-is, can you remove this line and resend?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [kbuild-all] Re: [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static
  2020-03-26 13:04   ` Greg Kroah-Hartman
@ 2020-03-27  0:34     ` Rong Chen
  2020-03-27  6:42       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 10+ messages in thread
From: Rong Chen @ 2020-03-27  0:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, kbuild test robot
  Cc: Colin King, kbuild-all, Sekhar Nori, Roger Quadros, Felipe Balbi,
	Pawel Laszczak, linux-usb, kernel-janitors, linux-kernel



On 3/26/20 9:04 PM, Greg Kroah-Hartman wrote:
> On Thu, Mar 26, 2020 at 08:28:58PM +0800, kbuild test robot wrote:
>> Fixes: 87db1192dc33 ("usb: cdns3: make signed 1 bit bitfields unsigned")
> This original patch did not "cause" this problem, it's just that you for
> some reason ran sparse for the first time on the file.
>
> So I can't take this as-is, can you remove this line and resend?

Hi Greg,

Sorry for the inconvenience, the patch was generated by the bot,
we'll check and resend it.

Best Regards,
Rong Chen

>
> thanks,
>
> greg k-h
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [kbuild-all] [RFC PATCH v2] usb: cdns3: cdns3_clear_register_bit() can be static
  2020-03-25 12:50 [PATCH] usb: cdns3: make signed 1 bit bitfields unsigned Colin King
                   ` (2 preceding siblings ...)
  2020-03-26 12:28 ` [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static kbuild test robot
@ 2020-03-27  1:12 ` kbuild test robot
  3 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2020-03-27  1:12 UTC (permalink / raw)
  To: Colin King
  Cc: kbuild-all, Greg Kroah-Hartman, Sekhar Nori, Roger Quadros,
	Felipe Balbi, Pawel Laszczak, linux-usb, kernel-janitors,
	linux-kernel


Signed-off-by: kbuild test robot <lkp@intel.com>
---
 gadget.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 372460ea4df9a..54a04614d336f 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -82,7 +82,7 @@ static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep,
  * @ptr: address of device controller register to be read and changed
  * @mask: bits requested to clar
  */
-void cdns3_clear_register_bit(void __iomem *ptr, u32 mask)
+static void cdns3_clear_register_bit(void __iomem *ptr, u32 mask)
 {
 	mask = readl(ptr) & ~mask;
 	writel(mask, ptr);
@@ -137,7 +137,7 @@ struct usb_request *cdns3_next_request(struct list_head *list)
  *
  * Returns buffer or NULL if no buffers in list
  */
-struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
+static struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
 {
 	return list_first_entry_or_null(list, struct cdns3_aligned_buf, list);
 }
@@ -148,7 +148,7 @@ struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
  *
  * Returns request or NULL if no requests in list
  */
-struct cdns3_request *cdns3_next_priv_request(struct list_head *list)
+static struct cdns3_request *cdns3_next_priv_request(struct list_head *list)
 {
 	return list_first_entry_or_null(list, struct cdns3_request, list);
 }
@@ -190,7 +190,7 @@ dma_addr_t cdns3_trb_virt_to_dma(struct cdns3_endpoint *priv_ep,
 	return priv_ep->trb_pool_dma + offset;
 }
 
-int cdns3_ring_size(struct cdns3_endpoint *priv_ep)
+static int cdns3_ring_size(struct cdns3_endpoint *priv_ep)
 {
 	switch (priv_ep->type) {
 	case USB_ENDPOINT_XFER_ISOC:
@@ -345,7 +345,7 @@ static void cdns3_ep_inc_deq(struct cdns3_endpoint *priv_ep)
 	cdns3_ep_inc_trb(&priv_ep->dequeue, &priv_ep->ccs, priv_ep->num_trbs);
 }
 
-void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req)
+static void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req)
 {
 	struct cdns3_endpoint *priv_ep = priv_req->priv_ep;
 	int current_trb = priv_req->start_trb;
@@ -511,9 +511,9 @@ static void cdns3_wa2_descmiss_copy_data(struct cdns3_endpoint *priv_ep,
 	}
 }
 
-struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
-					      struct cdns3_endpoint *priv_ep,
-					      struct cdns3_request *priv_req)
+static struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
+						     struct cdns3_endpoint *priv_ep,
+						     struct cdns3_request *priv_req)
 {
 	if (priv_ep->flags & EP_QUIRK_EXTRA_BUF_EN &&
 	    priv_req->flags & REQUEST_INTERNAL) {
@@ -551,9 +551,9 @@ struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
 	return &priv_req->request;
 }
 
-int cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev,
-			      struct cdns3_endpoint *priv_ep,
-			      struct cdns3_request *priv_req)
+static int cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev,
+				     struct cdns3_endpoint *priv_ep,
+				     struct cdns3_request *priv_req)
 {
 	int deferred = 0;
 
@@ -836,7 +836,7 @@ void cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep,
 		cdns3_gadget_ep_free_request(&priv_ep->endpoint, request);
 }
 
-void cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep)
+static void cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep)
 {
 	/* Work around for stale data address in TRB*/
 	if (priv_ep->wa1_set) {
@@ -1904,8 +1904,8 @@ static int cdns3_ep_onchip_buffer_reserve(struct cdns3_device *priv_dev,
 	return 0;
 }
 
-void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
-			      struct cdns3_endpoint *priv_ep)
+static void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
+				     struct cdns3_endpoint *priv_ep)
 {
 	if (!priv_ep->use_streams || priv_dev->gadget.speed < USB_SPEED_SUPER)
 		return;
@@ -1925,8 +1925,8 @@ void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
 			       EP_CFG_TDL_CHK | EP_CFG_SID_CHK);
 }
 
-void cdns3_configure_dmult(struct cdns3_device *priv_dev,
-			   struct cdns3_endpoint *priv_ep)
+static void cdns3_configure_dmult(struct cdns3_device *priv_dev,
+				  struct cdns3_endpoint *priv_ep)
 {
 	struct cdns3_usb_regs __iomem *regs = priv_dev->regs;
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [kbuild-all] Re: [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static
  2020-03-27  0:34     ` [kbuild-all] " Rong Chen
@ 2020-03-27  6:42       ` Greg Kroah-Hartman
  2020-03-27  6:53         ` Rong Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-27  6:42 UTC (permalink / raw)
  To: Rong Chen
  Cc: kbuild test robot, Colin King, kbuild-all, Sekhar Nori,
	Roger Quadros, Felipe Balbi, Pawel Laszczak, linux-usb,
	kernel-janitors, linux-kernel

On Fri, Mar 27, 2020 at 08:34:52AM +0800, Rong Chen wrote:
> 
> 
> On 3/26/20 9:04 PM, Greg Kroah-Hartman wrote:
> > On Thu, Mar 26, 2020 at 08:28:58PM +0800, kbuild test robot wrote:
> > > Fixes: 87db1192dc33 ("usb: cdns3: make signed 1 bit bitfields unsigned")
> > This original patch did not "cause" this problem, it's just that you for
> > some reason ran sparse for the first time on the file.
> > 
> > So I can't take this as-is, can you remove this line and resend?
> 
> Hi Greg,
> 
> Sorry for the inconvenience, the patch was generated by the bot,
> we'll check and resend it.

It's fine that it was generated, it's a bug somewhere that thinks this
specific patch was a problem so that this generated patch fixed it.

Did you all just start running sparse on things again?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [kbuild-all] Re: [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static
  2020-03-27  6:42       ` Greg Kroah-Hartman
@ 2020-03-27  6:53         ` Rong Chen
  2020-04-02  1:33           ` Rong Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Rong Chen @ 2020-03-27  6:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kbuild test robot, Colin King, kbuild-all, Sekhar Nori,
	Roger Quadros, Felipe Balbi, Pawel Laszczak, linux-usb,
	kernel-janitors, linux-kernel



On 3/27/20 2:42 PM, Greg Kroah-Hartman wrote:
> On Fri, Mar 27, 2020 at 08:34:52AM +0800, Rong Chen wrote:
>>
>> On 3/26/20 9:04 PM, Greg Kroah-Hartman wrote:
>>> On Thu, Mar 26, 2020 at 08:28:58PM +0800, kbuild test robot wrote:
>>>> Fixes: 87db1192dc33 ("usb: cdns3: make signed 1 bit bitfields unsigned")
>>> This original patch did not "cause" this problem, it's just that you for
>>> some reason ran sparse for the first time on the file.
>>>
>>> So I can't take this as-is, can you remove this line and resend?
>> Hi Greg,
>>
>> Sorry for the inconvenience, the patch was generated by the bot,
>> we'll check and resend it.
> It's fine that it was generated, it's a bug somewhere that thinks this
> specific patch was a problem so that this generated patch fixed it.
Yes, you are right, we'll fix the bug asap.

>
> Did you all just start running sparse on things again?
Sparse has been running for a long time in our system.

Best Regards,
Rong Chen

>
> thanks,
>
> greg k-h
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [kbuild-all] Re: [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static
  2020-03-27  6:53         ` Rong Chen
@ 2020-04-02  1:33           ` Rong Chen
  0 siblings, 0 replies; 10+ messages in thread
From: Rong Chen @ 2020-04-02  1:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kbuild test robot, Colin King, kbuild-all, Sekhar Nori,
	Roger Quadros, Felipe Balbi, Pawel Laszczak, linux-usb,
	kernel-janitors, linux-kernel



On 3/27/20 2:53 PM, Rong Chen wrote:
>
>
> On 3/27/20 2:42 PM, Greg Kroah-Hartman wrote:
>> On Fri, Mar 27, 2020 at 08:34:52AM +0800, Rong Chen wrote:
>>>
>>> On 3/26/20 9:04 PM, Greg Kroah-Hartman wrote:
>>>> On Thu, Mar 26, 2020 at 08:28:58PM +0800, kbuild test robot wrote:
>>>>> Fixes: 87db1192dc33 ("usb: cdns3: make signed 1 bit bitfields 
>>>>> unsigned")
>>>> This original patch did not "cause" this problem, it's just that 
>>>> you for
>>>> some reason ran sparse for the first time on the file.
>>>>
>>>> So I can't take this as-is, can you remove this line and resend?
>>> Hi Greg,
>>>
>>> Sorry for the inconvenience, the patch was generated by the bot,
>>> we'll check and resend it.
>> It's fine that it was generated, it's a bug somewhere that thinks this
>> specific patch was a problem so that this generated patch fixed it.
> Yes, you are right, we'll fix the bug asap.
>

Hi Greg,

The commit 87db1192dc33 ("usb: cdns3: make signed 1 bit bitfields 
unsigned") fixed a sparse error
which causes many sparse warnings exposed, we'll remove the wrong 
"Fixes" in our patch in future.

Best Regards,
Rong Chen

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 12:50 [PATCH] usb: cdns3: make signed 1 bit bitfields unsigned Colin King
2020-03-26 11:46 ` Peter Chen
2020-03-26 12:28 ` kbuild test robot
2020-03-26 12:28 ` [RFC PATCH] usb: cdns3: cdns3_clear_register_bit() can be static kbuild test robot
2020-03-26 13:04   ` Greg Kroah-Hartman
2020-03-27  0:34     ` [kbuild-all] " Rong Chen
2020-03-27  6:42       ` Greg Kroah-Hartman
2020-03-27  6:53         ` Rong Chen
2020-04-02  1:33           ` Rong Chen
2020-03-27  1:12 ` [kbuild-all] [RFC PATCH v2] " kbuild test robot

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lkml.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lkml.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lkml.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lkml.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lkml.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lkml.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lkml.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lkml.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lkml.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lkml.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git