mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Mathieu Malaterre <malat@debian.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: trivial@kernel.org, Sarah Sharp <sarah.a.sharp@intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB/xHCI: Remove returned value 'status' since never used
Date: Wed, 27 Mar 2019 16:51:20 +0530	[thread overview]
Message-ID: <698062d2-5f7d-6ad8-88c4-5c823961f97a@codeaurora.org> (raw)
In-Reply-To: <20190326201557.20388-1-malat@debian.org>


On 3/27/2019 1:45 AM, Mathieu Malaterre wrote:
> The returned value in status has never been used since
> commit 4296c70a5ec3 ("USB/xHCI: Enable USB 3.0 hub remote wakeup.")
> So remove 'status' completely.
>
> Remove warning (W=1):
>
>    drivers/usb/core/hub.c:3671:8: warning: variable 'status' set but not used [-Wunused-but-set-variable]
>
> Cc: Sarah Sharp <sarah.a.sharp@intel.com>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>   drivers/usb/core/hub.c | 13 ++++++-------
>   1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 8d4631c81b9f..15a2934dc29d 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3668,7 +3668,6 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
>   	struct usb_hub		*hub = usb_get_intfdata(intf);
>   	struct usb_device	*hdev = hub->hdev;
>   	unsigned		port1;
> -	int			status;
>   
>   	/*
>   	 * Warn if children aren't already suspended.
> @@ -3702,12 +3701,12 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
>   	if (hub_is_superspeed(hdev) && hdev->do_remote_wakeup) {
>   		/* Enable hub to send remote wakeup for all ports. */
>   		for (port1 = 1; port1 <= hdev->maxchild; port1++) {
> -			status = set_port_feature(hdev,
> -					port1 |
> -					USB_PORT_FEAT_REMOTE_WAKE_CONNECT |
> -					USB_PORT_FEAT_REMOTE_WAKE_DISCONNECT |
> -					USB_PORT_FEAT_REMOTE_WAKE_OVER_CURRENT,
> -					USB_PORT_FEAT_REMOTE_WAKE_MASK);


should not we check return value instead of removing it.

Thanks,
Mukesh

> +			set_port_feature(hdev,
> +					 port1 |
> +					 USB_PORT_FEAT_REMOTE_WAKE_CONNECT |
> +					 USB_PORT_FEAT_REMOTE_WAKE_DISCONNECT |
> +					 USB_PORT_FEAT_REMOTE_WAKE_OVER_CURRENT,
> +					 USB_PORT_FEAT_REMOTE_WAKE_MASK);
>   		}
>   	}
>   

  reply	other threads:[~2019-03-27 11:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 20:15 Mathieu Malaterre
2019-03-27 11:21 ` Mukesh Ojha [this message]
2019-03-27 15:02 ` Greg Kroah-Hartman
2019-03-27 19:40 ` [PATCH v2] USB: hub: " Mathieu Malaterre

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=698062d2-5f7d-6ad8-88c4-5c823961f97a@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=malat@debian.org \
    --cc=sarah.a.sharp@intel.com \
    --cc=trivial@kernel.org \
    /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®