From patchwork Thu Jun 11 18:51:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 6591151 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 816B5C0020 for ; Thu, 11 Jun 2015 18:52:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89B1C20616 for ; Thu, 11 Jun 2015 18:52:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8A3E2060E for ; Thu, 11 Jun 2015 18:52:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z37a0-0005ah-La; Thu, 11 Jun 2015 18:51:56 +0000 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 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1434048715; x=1465584715; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=xZh8sv6jBv6Gr83maEls3Va0kUnNTddVlSuyM/X2hDU=; b=uvTw/8yYNcOqU7Gv8UvL932u0nLxarCYBP0muFv4mSKDD85MqponffPV e7SQf4leHs4WqOjs6J1m5OZ3zztRmMB7iWccjzobUwwiamnowbzIyykQF +XO0BgjsLH4IOz5gF7176ZqjpmJiRKNMUHIBp0HrDiSMZOdRRNVTNGcrs 0=; X-IronPort-AV: E=McAfee;i="5700,7163,7829"; a="215320032" Received: from ironmsg02-lv.qualcomm.com ([10.47.202.183]) by wolverine02.qualcomm.com with ESMTP; 11 Jun 2015 11:51:34 -0700 X-IronPort-AV: E=Sophos;i="5.13,596,1427785200"; d="scan'208";a="32743790" Received: from nasanexm01g.na.qualcomm.com ([10.85.0.33]) by ironmsg02-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 11 Jun 2015 11:51:33 -0700 Received: from potku.adurom.net (10.80.80.8) by NASANEXM01G.na.qualcomm.com (10.85.0.33) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 11 Jun 2015 11:51:30 -0700 From: Kalle Valo To: Michal Kazior 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To NASANEXM01G.na.qualcomm.com (10.85.0.33) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150611_115154_816354_9D2C1F5A X-CRM114-Status: GOOD ( 11.19 ) X-Spam-Score: -5.1 (-----) Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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,