From patchwork Mon Mar 22 10:43:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406093 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3450732jai; Mon, 22 Mar 2021 03:44:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzja5kJBF2L+UNeZwFO/RwlHOVwu3Ff1pG7k57N1S8gQR2rxgcalZSJxOUgvne6Ksrzmi3m X-Received: by 2002:a17:907:e88:: with SMTP id ho8mr19084148ejc.199.1616409875808; Mon, 22 Mar 2021 03:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616409875; cv=none; d=google.com; s=arc-20160816; b=RWzN07aKRJbLONbOAampc3egyCjl07uszsvqzr8S35IgFOJWAfh22uao995TERBa7S FiijL8x5qhYc1MPcE4y1qz7AlwaKafF85qYAOcgkvL3kpLcXXBQzF10kCzJaZ7ARVlrS Zpne04/N9aDwy7pai4ToV43lTFGMLhR4Dr5BBfvgrCDGIx77PBhemR7oJwUM6P47sHBe 79IuBuwzanjOUK89fOBPZw+lCgGhLqItI0YQSps2UvIdln43bV9csCh7s8EmthM4YCKY AaMra+g/UUY2jRxf6tVIKGXSVf6SW2tdKaUmlKqhl1acAtKw8h8QSCc7rYkjSraEKDK9 qN8w== 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=aTHIzl028yFNpPThPZWL94fdsuXbLtbFcP+eQRgR0rY=; b=kyP2wI3J5S1EQwgK6khDJ/tdMKqOjKhoXkng/D36EljUs1AZnWHZcfkSMcuKKhWd3Y Ppc9yWb8ySS25SRTomjJXqbVP5qTfoCTvdTLNXF37DdsCe8Utis/9PIDKjlwLmtplXSX mknwYy0N9jlXjMDs7JvKUHydTS0rvGe1L3tOrICevSuFdkX3rcDpx5FdeApEQTLvjrXf wV+Y2anL2LyNpwy2IywQRF8qjpudAO8MImNHpMX657EYiSWy4wUEkGfA2DKFpk5vU3R8 sVT/Q1E0ndUvE7nNwBBjee1qqj/ZO3US3GymJp/DZg8zeKNA6KKGFptLqp+IOfD0uMN4 ONrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RUleBEDQ; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si10760432edh.186.2021.03.22.03.44.35; Mon, 22 Mar 2021 03:44:35 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RUleBEDQ; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S229986AbhCVKoH (ORCPT + 8 others); Mon, 22 Mar 2021 06:44:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:54950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbhCVKnr (ORCPT ); Mon, 22 Mar 2021 06:43:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4CAAE61931; Mon, 22 Mar 2021 10:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616409827; bh=h/7NZxyJTdtxn6ErvpBB/wUkK789lbNzLTv0zGToHNI=; h=From:To:Cc:Subject:Date:From; b=RUleBEDQbNtxr/XVMeTQB3bFCK8wL5IgFp+zAf7Q/XkDgePvbTFrcgBhLJExR6MtW 5XdFWaD5JoJggZfhMaGXXEfCVkR6bhNKl7pSlawtXNRKZAeTP1dGZcRLbS5L6eN8Br loJqlQU0voQMzCKUeVLClq9+NOXy2egCF3KsG8tluTHz1TKqWB5Mmck3HQd2pBQVcb GOGWLAQTXP3oK1HPQXiojKhO8bS00wVpFf3xUYpV54l0g3/vdoJLet7zrWqnH+puEd Ds6YbxCgvhLgeOaKd6N562W/lm+SAk40FXtzXvJYCETrq3aRwtG8g6lQgLlCQq0G5l 697DH6H7Y6Q5w== From: Arnd Bergmann To: netdev@vger.kernel.org, Karsten Keil Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/5] misdn: avoid -Wempty-body warning Date: Mon, 22 Mar 2021 11:43:31 +0100 Message-Id: <20210322104343.948660-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann gcc warns about a pointless condition: drivers/isdn/hardware/mISDN/hfcmulti.c: In function 'hfcmulti_interrupt': drivers/isdn/hardware/mISDN/hfcmulti.c:2752:17: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 2752 | ; /* external IRQ */ Change this as suggested by gcc, which also fits the style of the other conditions in this function. Signed-off-by: Arnd Bergmann --- drivers/isdn/hardware/mISDN/hfcmulti.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.29.2 Acked-by: Stanislaw Gruszka diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 7013a3f08429..8ab0fde758d2 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -2748,8 +2748,9 @@ hfcmulti_interrupt(int intno, void *dev_id) if (hc->ctype != HFC_TYPE_E1) ph_state_irq(hc, r_irq_statech); } - if (status & V_EXT_IRQSTA) - ; /* external IRQ */ + if (status & V_EXT_IRQSTA) { + /* external IRQ */ + } if (status & V_LOST_STA) { /* LOST IRQ */ HFC_outb(hc, R_INC_RES_FIFO, V_RES_LOST); /* clear irq! */ From patchwork Mon Mar 22 10:43:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406095 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3451383jai; Mon, 22 Mar 2021 03:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/i9cmoMpCqbGoMyTYkeuPno4U087UkC0gwTYkdrnmOw8a9/h3EnAw65iunmELq5GaQm7o X-Received: by 2002:aa7:d4d6:: with SMTP id t22mr25398854edr.376.1616409942541; Mon, 22 Mar 2021 03:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616409942; cv=none; d=google.com; s=arc-20160816; b=Ubmewd7T0FYC2ELLt1IJdRYQjRpYdT0J7AFJh+OMJeC0WhowCcX3Pb6hy/9zGK0aEj yScN11GLJqb3GYBw3qnz/TdcQPHcufEKj03w7nnjQvGRpe3QTyvn6mRhDdYdX6LXjf3Y HPQieJ9RA2rNK7jLpAOCagIlOzTZdjeNQ6GPRMB62aB4KXI3jpstX3DMD69BI9Zwh50g evPxnZ2k5uLqOFjOvrpLj/jL8DaHI8ZFBB8gxwzQcmz0fqzSv2XmFjgMuNIChcHBBCgn 3eGu9DwPSlJ/4SYcNPuFp6S/JWwLAd/5FUvyWqI4E2sEpvZw4ICOG672fr9BR0DIKp2g XZVQ== 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=kEqwhha5bMNEn6WZsQwbSuBXlaC1z+zOYyiopeWvVZE=; b=JLi7MucYEoLWlKiI+vJRRu8UlMcwEuTBx294Qie3jkSvYho79Wp5fwcizqVJ7cCkNM 94fKOCIrZ5uoibNU2mOOWXt7zrosb5ROqnEq2+5CAHIwsjQzmt9dVQsaL/67L0mxYERI iI6r7Z9XZF+b3WkH2/AMnsfkFRfYvpQMLzlwIj844JgFUr+PCxCBs+b47tQI9Glol1fe USBUBVDXzCpfT2sEs8FPgUnrlvTXNAbK3FoDZMbCvnhi+6QUAb4Hi5OE8iL0fm3hNGpv bRmSVYTlL3RUfCCr8oSiBJbtpaEW0YqQX6rZAhcUuvqoSj9hV/afsGqEbRszNSiNC2Kn 7w/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cPqdnpIc; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hc39si10809881ejc.125.2021.03.22.03.45.41; Mon, 22 Mar 2021 03:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cPqdnpIc; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S230299AbhCVKpK (ORCPT + 8 others); Mon, 22 Mar 2021 06:45:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:55236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbhCVKoi (ORCPT ); Mon, 22 Mar 2021 06:44:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4C6E561931; Mon, 22 Mar 2021 10:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616409878; bh=4DHr4ASfBHeq91iw3ENPpzdWKJXn5AZnZFrECFYNDQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cPqdnpIc76Sfc4S0WxhticZnlpY46xJtVyxtipkLrFREoyJDHLvaO/JOmmYxuBWn2 Q0FCwxw6Vr4/fhlrJgzOVXrxEJh/QNygiAQyTlOcSVijlINs+eiK85+SosPEEv7Fxd 8oBK07+cbrYR03jU9PREWW2n1R/sW1vihSey94bPNz1rEkiqTuQQvCbV/pphwWOsUR HTquMlF8zDU10yLDmixg4KhY+reClZyxOHPp9D85pRg/4e0TgeCXDdxEVTbUAbN/BL uUTzQafLyU5Im+LELXwwuizxaAm0DYAjBRKAjYTUp2h940q/MYbRnKEK0i5TyK9AY6 bT5zKR5TkZb6g== From: Arnd Bergmann To: netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , dccp@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/5] dccp: avoid Wempty-body warning Date: Mon, 22 Mar 2021 11:43:32 +0100 Message-Id: <20210322104343.948660-2-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322104343.948660-1-arnd@kernel.org> References: <20210322104343.948660-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann There are a couple of warnings in this driver when building with W=1: net/dccp/output.c: In function 'dccp_xmit_packet': net/dccp/output.c:283:71: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 283 | dccp_pr_debug("transmit_skb() returned err=%d\n", err); | ^ net/dccp/ackvec.c: In function 'dccp_ackvec_update_old': net/dccp/ackvec.c:163:80: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 163 | (unsigned long long)seqno, state); | ^ Change the empty debug macros to no_printk(), which avoids the warnings and adds useful format string checks. Signed-off-by: Arnd Bergmann --- net/dccp/dccp.h | 6 +++--- net/dccp/proto.c | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) -- 2.29.2 diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 9cc9d1ee6cdb..8a5163620bc3 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -41,9 +41,9 @@ extern bool dccp_debug; #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a) #define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a) #else -#define dccp_pr_debug(format, a...) -#define dccp_pr_debug_cat(format, a...) -#define dccp_debug(format, a...) +#define dccp_pr_debug(format, a...) no_printk(format, ##a) +#define dccp_pr_debug_cat(format, a...) no_printk(format, ##a) +#define dccp_debug(format, a...) no_printk(format, ##a) #endif extern struct inet_hashinfo dccp_hashinfo; diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 6d705d90c614..97a175eaf247 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -51,7 +51,6 @@ EXPORT_SYMBOL_GPL(dccp_hashinfo); /* the maximum queue length for tx in packets. 0 is no limit */ int sysctl_dccp_tx_qlen __read_mostly = 5; -#ifdef CONFIG_IP_DCCP_DEBUG static const char *dccp_state_name(const int state) { static const char *const dccp_state_names[] = { @@ -73,7 +72,6 @@ static const char *dccp_state_name(const int state) else return dccp_state_names[state]; } -#endif void dccp_set_state(struct sock *sk, const int state) { From patchwork Mon Mar 22 10:43:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406540 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7765C433E1 for ; Mon, 22 Mar 2021 10:45:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A96EF6198C for ; Mon, 22 Mar 2021 10:45:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230324AbhCVKpL (ORCPT ); Mon, 22 Mar 2021 06:45:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:55294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhCVKpD (ORCPT ); Mon, 22 Mar 2021 06:45:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DAE2761931; Mon, 22 Mar 2021 10:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616409903; bh=zSlzhTb9+O7YX45ZK09VbrHld90WpzlBFw4V1GQ4JBA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M7J+pr2zXhZare1qLpPeu2g2PTWhQw5yYHBQ2W7k4u9qZK+C4eSmlGHD83+0rs12F 56shnLHZG9zERgEWRgLiGZI4E4HhfjSF1Q58zdo6nuimaUZLA3bTikyt/x3wNp1l5i hg2uQ2Ixb6wFRArR8uHOS0ejrkEOCIKfhSNyKnyovh/1/lgkG9Y5AAN2LunlzwxYkV MFEwGp+7uXBi29JGHdQnzNw35DIJ8hjh31NnJ87M+Ca8OyLBQplv8x9q+rHYa17uXh YeHw7Ajir+/74iLpL0myyjR+dK5o/4grFXdanVXWeO44MktT3lisssE3+aVV/BaNFQ GbPxKt0lWnLjQ== From: Arnd Bergmann To: netdev@vger.kernel.org, Stanislaw Gruszka , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Lee Jones , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/5] iwlegacy: avoid -Wempty-body warning Date: Mon, 22 Mar 2021 11:43:33 +0100 Message-Id: <20210322104343.948660-3-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322104343.948660-1-arnd@kernel.org> References: <20210322104343.948660-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann There are a couple of warnings in this driver when building with W=1: drivers/net/wireless/intel/iwlegacy/common.c: In function 'il_power_set_mode': drivers/net/wireless/intel/iwlegacy/common.c:1195:60: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 1195 | il->chain_noise_data.state); | ^ drivers/net/wireless/intel/iwlegacy/common.c: In function 'il_do_scan_abort': drivers/net/wireless/intel/iwlegacy/common.c:1343:57: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] Change the empty debug macros to no_printk(), which avoids the warnings and adds useful format string checks. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/intel/iwlegacy/3945-mac.c | 2 -- drivers/net/wireless/intel/iwlegacy/common.c | 2 -- drivers/net/wireless/intel/iwlegacy/common.h | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c index 4ca8212d4fa4..6ff2674f8466 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c @@ -751,9 +751,7 @@ il3945_hdl_alive(struct il_priv *il, struct il_rx_buf *rxb) static void il3945_hdl_add_sta(struct il_priv *il, struct il_rx_buf *rxb) { -#ifdef CONFIG_IWLEGACY_DEBUG struct il_rx_pkt *pkt = rxb_addr(rxb); -#endif D_RX("Received C_ADD_STA: 0x%02X\n", pkt->u.status); } diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c index 0651a6a416d1..219fed91cac5 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.c +++ b/drivers/net/wireless/intel/iwlegacy/common.c @@ -1430,10 +1430,8 @@ static void il_hdl_scan_complete(struct il_priv *il, struct il_rx_buf *rxb) { -#ifdef CONFIG_IWLEGACY_DEBUG struct il_rx_pkt *pkt = rxb_addr(rxb); struct il_scancomplete_notification *scan_notif = (void *)pkt->u.raw; -#endif D_SCAN("Scan complete: %d channels (TSF 0x%08X:%08X) - %d\n", scan_notif->scanned_channels, scan_notif->tsf_low, diff --git a/drivers/net/wireless/intel/iwlegacy/common.h b/drivers/net/wireless/intel/iwlegacy/common.h index ea1b1bb7ddcb..40877ef1fbf2 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.h +++ b/drivers/net/wireless/intel/iwlegacy/common.h @@ -2937,7 +2937,7 @@ do { \ } while (0) #else -#define IL_DBG(level, fmt, args...) +#define IL_DBG(level, fmt, args...) no_printk(fmt, ##args) static inline void il_print_hex_dump(struct il_priv *il, int level, const void *p, u32 len) { From patchwork Mon Mar 22 10:43:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B25AC433E1 for ; Mon, 22 Mar 2021 10:46:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39FA66198F for ; Mon, 22 Mar 2021 10:46:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230353AbhCVKpm (ORCPT ); Mon, 22 Mar 2021 06:45:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:55314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230174AbhCVKpU (ORCPT ); Mon, 22 Mar 2021 06:45:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C438B61937; Mon, 22 Mar 2021 10:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616409919; bh=PSDbuiA+J5uMCeFxNECOcgTK5RynWKPdyMjFLLCjnfw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rRd+pWoue2HUGEFYmUF+B3GtWuJQn66Ps+jiriHMjPCnr05onQqvhfaCGn4vWIxKU og5ldKlnYmjxZWzPD1/IiVFPd7FBtwCXOWgvKswbueFHmufOY+4HdU65C6bPDcNr3O Afy+xSSVy3PMyYWko06pmweU3MQbGIFWgIzBo8plxdlwDQHTu66I6kH5owKoGO25Oe 2YSWMVBk1vzeHxLvFxFpMfpC+z1ACCw3y8YWSq/1XJcxVoR8A1v0JiDAo6VZn41/8P BGcZqQepkqZy9hWUnXrDkr6sUuzgMDzwhKHGhovQ82Y7gvgu77Q402IE3qOo+iSbmz GWpNZb8nuS7Ag== From: Arnd Bergmann To: netdev@vger.kernel.org, Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Jason Yan , Lubomir Rintel , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 4/5] libertas: avoid -Wempty-body warning Date: Mon, 22 Mar 2021 11:43:34 +0100 Message-Id: <20210322104343.948660-4-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322104343.948660-1-arnd@kernel.org> References: <20210322104343.948660-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann Building without mesh supports shows a couple of warnings with 'make W=1': drivers/net/wireless/marvell/libertas/main.c: In function 'lbs_start_card': drivers/net/wireless/marvell/libertas/main.c:1068:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 1068 | lbs_start_mesh(priv); Change the macros to use the usual "do { } while (0)" instead to shut up the warnings and make the code a litte more robust. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/marvell/libertas/mesh.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/marvell/libertas/mesh.h b/drivers/net/wireless/marvell/libertas/mesh.h index d49717b20c09..44c4cd0230a8 100644 --- a/drivers/net/wireless/marvell/libertas/mesh.h +++ b/drivers/net/wireless/marvell/libertas/mesh.h @@ -60,13 +60,13 @@ void lbs_mesh_ethtool_get_strings(struct net_device *dev, #else -#define lbs_init_mesh(priv) -#define lbs_deinit_mesh(priv) -#define lbs_start_mesh(priv) -#define lbs_add_mesh(priv) -#define lbs_remove_mesh(priv) +#define lbs_init_mesh(priv) do { } while (0) +#define lbs_deinit_mesh(priv) do { } while (0) +#define lbs_start_mesh(priv) do { } while (0) +#define lbs_add_mesh(priv) do { } while (0) +#define lbs_remove_mesh(priv) do { } while (0) #define lbs_mesh_set_dev(priv, dev, rxpd) (dev) -#define lbs_mesh_set_txpd(priv, dev, txpd) +#define lbs_mesh_set_txpd(priv, dev, txpd) do { } while (0) #define lbs_mesh_set_channel(priv, channel) (0) #define lbs_mesh_activated(priv) (false) From patchwork Mon Mar 22 10:43:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406097 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3451752jai; Mon, 22 Mar 2021 03:46:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzlGynhBdRgzUhYAxEnlJ/31hIhzRSP+HZ9fHma9he8Dss7NG1Kr14adsFK/b9+3jbzcnk X-Received: by 2002:a17:906:3544:: with SMTP id s4mr16336740eja.73.1616409974442; Mon, 22 Mar 2021 03:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616409974; cv=none; d=google.com; s=arc-20160816; b=I+QDhnJPcZf2kFRbTN+JZxmsFUI5OmttOfZCyJ1N8wfldgmU4xxXJU30YE2SjFLEUJ 6RITECY/uUh8leK9Vd+to2nw0tnfRCB4Vy0UkKVFdl79J4pCQ9z2L387+BcPMXTLoAxu c+3+ABp2/6/te1q+RXyE0/mIx8BwTG0k2r/lGeJIuQSZ/HX4XPk5En6hIVFujMciOc7x D8a/+VttG626Km77KFYYheBELp4cPd8NIBL9vQOqdDrjjzxK6TvfkU8NiqvA65tDZZEB 7PinF1JRKkxISMIvbtijmuL64e697WeEv7tRSRLmTpF+XtZS/e46yedouM/1IR4f9pVF te5g== 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=Pjfaz7xmU5RllIW+VWxP87CuZ6OS9rsVOy2Iiyk1Upg=; b=DiOkcc2N+H+6pla72gWKiAtqtNhChS8n+kktnTN1wVz5Ra0QpC5Ri2QNuJXTDlw6Mk t+ruIz6auOaOkdJx+Ps4/81pAfThcQGN5lqw3TYlFuHuDxCf+q47W/1hbjs5CRePspHv FS2bla+DW9R49JXx4wTDlTKdvstNObo5COnHQGp03tjhefpM6Y3eJXo2j+6aC50MjCAj xWMIJXAZqo4VQEyJrtXHYcMXieWlJB3TCgl39x4atg19iImvkmFoJ5RaIUCUxKjhHllT AO8krSfZC1Yj0ytknezgXGq2elighcP+x9+Ldx2Ncb6tCazcpqlc7NCJplQ9DugA8KHT u/wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z5SXCPcD; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hc39si10809881ejc.125.2021.03.22.03.46.14; Mon, 22 Mar 2021 03:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z5SXCPcD; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S230366AbhCVKpo (ORCPT + 8 others); Mon, 22 Mar 2021 06:45:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:55344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230340AbhCVKp2 (ORCPT ); Mon, 22 Mar 2021 06:45:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 878A56198C; Mon, 22 Mar 2021 10:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616409927; bh=0/w4RFVux1+2Ik/9qofr1ADX1qFjT5bWbNPjiWlo9uI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z5SXCPcDzww3Ao0FayG8EFuUv6DkUgd6FVoe6PuvYAhTlhvm2rx8xlOOmfQI6L4IL Oj4L/uavPxTByS2DxTOEJvPBIegB3CaAPy5qe4cZJQGaQcwzoiJLwAVyPncPY/kj7i ETJRlDhPpucLQT45k7522iDr1EzyJzVxIfFnOuZ8MAXr+Ej5i1KbcvPx5pbPXvJDf5 QrxV6IHPc9dUnxG+X8lcSRGwUAvLSNyQQKHOoztb1rV63bxnBGGTeToTzMWjH93laH 0WYW9sYxUNZdszBegeptYydbO9vphfW0eyV4+Jy5QTmU8JQVWM+vMDkcr/NaFIir8s CT1co7/nGIrbA== From: Arnd Bergmann To: netdev@vger.kernel.org, Jon Mason , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH net-next 5/5] vxge: avoid -Wemtpy-body warnings Date: Mon, 22 Mar 2021 11:43:35 +0100 Message-Id: <20210322104343.948660-5-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322104343.948660-1-arnd@kernel.org> References: <20210322104343.948660-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann There are a few warnings about empty debug macros in this driver: drivers/net/ethernet/neterion/vxge/vxge-main.c: In function 'vxge_probe': drivers/net/ethernet/neterion/vxge/vxge-main.c:4480:76: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 4480 | "Failed in enabling SRIOV mode: %d\n", ret); Change them to proper 'do { } while (0)' expressions to make the code a little more robust and avoid the warnings. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/neterion/vxge/vxge-main.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.29.2 diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.h b/drivers/net/ethernet/neterion/vxge/vxge-main.h index 9c86f4f9cd42..55673fdebe3e 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.h +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.h @@ -454,49 +454,49 @@ int vxge_fw_upgrade(struct vxgedev *vdev, char *fw_name, int override); #define vxge_debug_ll_config(level, fmt, ...) \ vxge_debug_ll(level, VXGE_DEBUG_LL_CONFIG, fmt, ##__VA_ARGS__) #else -#define vxge_debug_ll_config(level, fmt, ...) +#define vxge_debug_ll_config(level, fmt, ...) no_printk(fmt) #endif #if (VXGE_DEBUG_INIT & VXGE_DEBUG_MASK) #define vxge_debug_init(level, fmt, ...) \ vxge_debug_ll(level, VXGE_DEBUG_INIT, fmt, ##__VA_ARGS__) #else -#define vxge_debug_init(level, fmt, ...) +#define vxge_debug_init(level, fmt, ...) no_printk(fmt) #endif #if (VXGE_DEBUG_TX & VXGE_DEBUG_MASK) #define vxge_debug_tx(level, fmt, ...) \ vxge_debug_ll(level, VXGE_DEBUG_TX, fmt, ##__VA_ARGS__) #else -#define vxge_debug_tx(level, fmt, ...) +#define vxge_debug_tx(level, fmt, ...) no_printk(fmt) #endif #if (VXGE_DEBUG_RX & VXGE_DEBUG_MASK) #define vxge_debug_rx(level, fmt, ...) \ vxge_debug_ll(level, VXGE_DEBUG_RX, fmt, ##__VA_ARGS__) #else -#define vxge_debug_rx(level, fmt, ...) +#define vxge_debug_rx(level, fmt, ...) no_printk(fmt) #endif #if (VXGE_DEBUG_MEM & VXGE_DEBUG_MASK) #define vxge_debug_mem(level, fmt, ...) \ vxge_debug_ll(level, VXGE_DEBUG_MEM, fmt, ##__VA_ARGS__) #else -#define vxge_debug_mem(level, fmt, ...) +#define vxge_debug_mem(level, fmt, ...) no_printk(fmt) #endif #if (VXGE_DEBUG_ENTRYEXIT & VXGE_DEBUG_MASK) #define vxge_debug_entryexit(level, fmt, ...) \ vxge_debug_ll(level, VXGE_DEBUG_ENTRYEXIT, fmt, ##__VA_ARGS__) #else -#define vxge_debug_entryexit(level, fmt, ...) +#define vxge_debug_entryexit(level, fmt, ...) no_printk(fmt) #endif #if (VXGE_DEBUG_INTR & VXGE_DEBUG_MASK) #define vxge_debug_intr(level, fmt, ...) \ vxge_debug_ll(level, VXGE_DEBUG_INTR, fmt, ##__VA_ARGS__) #else -#define vxge_debug_intr(level, fmt, ...) +#define vxge_debug_intr(level, fmt, ...) no_printk(fmt) #endif #define VXGE_DEVICE_DEBUG_LEVEL_SET(level, mask, vdev) {\