Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] usb: gadget: bcm63xx_udc:remove useless variable definition
@ 2020-03-24  6:29 Tang Bin
  2020-03-24  8:35 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Tang Bin @ 2020-03-24  6:29 UTC (permalink / raw)
  To: cernekee, balbi
  Cc: gregkh, f.fainelli, bcm-kernel-feedback-list, linux-usb,
	linux-arm-kernel, linux-kernel, Tang Bin

In this function, the variable 'rc' is assigned after this place,
so the definition is invalid.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/usb/gadget/udc/bcm63xx_udc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index 54501814d..a7afa8c35 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -2321,8 +2321,6 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
 	if (rc)
 		return rc;
 
-	rc = -ENXIO;
-
 	/* IRQ resource #0: control interrupt (VBUS, speed, etc.) */
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-- 
2.20.1.windows.1




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

* Re: [PATCH] usb: gadget: bcm63xx_udc:remove useless variable definition
  2020-03-24  6:29 [PATCH] usb: gadget: bcm63xx_udc:remove useless variable definition Tang Bin
@ 2020-03-24  8:35 ` Sergei Shtylyov
       [not found]   ` <202003241719218101862@cmss.chinamobile.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2020-03-24  8:35 UTC (permalink / raw)
  To: Tang Bin, cernekee, balbi
  Cc: gregkh, f.fainelli, bcm-kernel-feedback-list, linux-usb,
	linux-arm-kernel, linux-kernel

Hello!

On 24.03.2020 9:29, Tang Bin wrote:

> In this function, the variable 'rc' is assigned after this place,
> so the definition is invalid.

    What definition? Did you mean assignment?

> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>   drivers/usb/gadget/udc/bcm63xx_udc.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
> index 54501814d..a7afa8c35 100644
> --- a/drivers/usb/gadget/udc/bcm63xx_udc.c
> +++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
> @@ -2321,8 +2321,6 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
>   	if (rc)
>   		return rc;
>   
> -	rc = -ENXIO;
> -
>   	/* IRQ resource #0: control interrupt (VBUS, speed, etc.) */
>   	irq = platform_get_irq(pdev, 0);
>   	if (irq < 0)

MBR, Sergei

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

* Re: Re: [PATCH] usb: gadget: bcm63xx_udc:remove useless variable definition
       [not found]   ` <202003241719218101862@cmss.chinamobile.com>
@ 2020-03-24 11:06     ` gregkh
  0 siblings, 0 replies; 3+ messages in thread
From: gregkh @ 2020-03-24 11:06 UTC (permalink / raw)
  To: 唐彬
  Cc: Sergei Shtylyov, cernekee, balbi, f.fainelli,
	bcm-kernel-feedback-list, linux-usb, linux-arm-kernel,
	linux-kernel

On Tue, Mar 24, 2020 at 05:19:22PM +0800, 唐彬 wrote:
> Dear Sir:
>         I'm glad for you replay。Yes。I think the variable assignment here can be deleted。

Great, can you please fix up your patch to say that?

thanks,

greg k-h

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24  6:29 [PATCH] usb: gadget: bcm63xx_udc:remove useless variable definition Tang Bin
2020-03-24  8:35 ` Sergei Shtylyov
     [not found]   ` <202003241719218101862@cmss.chinamobile.com>
2020-03-24 11:06     ` gregkh

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

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

Example config snippet for mirrors

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


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