From patchwork Thu Apr 22 15:35: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: 425871 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp469462jao; Thu, 22 Apr 2021 08:35:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybghdFZxu6WvJz/T1DmqzgVaEj/O/xqf+kMNdaMz83sulSHr8oEcF2kTBtzLqOPSRISMkB X-Received: by 2002:a17:902:264:b029:eb:3d3a:a09c with SMTP id 91-20020a1709020264b02900eb3d3aa09cmr4111099plc.0.1619105754628; Thu, 22 Apr 2021 08:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619105754; cv=none; d=google.com; s=arc-20160816; b=EdJXWNvsIKewKdKNFPI2KmA4qRvbkSneq8Q+QnGeUg6/vCo2L094YM6Llii3WIMOUL mVqMsnlIiD29tOsXaDD1AuFH59M4m9Tmgi2iLlIhntsFMNbAlaOvshHPhPvWWzP6hXpD prT5DfjgbMrqtm0NqCN9Tojn5pwMJvUsDfTj7b1/+Pfg44m0zyX+Uw78MJL3zIoQYbpO INvSJOLuNl/UYiPu6uM9u9zZB01R2DKlZRh12WgLTFKweoTU9yOV8VtQ8AolgTq8G7vL rocrHfGzlXOFtSQnUrvG9aTaJDEs4KUK7VFQD1azTuY8OgfTimyoIIk3O0nNYx/li405 e9IQ== 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=g1pgRrtNrkRRY3bF9Ni8MAe+he05amYDm4UAr+WQlrc=; b=B53sZP+i2nxoR8+wnXcPXApZkizUL1W2NQUdIrmlLk9iSWXed8RZ8fdsfkGSQHUz1E 2HRwSdqnhngrAoIbE97IMxFbouWUgxTZU5q9hQlUfBmZuGn5+lX/+92zwNBa7tm8d1mK aweFkoI+N7QpDPH46RYLPpwrnUP/j/cVhz+7fRqAcb2mrRwrNjaWcwhdfZ+LeNbhMLYc 3IIOZUEyWMyBFzRkSeg+9Y/HEXaMshuTpgjur8JFz7W0gJt3XIiz02URfXPXfKFhKJcd /k9vKGvDRwZRnS8vPlW7RcCUfdPh/SzC6V9DKZea1uK5CyoKJfPsA75Ea7fY3FJdnFAV GP3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rGkxmdrB; 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 y4si3661589pgp.75.2021.04.22.08.35.54; Thu, 22 Apr 2021 08:35:54 -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=rGkxmdrB; 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 S237450AbhDVPg1 (ORCPT + 8 others); Thu, 22 Apr 2021 11:36:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:34676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234158AbhDVPg0 (ORCPT ); Thu, 22 Apr 2021 11:36:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 85F7961450; Thu, 22 Apr 2021 15:35:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619105751; bh=qZkLO17uZzZLFgGvf3mPigG2N3yGL0dvWGWJs4dQJFI=; h=From:To:Cc:Subject:Date:From; b=rGkxmdrBFMxVi+ekVrQyqKXHwgGnE0dX8mODFlz3kc5a411oNGe8P22LZYSCQsNuy v4RvZS5S39bYn1gSwaplaYLpo3bU6Vh3LcnM8TDqAwcpxYD+0Er+81kpUYgoeSeMxF 44NVcmstOA5HKuJs8Dxk3Qfr7IoTDMFuq3kMfGeshbMlHiVkM3T4IH24oVgYo98xAL NkzsoVPZCbyT2hyztNUUesTbKmcZDghbNy4paChsqYq4UHnFRsqSDQe06W4mYss2+N djjBXUxdZOwttELAG42Orr4jGIrhLFvAhOnUpQAgvlvKk4vJiU0VRD58juzI3HAFRD YZgdJKKucddqQ== From: Arnd Bergmann To: Jon Mason , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [v2] vxge: avoid -Wemtpy-body warnings Date: Thu, 22 Apr 2021 17:35:33 +0200 Message-Id: <20210422153543.3378150-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 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 --- v2: correctly pass va_args to avoid warnings --- 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..63f65193dd49 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, ##__VA_ARGS__) #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, ##__VA_ARGS__) #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, ##__VA_ARGS__) #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, ##__VA_ARGS__) #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, ##__VA_ARGS__) #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, ##__VA_ARGS__) #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, ##__VA_ARGS__) #endif #define VXGE_DEVICE_DEBUG_LEVEL_SET(level, mask, vdev) {\