Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp238431imu; Thu, 8 Nov 2018 00:47:27 -0800 (PST) X-Google-Smtp-Source: AJdET5d0QWVqecoH9W1XwMZajDlyjUfGLT2JNxppSEfGqPPIe4QSiAaHqyJe19t4eiknJRkZwZsq X-Received: by 2002:a62:8749:: with SMTP id i70-v6mr3781234pfe.41.1541666847615; Thu, 08 Nov 2018 00:47:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541666847; cv=none; d=google.com; s=arc-20160816; b=mjsrmUxt4zpzOpLMxg/b365HE6N3FuBc8bMkRuvVJQbwEgKlUGo7AdHSujtlYF7luu vA+JWkHfFOxx7diL+iOyY3Jw3GXlHo721+Y82PMMaTBdyb5zf19Qt1T1PVbUH1qXEOla drxsJrZhZViol1IFZvfhSBcSqYNsUlwJ3ryKwyRsK+YCqpLjrDsgTRnboUitzdGDQOMK /iCUfh2ZMDzyCJhNMMQx6JQlKWHMOpZLRWsqbxq/eDX5APeYi3DZzMX+EpdjNLumw4FH dLzVXZdsBNppu5gJA1QyutraSeAa7G2b3XZ9sEXfO+BFYNNHWy6YtXQCe5s9U78n9DNb z1FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=fSQlnzzcvMh+wu/tVhp7g7PXnqHKpaRaASiwXBGxslU=; b=ullqIpkS28zebTdT99PCzJxCLEvbVI3F1NGLGwlcNFR1Nqi8RXAJAwEm4zM6gJEg5e NAb3k71Uu4jtdrkksme3dU0tcbB1+B8tb7eE161r69/DphIdw1L/hIFAaHTu+3/EFwCJ U42uZaAtCPXAq7dVO3FOdFxBSve0ycSokMiAYwjhuQQ8sx6lZbqhhhQkHXQo4jJOMAHT kmoeiRfrir/iiE+7Be7QpgKxcfO4y6GwCNdL6i1bO6atxrReVbHyoM3PZkJuiF6PLLGJ 7wLI89PQYzZP73qoFgA6Oy2MlwLdXlowftEO/l4jop20rzNSlpGDWHWchdPqg/WwCcH6 y3jQ== 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 bi11-v6si3812841plb.20.2018.11.08.00.47.10; Thu, 08 Nov 2018 00:47:27 -0800 (PST) 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 S1726672AbeKHSVR convert rfc822-to-8bit (ORCPT + 99 others); Thu, 8 Nov 2018 13:21:17 -0500 Received: from out1.zte.com.cn ([202.103.147.172]:57758 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbeKHSVQ (ORCPT ); Thu, 8 Nov 2018 13:21:16 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id C20D1C25573ACE6C7922; Thu, 8 Nov 2018 16:46:46 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wA88kbPQ018522; Thu, 8 Nov 2018 16:46:37 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018110816470782-9408769 ; Thu, 8 Nov 2018 16:47:07 +0800 From: Yi Wang To: pbonzini@redhat.com Cc: rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn, Yi Wang Subject: [PATCH] KVM: x86: fix empty-body warnings Date: Thu, 8 Nov 2018 16:48:36 +0800 Message-Id: <1541666916-35746-1-git-send-email-wang.yi59@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-11-08 16:47:07, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-11-08 16:46:25 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-MAIL: mse01.zte.com.cn wA88kbPQ018522 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get the following warnings about empty statements when building with 'W=1': arch/x86/kvm/lapic.c:632:53: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1907:42: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1936:65: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] arch/x86/kvm/lapic.c:1975:44: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Rework the debug helper macro to get rid of these warnings. Signed-off-by: Yi Wang --- arch/x86/kvm/lapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 89db20f..53b8c8e 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -55,7 +55,7 @@ #define PRIo64 "o" /* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */ -#define apic_debug(fmt, arg...) +#define apic_debug(fmt, arg...) do {} while (0) /* 14 is the version for Xeon and Pentium 8.4.8*/ #define APIC_VERSION (0x14UL | ((KVM_APIC_LVT_NUM - 1) << 16)) -- 1.8.3.1