mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Tang Bin <tangbin@cmss.chinamobile.com>,
	cernekee@gmail.com, balbi@kernel.org, gregkh@linuxfoundation.org
Cc: f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com,
	linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2]usb: gadget: bcm63xx_udc:remove redundant variable assignment
Date: Tue, 24 Mar 2020 17:50:07 +0300	[thread overview]
Message-ID: <a0afd44f-177d-ad21-02b5-93b15b29399e@cogentembedded.com> (raw)
In-Reply-To: <20200324132029.16296-1-tangbin@cmss.chinamobile.com>

Hello!

On 03/24/2020 04:20 PM, Tang Bin wrote:

> --v1------------------------------------
> In this function, the variable 'rc' is assigned after this place,
> so the definition is invalid.
> 
> --v2------------------------------------
> In this function, the variable 'rc' will be assigned by the function
> 'usb_add_gadget_udc()',so the assignment here is redundant,we should
> remove it.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>

   NAK.

> ---
>  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)

   This *if* branch goes to the 'out_uninit' label which uses 'rc' (and it should
be negative).
   In principle, if you change 'rc' to 'irq' below, this patch would be sane.
It's not as is.

MBR, Sergei

  reply	other threads:[~2020-03-24 14:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 13:20 Tang Bin
2020-03-24 14:50 ` Sergei Shtylyov [this message]
2020-03-24 14:55   ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0afd44f-177d-ad21-02b5-93b15b29399e@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=balbi@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=cernekee@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tangbin@cmss.chinamobile.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®