From patchwork Tue Nov 3 20:35:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 316952 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDA58C4742C for ; Tue, 3 Nov 2020 21:25:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C958206E3 for ; Tue, 3 Nov 2020 21:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604438713; bh=sZ8t93zNQELcDGepqwTgvV6yIMe7/KGi5o0tLEh6v4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cCn0VJIFE95Ymuki5OyC3EBs+lAaOE/H//1DysJwob8w/TTKrJmc02DPBTnjqzHdY wuwM0TOjCucxnD6O81fujWN6mbqlpWBLXRFMSS1Z6HLbPx6eLn0yWKddUUWDm9Zwcc haGpMzhG4A+guwV2tZfJJw9TDvD3oDA0ofRrrgT8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387848AbgKCVZN (ORCPT ); Tue, 3 Nov 2020 16:25:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:40464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387845AbgKCVDI (ORCPT ); Tue, 3 Nov 2020 16:03:08 -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 E0E53205ED; Tue, 3 Nov 2020 21:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437386; bh=sZ8t93zNQELcDGepqwTgvV6yIMe7/KGi5o0tLEh6v4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J65FMPkRRgVMyeHFNavEpVtW2Cb/Dp/O7XKtBp5evDK4pqcO3sqBiXqk9GZwHeLD0 AiR5FgbwUOARJT3Mul5bVWUxLC943fUmxmzSaSGOa8IER/XzSx72IlPV8L30RwPVxv TC8WTQR7H4HMLLICEqpizN6D2rrTLeEGeWgK6u5A= 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.19 055/191] powerpc/powernv/smp: Fix spurious DBG() warning Date: Tue, 3 Nov 2020 21:35:47 +0100 Message-Id: <20201103203239.823937506@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203232.656475008@linuxfoundation.org> References: <20201103203232.656475008@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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 8d49ba370c504..889c3dbec6fb9 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c @@ -47,7 +47,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)