linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: <greearb@candelatech.com>
Cc: <linux-wireless@vger.kernel.org>, <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k: logging for state change transitions.
Date: Fri, 15 Aug 2014 15:16:33 +0300	[thread overview]
Message-ID: <87a976j6ce.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1407274934-5048-1-git-send-email-greearb@candelatech.com> (greearb@candelatech.com's message of "Tue, 5 Aug 2014 14:42:14 -0700")

greearb@candelatech.com writes:

> From: Ben Greear <greearb@candelatech.com>
>
> Print error if device failed to recover.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index b2e7303..ced5eca 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -3905,8 +3905,10 @@ static void ath10k_restart_complete(struct ieee80211_hw *hw)
>  	/* If device failed to restart it will be in a different state, e.g.
>  	 * ATH10K_STATE_WEDGED */
>  	if (ar->state == ATH10K_STATE_RESTARTED) {
> -		ath10k_info("device successfully recovered\n");
> +		ath10k_info("device successfully recovered (state RESTARTED to ON)\n");
>  		ar->state = ATH10K_STATE_ON;

Here I think state prints should be in debug level too.

> +	} else {
> +		ath10k_info("device failed to recover (state %d)\n", ar->state);
>  	}

And should this be ath10k_err() as it's an unrecoverable error?

Also I would prefer this kind of indentation:

	if (ar->state != ATH10K_STATE_RESTARTED) {
                ath10k_err("device failed to recover");
                goto out;
        }

	ath10k_info("device successfully recovered\n");
	ar->state = ATH10K_STATE_ON;

-- 
Kalle Valo

      reply	other threads:[~2014-08-15 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 21:42 [PATCH] ath10k: logging for state change transitions greearb
2014-08-15 12:16 ` Kalle Valo [this message]

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=87a976j6ce.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=greearb@candelatech.com \
    --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).