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: 6591141 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 870019F1C1 for ; Thu, 11 Jun 2015 18:51:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC2222060E for ; Thu, 11 Jun 2015 18:51:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5E53205F9 for ; Thu, 11 Jun 2015 18:51:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752854AbbFKSvf (ORCPT ); Thu, 11 Jun 2015 14:51:35 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:13006 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762AbbFKSve (ORCPT ); Thu, 11 Jun 2015 14:51:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1434048695; x=1465584695; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=xZh8sv6jBv6Gr83maEls3Va0kUnNTddVlSuyM/X2hDU=; b=gb94dTKBlKQJQ2pFFlS1Xl7Ha4Yt5cO8RJIPdU/ExsovshnKp4j8oKyh sAQNsfoYFp177UmGXRMU4vY0x11tpGN67Gw9hecJOlbhDDYvrxu5rirBp 0GsukOE4oWJD68exBsRKRlEaXmM6LbpUE621sYExnyLiC+2T4ML+nn7Ev g=; X-IronPort-AV: E=McAfee;i="5700,7163,7829"; a="215320033" 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 CC: , 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) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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,