Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1344433rwb; Thu, 15 Dec 2022 09:02:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf5bV6AsnEBLD14jHQxEy5KKdaedknoKj3aTVHtXsn5Q6b/vkRG15BI2gI6HxxYxTLrNEAlV X-Received: by 2002:a05:6402:5305:b0:462:6ace:34cb with SMTP id eo5-20020a056402530500b004626ace34cbmr24323384edb.0.1671123726554; Thu, 15 Dec 2022 09:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671123726; cv=none; d=google.com; s=arc-20160816; b=NCZV4RRvsgdM5vquFW9Yx5qCjXudqnkBWhrcDzCFuBpB4olHmNjnCymWMTM+pHSWaM mGSLdkjATmbNNcRerMk65Be1KCPVvpPOwk90y174gjyyuNgbjmOtPAvzQvow6fHkdqXM 8r6a4zml74Bt+9CvcvUoy2tP9gTUKLGFuPJVFRnjItrzOar7Y1fgWq3crSJlVoO3+JBd 4/zJ5RTifN5nh1dlBSBUTisDxdeiuREr3g4pDZLoBCzxh+EEONbeKRcP4BICqc86kT4a xdEWuE4TsgIp4h1vEIrExqp6t+448EtqO3ud1HThJ9HNZx6lODvFf/CcbwoatKFL/6rw 5juA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=rwfwawr+0yBhMM2634VZPw1k6oy9S5zm2ZJOKaEKpuU=; b=d/lV6wJQghdjeAMQ23d/0YmMAOsWIXPn41gv+gwrMi6MfFVGofgjBdwh5y2NKF5e8M Sk3WSx/nrbu1U49kGgAUceLyTOV7e6iIZEt91Y2maWlBTZR/0EwVz/fczaq+2CYImLyK hdjwTk1juJl6D4omc79zt8HNtg5cjVBu7d3FcELbQSVYc1f5XZEALpLvdYOGNUDgGx57 UG6nCHRIr/HaHQOvnJihzIAdArwVOeld3NWOhDR81xo0E6gVNC+LbTR/sHw1YEewr7VY vb3x4+wHYW3uVuuGCQUnmMhVsiGrTY4qJBQNHWaZ9YBh2XO3KmjJqMfi4t4L87HJV6Qo boyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LXoIjw5r; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020aa7dcc5000000b0046a09ce4d12si14290449edu.339.2022.12.15.09.01.48; Thu, 15 Dec 2022 09:02:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=@kernel.org header.s=k20201202 header.b=LXoIjw5r; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230395AbiLOQ4L (ORCPT + 67 others); Thu, 15 Dec 2022 11:56:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbiLOQ4C (ORCPT ); Thu, 15 Dec 2022 11:56:02 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97CE6E088; Thu, 15 Dec 2022 08:56:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4D5C1B81C03; Thu, 15 Dec 2022 16:56:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69E0BC433EF; Thu, 15 Dec 2022 16:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671123359; bh=tVhkH/FcY9gESy+V3xeK947kCGObkEYr+sAE3pHakis=; h=From:To:Cc:Subject:Date:From; b=LXoIjw5ra7kHRbvYTXP6NigITE4JtnJBxLDqJvA4kbg7jKh7PCVIvaWKZXXlEpAA+ Ha1v4BRa9Gnf6/ruDAN2j/Y/EXBz65z2x77sh3ozb/BZoeP263lObyomW2MW75Rqcr vd0uZ6dtjPt3xtmRkG5sSdNQ3v+0FWP8UtQ9YCYnXzb+5QzogKJOfxyaLbZ1thQayo lWfWdEIsOCy8HMjoI+z68/JlRbUVoxxgC2y8rFRfUZ7ofb3ujdTtH90M0KxjoJ8rXb wqQ1Qj5F2Uni/kMo6MwlxGch9dneycHhG96i0Qglyy8DH+ufc+U6+CH3Vqcsz2/qUh 2Yumvup4npcjw== From: Arnd Bergmann To: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , Pavel Skripkin Cc: Arnd Bergmann , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Tetsuo Handa , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ath9k: use proper statements in conditionals Date: Thu, 15 Dec 2022 17:55:42 +0100 Message-Id: <20221215165553.1950307-1-arnd@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-wireless@vger.kernel.org From: Arnd Bergmann A previous cleanup patch accidentally broke some conditional expressions by replacing the safe "do {} while (0)" constructs with empty macros. gcc points this out when extra warnings are enabled: drivers/net/wireless/ath/ath9k/hif_usb.c: In function 'ath9k_skb_queue_complete': drivers/net/wireless/ath/ath9k/hif_usb.c:251:57: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 251 | TX_STAT_INC(hif_dev, skb_failed); Make both sets of macros proper expressions again. Fixes: d7fc76039b74 ("ath9k: htc: clean up statistics macros") Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ath/ath9k/htc.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 30f0765fb9fd..237f4ec2cffd 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h @@ -327,9 +327,9 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb) } #ifdef CONFIG_ATH9K_HTC_DEBUGFS -#define __STAT_SAFE(hif_dev, expr) ((hif_dev)->htc_handle->drv_priv ? (expr) : 0) -#define CAB_STAT_INC(priv) ((priv)->debug.tx_stats.cab_queued++) -#define TX_QSTAT_INC(priv, q) ((priv)->debug.tx_stats.queue_stats[q]++) +#define __STAT_SAFE(hif_dev, expr) do { ((hif_dev)->htc_handle->drv_priv ? (expr) : 0); } while (0) +#define CAB_STAT_INC(priv) do { ((priv)->debug.tx_stats.cab_queued++); } while (0) +#define TX_QSTAT_INC(priv, q) do { ((priv)->debug.tx_stats.queue_stats[q]++); } while (0) #define TX_STAT_INC(hif_dev, c) \ __STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.tx_stats.c++) @@ -378,10 +378,10 @@ void ath9k_htc_get_et_stats(struct ieee80211_hw *hw, struct ethtool_stats *stats, u64 *data); #else -#define TX_STAT_INC(hif_dev, c) -#define TX_STAT_ADD(hif_dev, c, a) -#define RX_STAT_INC(hif_dev, c) -#define RX_STAT_ADD(hif_dev, c, a) +#define TX_STAT_INC(hif_dev, c) do { } while (0) +#define TX_STAT_ADD(hif_dev, c, a) do { } while (0) +#define RX_STAT_INC(hif_dev, c) do { } while (0) +#define RX_STAT_ADD(hif_dev, c, a) do { } while (0) #define CAB_STAT_INC(priv) #define TX_QSTAT_INC(priv, c) -- 2.35.1