LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: shuah <shuah@kernel.org>
To: Suwan Kim <suwan.kim027@gmail.com>,
	valentina.manea.m@gmail.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	shuah <shuah@kernel.org>
Subject: Re: [PATCH 2/2] usbip: Remove repeated setting of hcd->state in vhci_bus_resume()
Date: Mon, 6 May 2019 09:16:00 -0600	[thread overview]
Message-ID: <c5c1c46a-14dc-250c-2c14-2868079222e4@kernel.org> (raw)
In-Reply-To: <20190506125550.7826-2-suwan.kim027@gmail.com>

On 5/6/19 6:55 AM, Suwan Kim wrote:
> When hcd resumes, hcd_bus_resume() calls vhci_bus_resume() which sets
> hcd->state as HC_STATE_RUNNING. But after calling vhci_bus_resume(),
> hcd_bus_resume() also sets hcd->state as HC_STATE_RUNNING. So, setting
> hcd->state in vhci_hcd_resume() is unnecessary.
> 
> Signed-off-by: Suwan Kim <suwan.kim027@gmail.com>
> ---
>   drivers/usb/usbip/vhci_hcd.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
> index e6f378d00fb6..335d61676fb4 100644
> --- a/drivers/usb/usbip/vhci_hcd.c
> +++ b/drivers/usb/usbip/vhci_hcd.c
> @@ -1252,8 +1252,6 @@ static int vhci_bus_resume(struct usb_hcd *hcd)
>   	spin_lock_irqsave(&vhci->lock, flags);
>   	if (!HCD_HW_ACCESSIBLE(hcd))
>   		rc = -ESHUTDOWN;
> -	else
> -		hcd->state = HC_STATE_RUNNING;
>   	spin_unlock_irqrestore(&vhci->lock, flags);
>   
>   	return rc;
> 

Tell me more about why you think this change is needed? How did you test
this change?

thanks,
-- Shuah

  reply	other threads:[~2019-05-06 15:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 12:55 [PATCH 1/2] usbip: Remove repeated setting of hcd->state in vhci_bus_suspend() Suwan Kim
2019-05-06 12:55 ` [PATCH 2/2] usbip: Remove repeated setting of hcd->state in vhci_bus_resume() Suwan Kim
2019-05-06 15:16   ` shuah [this message]
2019-05-06 15:13 ` [PATCH 1/2] usbip: Remove repeated setting of hcd->state in vhci_bus_suspend() shuah
2019-05-07 15:49   ` Suwan Kim
2019-05-08 17:28     ` shuah
2019-05-14 11:58       ` Suwan Kim

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=c5c1c46a-14dc-250c-2c14-2868079222e4@kernel.org \
    --to=shuah@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=suwan.kim027@gmail.com \
    --cc=valentina.manea.m@gmail.com \
    --subject='Re: [PATCH 2/2] usbip: Remove repeated setting of hcd->state in vhci_bus_resume()' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).