Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp625925pxx; Mon, 26 Oct 2020 17:19:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU1aN0EVaYrYJNJCMw37eV24+3mglSYliE8C+US3hTnkQlx5Yj+fQhbtHUITV59S4arzWF X-Received: by 2002:a17:907:4273:: with SMTP id nq3mr16780279ejb.439.1603757958029; Mon, 26 Oct 2020 17:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603757958; cv=none; d=google.com; s=arc-20160816; b=IZouidShui7Yzyimhsibrogrx/zYchDXVs3giMHNwJzVNbzrIhe6kJ26CNrMx9nkEv WvC8l+5BDLuxn+xXSvvRxdJTsAqEvWYc5bAYdt/Td7V8n424kivFpMbNkkFn+0C1dzLA GPSpm23a2SRFKaAWGIuO6ba58xm8SEFoM64rIewhHU6eXEvnk8aDYTsJ2/V4PIhbn8uu 83ezX0rSTpwIyg/gfZcREuvlJ82tj51fKRp9zrt9vpkYCfzeecPt8lUR5+J41zXmhHCH w3WiqGwGd0KRdNWhw8PlVBCkwmSpKyGdssVAAeVtqWkdrr1l3h9LncLJfxdEvws/LgNI haWg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=zld1Ou7gjMzseI4E6Fpm1V5Mmug3sBa37SqH/dpn8f8=; b=k3+L9aVkKVpnzdul6JnIzXY5YVUagcwsSxQQHpQUWYGDDR2dIDzZSTfMt4zcilZtav IZ/iJj+LzNpGK++DunYm3y/VLU4J2AbBdyvyFht6+atpjPxKpac65GhewRHg3x+6N9c0 7J0G8RW/s45HW+Qcj9D0pXnHhL0pAdX0i6Ng8hbob9y2SM/P6dDZLIQ/Sr95V35fl7LI kla4ywlAYeNNGk773KGmbkq15zQtTVyrpfU9nmaHLmARxvS4IrkqMHnvrNEmc0RHrYfr a8fE4V1av1KgA7+9ZdrvMYZcvOun5Xvfv2lX+zc/DQqmR/6xBRnIW9HoU+8ordl9DU26 y+iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="q5B/58N8"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si5919224edq.407.2020.10.26.17.18.56; Mon, 26 Oct 2020 17:19:18 -0700 (PDT) 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="q5B/58N8"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436748AbgJZX5U (ORCPT + 99 others); Mon, 26 Oct 2020 19:57:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:33370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410879AbgJZXzT (ORCPT ); Mon, 26 Oct 2020 19:55:19 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E805820770; Mon, 26 Oct 2020 23:55:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603756518; bh=tguj/0U9f+WJ+JjUiME69FnKBajQQPSWVqFnxkZkV5w=; h=From:To:Cc:Subject:Date:From; b=q5B/58N80us3rIytPTYrp4dIhDm8gur0juFgTVoXvs7SF9BcUBLP6vuQytalBuPL9 0Iq9l7AAOyKXzip5M8z3CmcpFm7xEArRSRHg07rHxfRnMO13fKkuxdUzmFHrNemPJG xLSR+I+S7wcfehBjIzh5Us8xMzi0I+/fZl2eIClM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Oliver O'Halloran , Joel Stanley , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.4 01/80] powerpc/powernv/smp: Fix spurious DBG() warning Date: Mon, 26 Oct 2020 19:53:57 -0400 Message-Id: <20201026235516.1025100-1-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore 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 b2ba3e95bda73..bbf361f23ae86 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c @@ -43,7 +43,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.25.1