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) {\