[PATCH 1/2] ath10k: dump fw features during probing
Kalle Valo
kvalo at qca.qualcomm.com
Thu Jun 11 11:51:21 PDT 2015
Michal Kazior <michal.kazior at 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 at 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
More information about the ath10k
mailing list