Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp819980pxb; Tue, 3 Nov 2020 13:28:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzB3GwiPHxOCujj7CI2QQIKJt48MiDqaTEcOrfK4IyC2fsqqY0ORay72F4OVcWeOCV4G6I0 X-Received: by 2002:a05:6402:6d8:: with SMTP id n24mr23904759edy.168.1604438884685; Tue, 03 Nov 2020 13:28:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604438884; cv=none; d=google.com; s=arc-20160816; b=VlmoSTwlDFQE+zUeiyt524Dnev5n3sGzrclt6OS6BQ3U1cHa+P4h3DNmELenPeaAsC G/B2YcGTap0blMiTWtmJt5Y4DZvZUlT8IXKab6IGwQeFVcRcNyS7drScPNvr4OdBfUiM M3AZDZnFhoNlMIpL24Hw46Eg74tJyGnWrVS2R7l7s/Ufv+ta4PT+Izw9YmDw6mkWNjBL EEcg2Tuto1iVdXiOPaaRI8Nikbuo0JBA0ngi6Gz00F+vH6aOqqUY9LIxJQRJRNtb1Joa yAY0d3aRQlyYI/I+37rChxRD4uFzDDIsySU4akz/QOSd9Bicozv9DV7o8+eomkXBOOIL 7j3A== 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=dQOhGIwQSuvzeZyBGLWMQ6YhdbTyMfsmnv3f/rHhWpw=; b=l3OrjVWPLzr8TBl/Oa/SOzw1yLjy2VDivYFkh+uTSWcoiaJbiK88++72T8FvjXNdSY +CMZwxDzqb/YTcuHkZl18TF4eskYHm6JxpgxwhCYh3cu9fGh2XLHqc1RV9/5ECsKprfu s0aA5ufGFGqNOWFZ6YkEoVCkUnS0dz/RJ0rgPpCy32Z/ec575s6MBSvHOahKBfkL+HTu PAToUfVEwDVc08rpFH30FIyVEq4ZIxgVcE9zquwL24qGncM8d2V8fy5TpwhajkNaheRe De44e74fdYAva8fWblkdPEUzmHM7PqH8Q3ZCatovEPGFaBfOFbaEEkmufSf9wVz14zvQ o49g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J65FMPkR; 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 zc3si17895ejb.158.2020.11.03.13.27.41; Tue, 03 Nov 2020 13:28: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=J65FMPkR; 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 S1730862AbgKCVZN (ORCPT + 99 others); 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 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 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) -- 2.27.0