linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: Nicholas Mc Guire <der.herr@hofr.at>
Cc: Kalle Valo <kvalo@codeaurora.org>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wireless: p54: add handling of the signal case
Date: Thu, 22 Jan 2015 19:13:01 +0100	[thread overview]
Message-ID: <12702639.FEnIjGW6UW@debian64> (raw)
In-Reply-To: <1421731543-13290-1-git-send-email-der.herr@hofr.at>

On Tuesday, January 20, 2015 06:25:43 AM Nicholas Mc Guire wrote:
> if(!wait_for_completion_interruptible_timeout(...))
> only handles the timeout case - this patch adds handling the
> signal case the same as timeout.
> 
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>

> diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c
> index bc065e8..5367d51 100644
> --- a/drivers/net/wireless/p54/fwio.c
> +++ b/drivers/net/wireless/p54/fwio.c
> @@ -249,9 +250,11 @@ int p54_download_eeprom(struct p54_common *priv, void *buf,
>  
>  	p54_tx(priv, skb);
>  
> -	if (!wait_for_completion_interruptible_timeout(
> -	     &priv->eeprom_comp, HZ)) {
> -		wiphy_err(priv->hw->wiphy, "device does not respond!\n");
> +	timeout = wait_for_completion_interruptible_timeout(
> +			&priv->eeprom_comp, HZ);
> +	if (timeout <= 0) {
> +		wiphy_err(priv->hw->wiphy,
> +			"device does not respond or signal received!\n");
>  		ret = -EBUSY;
>  	}
>  	priv->eeprom = NULL;
> 

CHECK: Alignment should match open parenthesis
#98: FILE: drivers/net/wireless/p54/fwio.c:257:
+               wiphy_err(priv->hw->wiphy,
+                       "device does not respond or signal received!\n");

total: 0 errors, 0 warnings, 1 checks, 21 lines checked


  reply	other threads:[~2015-01-22 18:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20  5:25 [PATCH] wireless: p54: add handling of the signal case Nicholas Mc Guire
2015-01-22 18:13 ` Christian Lamparter [this message]
2015-01-23 12:27   ` Nicholas Mc Guire
2015-01-23 19:42     ` Christian Lamparter
2015-01-23 19:34 ` Kalle Valo

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=12702639.FEnIjGW6UW@debian64 \
    --to=chunkeey@googlemail.com \
    --cc=der.herr@hofr.at \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.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;
as well as URLs for NNTP newsgroup(s).