ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH 1/2] ath10k: dump fw features during probing
Date: Thu, 11 Jun 2015 21:51:21 +0300	[thread overview]
Message-ID: <871thiaxjq.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1433765734-646-1-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Mon, 8 Jun 2015 14:15:33 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> This should help when analysing problems from
> users and spot fw api blob problems easier.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

[...]

> +static unsigned int ath10k_core_get_fw_feature_str(char *buf,
> +						   size_t buf_len,
> +						   enum ath10k_fw_features feat)
> +{
> +	if (feat >= ARRAY_SIZE(ath10k_core_fw_feature_str) ||
> +	    WARN_ON(!ath10k_core_fw_feature_str[feat])) {
> +		return scnprintf(buf, buf_len, "bit%d", feat);
> +	} else {
> +		return scnprintf(buf, buf_len, "%s",
> +				 ath10k_core_fw_feature_str[feat]);
> +	}
> +}

I think the else is useless and did the change below in pending branch.
Please review.

--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -123,10 +123,9 @@ static unsigned int ath10k_core_get_fw_feature_str(char *buf,
        if (feat >= ARRAY_SIZE(ath10k_core_fw_feature_str) ||
            WARN_ON(!ath10k_core_fw_feature_str[feat])) {
                return scnprintf(buf, buf_len, "bit%d", feat);
-       } else {
-               return scnprintf(buf, buf_len, "%s",
-                                ath10k_core_fw_feature_str[feat]);
        }
+
+       return scnprintf(buf, buf_len, "%s", ath10k_core_fw_feature_str[feat]);
 }
 
 void ath10k_core_get_fw_features_str(struct ath10k *ar,

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2015-06-11 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 12:15 [PATCH 1/2] ath10k: dump fw features during probing Michal Kazior
2015-06-08 12:15 ` [PATCH 2/2] ath10k: print htt op_version upon driver boot Michal Kazior
2015-06-11 18:51 ` Kalle Valo [this message]
2015-06-12  5:56   ` [PATCH 1/2] ath10k: dump fw features during probing Michal Kazior
2015-06-16 10:08 ` 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=871thiaxjq.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.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