From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z37Zy-0005Tz-Kc for ath10k@lists.infradead.org; Thu, 11 Jun 2015 18:51:55 +0000 From: Kalle Valo Subject: Re: [PATCH 1/2] ath10k: dump fw features during probing References: <1433765734-646-1-git-send-email-michal.kazior@tieto.com> Date: Thu, 11 Jun 2015 21:51:21 +0300 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") Message-ID: <871thiaxjq.fsf@kamboji.qca.qualcomm.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Michal Kazior Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Michal Kazior writes: > This should help when analysing problems from > users and spot fw api blob problems easier. > > Signed-off-by: Michal Kazior [...] > +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