Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1319337pxb; Tue, 8 Feb 2022 14:34:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8Fvu8DRUiOsv1oMVk1XfPuuuJUwZ9L65fqUUuA/XlY1JfovYvTDzTGDVFrrYIfzGTWldt X-Received: by 2002:aa7:8055:: with SMTP id y21mr6361497pfm.62.1644359665075; Tue, 08 Feb 2022 14:34:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644359665; cv=none; d=google.com; s=arc-20160816; b=ekuPJpnvuexu/OvejqaghuSwxPB7LhQhMJsKU6EVT1AaHwh6sW8HxFuXtFNPS0+6tS 8NeDSRQERpaCj6nvYGwpRFbLPdw95ipU6tj5ezRMnzOUQyP8NAH/O9HC2H+Q56CU7eG4 ik4BSDCTGERkemnViF1BX4LKKP/Xok7OnF3oaGXR1m56hs4SkmIlPoZisiBDgLhEqOoR gZPmSM2Vqfs/13gl5SAvqC3OUO/bpXMgBa01ydQFsGzdtTigd/7TSkRAIrXXj6hqBoYR 0FsMJNg1PytlDLwBhb7ainaOF0PtBlxK/h1lc/3oPz8mNxg5jbDvhe5NouAoYCi7sJat 5i+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gItGRtBFmuDCuiCd8LZimI8CT8KycScnCN76eWqmpsI=; b=fnsu3rPnBWD3wB8/ByWKIdGDUGitw/p8cC2Rbm/yhU9w+ly6obU1X6B7+fDftvGVr3 2MBa3Gfs0P344vgtAjv6V2nchmBPILoGIDYFaGCVJQPw2zsN7ME5iTjQNaiFrs0pL6Cm TovgYaP5Km13R30QYCnKnaDUE+ql5i98mDbsOhWFDKpNoCFEDupn3k6DFOo9Y4GgP+uV 76zWd9bOx5XdYN8+UNjhNA+pJZYkGgq2VjbcgCl7s0I1Gk+CxvNOG3UQBLxCQSYJ1l+L bBBm/B5AZR1v3RqgJseXKASae5BHOUK6IXoo7q6T+k4FDhm5Pr0PigKYImknpYfrhk9V RTkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EvGmrX7V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n18si12997334pff.307.2022.02.08.14.34.11; Tue, 08 Feb 2022 14:34:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EvGmrX7V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241810AbiBGU05 (ORCPT + 99 others); Mon, 7 Feb 2022 15:26:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234543AbiBGUYc (ORCPT ); Mon, 7 Feb 2022 15:24:32 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AA3DC0401DA; Mon, 7 Feb 2022 12:24:31 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id z4so14391444lfg.5; Mon, 07 Feb 2022 12:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gItGRtBFmuDCuiCd8LZimI8CT8KycScnCN76eWqmpsI=; b=EvGmrX7VLUplcnT7jV/mKf7O+C+eUWXMUppPpYkx6X9DhLk8AvGTjImHanjDBoSfid p+e+YTlRflPL2Ke4p+llrqzuoi+T9WduxnN4OGM6oMSCpsVjeJ9O7fZl8wqmLC7LBbYm Lcnl9+KHWE/ges8niXD9d1f2MdpOQ89TbyZVvnUk+yvUZzfyPqnIrX9SFEdoC7Q5HR/G jZMVmTDWmlvagkAEzMUAUzGHXSJ6ljsOL3VfU1f1tZK9bfUFP5YPVV0UOJOy6vu241i/ AJ+LjR7N37F6Zvsuc/Xfcf2LKt1YDeC+cYmpFjapst9HF1Ag1KTjQRJQugX45T/JUfjf noPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gItGRtBFmuDCuiCd8LZimI8CT8KycScnCN76eWqmpsI=; b=eMB3YV6/oC9E+9DhfI8U3BY4t1gXAnaEp7iRYeUHXCIuPyJe5vxQrdWZ5hxl5/D9dM ilL2o6A7b/yOAdfBGYg1V9tdj6p7QCQvbqhlk2jgRehWWRw2oHM/YQ/D+8UWmzG/820M ObTbrqCDci8aHltmBb4upgCl14NFHJBGhwGtTnC347+OCkWeZPAL+RHsxNfz16qzX8vC R8Q0juoiRKbQe3I9x0DFu7zg5bpkmi/QkOdti5EsJxu815TnLKTE3sxbgH6RigsEL0ev ySa2PBH+BMcIeOrdjZBquivmsH9zwnIT+DzjkhJ1kLLZBBrjhE/HOnXzyTOvk11UpigF mrcw== X-Gm-Message-State: AOAM531OxE4SopaEjVezmel34xcXD8ckR/Zem1nb68iYOcR6pAa03EVb 5cl/PCsc2/XNO7rNj5PnVHEaoQbhZrncEg== X-Received: by 2002:a05:6512:234a:: with SMTP id p10mr767844lfu.15.1644265469479; Mon, 07 Feb 2022 12:24:29 -0800 (PST) Received: from localhost.localdomain ([94.103.224.201]) by smtp.gmail.com with ESMTPSA id m7sm1759127ljh.47.2022.02.07.12.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 12:24:28 -0800 (PST) From: Pavel Skripkin To: ath9k-devel@qca.qualcomm.com, kvalo@kernel.org, davem@davemloft.net, kuba@kernel.org, toke@toke.dk, linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pavel Skripkin Subject: [PATCH v3 2/2] ath9k: htc: clean up *STAT_* macros Date: Mon, 7 Feb 2022 23:24:25 +0300 Message-Id: <28c83b99b8fea0115ad7fbda7cc93a86468ec50d.1644265120.git.paskripkin@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <80962aae265995d1cdb724f5362c556d494c7566.1644265120.git.paskripkin@gmail.com> References: <80962aae265995d1cdb724f5362c556d494c7566.1644265120.git.paskripkin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I've changed *STAT_* macros a bit in previous patch and I seems like they become really unreadable. Align these macros definitions to make code cleaner. Also fixed following checkpatch warning ERROR: Macros with complex values should be enclosed in parentheses Signed-off-by: Pavel Skripkin --- Changes since v2: - My send-email script forgot, that mailing lists exist. Added back all related lists - Fixed checkpatch warning Changes since v1: - Added this patch --- drivers/net/wireless/ath/ath9k/htc.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 141642e5e00d..b4755e21a501 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h @@ -327,14 +327,14 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb) } #ifdef CONFIG_ATH9K_HTC_DEBUGFS -#define __STAT_SAVE(expr) (hif_dev->htc_handle->drv_priv ? (expr) : 0) -#define TX_STAT_INC(c) __STAT_SAVE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) -#define TX_STAT_ADD(c, a) __STAT_SAVE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a) -#define RX_STAT_INC(c) __STAT_SAVE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++) -#define RX_STAT_ADD(c, a) __STAT_SAVE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a) -#define CAB_STAT_INC priv->debug.tx_stats.cab_queued++ - -#define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++) +#define __STAT_SAVE(expr) (hif_dev->htc_handle->drv_priv ? (expr) : 0) +#define TX_STAT_INC(c) __STAT_SAVE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) +#define TX_STAT_ADD(c, a) __STAT_SAVE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a) +#define RX_STAT_INC(c) __STAT_SAVE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++) +#define RX_STAT_ADD(c, a) __STAT_SAVE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a) +#define CAB_STAT_INC (priv->debug.tx_stats.cab_queued++) + +#define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++) void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv, struct ath_rx_status *rs); -- 2.34.1