Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2661718ybh; Mon, 16 Mar 2020 07:25:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuJzAVf1HaY4QE9NrvYWP4iBPQnm5DWsgwecOKz13zHLfP4Vst1QhmKOcKhjDa5xrsOjqX8 X-Received: by 2002:a9d:5e82:: with SMTP id f2mr21726551otl.240.1584368716953; Mon, 16 Mar 2020 07:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584368716; cv=none; d=google.com; s=arc-20160816; b=KljvE5wGhSo39QKi4RLXy+C4myIRn4DZGstbqkG0tPkFUjYfIDj7Dkaw4SGouEnq6R 0qGOrVbmozCL1tyRzAD2tNpTrolqkX79YS4rIdJWk7GALPeQPggnYUGFHcRmLglDmhIr uxpwauqCxCynOR03T6AqZtR9dSBRLH7xxWV/MUfTkoyZ+HQdWLWBr0YjpJb+JUcskEAX Apgs+Ym2B+HZekbXc2vsmPlQY4hyn2PcygmoQQSgTXPwfe9F7ZAWK8D2z9+Zl4Nqu+l7 PyEh51z8LUdwL0/zKVRSrrdoi9yl7/dzb3Oxb88v07KQab77okQsW7I6X6QsErQ7+Wc5 ancg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=BQ46faC6U5YHevyZBRGwRwrgO7xMEZT0C0TmckS02Bs=; b=M5Bx7gxR5gjjl3OA7LWwuJ6bjrGtRtk0/8Sk+t+bu8o6aO+6YxY7js6fbGyVtFE7wi Ywy6h+Yw8CHlqryPOy+wwDqLhcm3WVqzitXvlEgVpqVfJXKwtgT2vPYwb+JTlmHk6Iaa aGF7+1ZdMG4ePthzA9EvqszEu5JU/vJQyK2zHM+CZMu+7mNKGQzFtHFz0ZPfslxymcXR s1xQP6875DJqsctBCjUcObfUso+QL218Qy74jLOvR72fLW3+1iEdHaUudmcX3mm/ILxI if9w3yhWlMb7ori6OFa3BA9SAmwI9uwtXAcW8Y65chEw8EMEK2OcsvfG497hd7tT1qyi iDdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67si45426otj.108.2020.03.16.07.25.02; Mon, 16 Mar 2020 07:25:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731475AbgCPOY2 (ORCPT + 99 others); Mon, 16 Mar 2020 10:24:28 -0400 Received: from m176115.mail.qiye.163.com ([59.111.176.115]:37075 "EHLO m176115.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731455AbgCPOY2 (ORCPT ); Mon, 16 Mar 2020 10:24:28 -0400 Received: from localhost.localdomain (unknown [58.251.74.226]) by m176115.mail.qiye.163.com (Hmail) with ESMTPA id A5C8B664FF8; Mon, 16 Mar 2020 22:24:06 +0800 (CST) From: Zheng Wei To: Catalin Marinas , Will Deacon , Jon Mason , "David S. Miller" , Yunfeng Ye , Hanjun Guo , Thomas Gleixner , Enrico Weigelt , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: kernel@vivo.com, wenhu.wang@vivo.com, Zheng Wei Subject: [PATCH] net: vxge: fix wrong __VA_ARGS__ usage Date: Mon, 16 Mar 2020 22:23:47 +0800 Message-Id: <20200316142354.95201-1-wei.zheng@vivo.com> X-Mailer: git-send-email 2.17.1 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZT1VCTktCQkJMSE1MQ05DQllXWShZQU hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Phg6PBw4EDg6CjYoCksYAxA5 UUtPC0hVSlVKTkNPSE1DTU9MT0tJVTMWGhIXVQweElUBEx4VHDsNEg0UVRgUFkVZV1kSC1lBWU5D VUlOSlVMT1VJSU1ZV1kIAVlBT0xPSTcG X-HM-Tid: 0a70e3bafc5a9373kuwsa5c8b664ff8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org printk in macro vxge_debug_ll uses __VA_ARGS__ without "##" prefix, it causes a build error when there is no variable arguments(e.g. only fmt is specified.). Signed-off-by: Zheng Wei --- drivers/net/ethernet/neterion/vxge/vxge-config.h | 2 +- drivers/net/ethernet/neterion/vxge/vxge-main.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.h b/drivers/net/ethernet/neterion/vxge/vxge-config.h index e678ba379598..077a527bb294 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.h +++ b/drivers/net/ethernet/neterion/vxge/vxge-config.h @@ -2045,7 +2045,7 @@ vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask); if ((level >= VXGE_ERR && VXGE_COMPONENT_LL & VXGE_DEBUG_ERR_MASK) || \ (level >= VXGE_TRACE && VXGE_COMPONENT_LL & VXGE_DEBUG_TRACE_MASK))\ if ((mask & VXGE_DEBUG_MASK) == mask) \ - printk(fmt "\n", __VA_ARGS__); \ + printk(fmt "\n", ##__VA_ARGS__); \ } while (0) #else #define vxge_debug_ll(level, mask, fmt, ...) diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.h b/drivers/net/ethernet/neterion/vxge/vxge-main.h index 59a57ff5e96a..9c86f4f9cd42 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.h +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.h @@ -452,49 +452,49 @@ int vxge_fw_upgrade(struct vxgedev *vdev, char *fw_name, int override); #if (VXGE_DEBUG_LL_CONFIG & VXGE_DEBUG_MASK) #define vxge_debug_ll_config(level, fmt, ...) \ - vxge_debug_ll(level, VXGE_DEBUG_LL_CONFIG, fmt, __VA_ARGS__) + vxge_debug_ll(level, VXGE_DEBUG_LL_CONFIG, fmt, ##__VA_ARGS__) #else #define vxge_debug_ll_config(level, 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__) + vxge_debug_ll(level, VXGE_DEBUG_INIT, fmt, ##__VA_ARGS__) #else #define vxge_debug_init(level, 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__) + vxge_debug_ll(level, VXGE_DEBUG_TX, fmt, ##__VA_ARGS__) #else #define vxge_debug_tx(level, 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__) + vxge_debug_ll(level, VXGE_DEBUG_RX, fmt, ##__VA_ARGS__) #else #define vxge_debug_rx(level, 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__) + vxge_debug_ll(level, VXGE_DEBUG_MEM, fmt, ##__VA_ARGS__) #else #define vxge_debug_mem(level, 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__) + vxge_debug_ll(level, VXGE_DEBUG_ENTRYEXIT, fmt, ##__VA_ARGS__) #else #define vxge_debug_entryexit(level, 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__) + vxge_debug_ll(level, VXGE_DEBUG_INTR, fmt, ##__VA_ARGS__) #else #define vxge_debug_intr(level, fmt, ...) #endif -- 2.17.1