Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3211100pxb; Mon, 9 Nov 2020 05:42:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeEb/3tX6qEzUow04VleyYF/jRr5Mx/e/i0n6jDa5kjFWsEzvmga9awMdxLSUMJksBEk+B X-Received: by 2002:a50:da8d:: with SMTP id q13mr15676825edj.370.1604929324445; Mon, 09 Nov 2020 05:42:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604929324; cv=none; d=google.com; s=arc-20160816; b=r1SMA4GqnMGfc4qXrmQNGFSay3RR+gp3C4kalZ+KOq+4XP08p7fwDpfm5GlzYmWnrl v/7Px5qXcyZBDPUo394ayAlAK+RIIxoJMEBAu+inAJXVZdGwknh3rl0+JNoiNlKzfMi2 cwPBPtjfuiqqIeWYQuYS/pUDtQNX7cr+VIvBsUURFQhdMqNru2slErjBiMGDmQkLgjCN 1vQTHvPEuSwzI2ZiGixS4VLMcGq5S2TUuUEIZDZQ7IwxmR7/bZ23WVZZ9S+uQJRvSL0f QCgKVOvajrHC6dBWiy/8iS6pem3IATZ1FqCBK/22lA0hS36AH+0SZt700cQGgHPcSTLP KN1w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vz+Nd4/Yy6JOMyn94gPlIlhBcYQ5AtoXnhlAYZYr0Wc=; b=xxNzRowMcK1rIMyaBzuJInzNhX/a7m9/L7D3tTzlxzuaWsbBor/r8oocTx+z6/ApxS 2xn29+p+2BwwUKIrPTppNhZGExBG26ISM4F5z/rxZ5lyzJajuVkLP7OlGT983GclMQ9x Ze3hB7/I0R0H4FUujtS29E0hLWkL7n2igNBTIISyLn1LjGynU0Qgx4kzPDR7fY3JxFER vGh8vyFoSbfuGkmeYuLnkpWZX+j+Q202wlwC++BgAVGwvcFRgzzEbkDF3NgoiSeQ1QLO mYNlRGesZQTRdBSq4kCjadVekz///uuOhKUKAf5r/0MwzB/KA1RIM9LdP4Kxzo5bqNqh 0q+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AeJKQaNN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m18si6744213ejb.604.2020.11.09.05.41.40; Mon, 09 Nov 2020 05:42:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=default header.b=AeJKQaNN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388079AbgKINkS (ORCPT + 99 others); Mon, 9 Nov 2020 08:40:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:55838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730606AbgKINBw (ORCPT ); Mon, 9 Nov 2020 08:01:52 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0792421D40; Mon, 9 Nov 2020 13:01:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604926911; bh=54XJTw1GlJhuGOiolu9NjtswkbenYy4vAffjZ8+TTGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AeJKQaNNkzwFUJrPe8XKCES8O9d+LtaQItRIzBxEQUER6NKMoB4XSVji9v0eSmonO Y0E3GWxWfg8McNvRI714xX2xPZRK71SBpyWWKBrNiYvVqYuh2BC2JfcCZqgCxcsK8h 5p5v7kX1zPpdRZFu+Q4Mb5QN3EZuIMCPIb5QMecU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver OHalloran , Joel Stanley , Michael Ellerman , Sasha Levin Subject: [PATCH 4.9 016/117] powerpc/powernv/smp: Fix spurious DBG() warning Date: Mon, 9 Nov 2020 13:54:02 +0100 Message-Id: <20201109125026.414392918@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125025.630721781@linuxfoundation.org> References: <20201109125025.630721781@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oliver O'Halloran [ Upstream commit f6bac19cf65c5be21d14a0c9684c8f560f2096dd ] When building with W=1 we get the following warning: arch/powerpc/platforms/powernv/smp.c: In function ‘pnv_smp_cpu_kill_self’: arch/powerpc/platforms/powernv/smp.c:276:16: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body] 276 | cpu, srr1); | ^ cc1: all warnings being treated as errors The full context is this block: if (srr1 && !generic_check_cpu_restart(cpu)) DBG("CPU%d Unexpected exit while offline srr1=%lx!\n", cpu, srr1); When building with DEBUG undefined DBG() expands to nothing and GCC emits the warning due to the lack of braces around an empty statement. Signed-off-by: Oliver O'Halloran Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804005410.146094-2-oohall@gmail.com Signed-off-by: Sasha Levin --- arch/powerpc/platforms/powernv/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c index eec0e8d0454d1..7e0f5fa0452b3 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c @@ -41,7 +41,7 @@ #include #define DBG(fmt...) udbg_printf(fmt) #else -#define DBG(fmt...) +#define DBG(fmt...) do { } while (0) #endif static void pnv_smp_setup_cpu(int cpu) -- 2.27.0