Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7216871ybi; Wed, 5 Jun 2019 13:19:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPBbtMpxCxWVOaP0QPyEo31KhuNuJdcs65NSUXvIZD7V3cra+TGY77s+1ZDbUuQ11qg0+z X-Received: by 2002:a63:c744:: with SMTP id v4mr734340pgg.370.1559765991653; Wed, 05 Jun 2019 13:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559765991; cv=none; d=google.com; s=arc-20160816; b=M8cawLvDL41Mts03vywgMSLUPZmD4Ms3hZNOf1cSxuIq1DAu80Vig++w8jXhBbGHe4 ICNLVraaN1GL4ZyZHfCGtUCKO5CjyeVdVBDX3sq6QgIJdqlPfYg3e1DWdqGpgKEGTaBI Wid+D4Vnr0BpHTKdQ42iJjiIr4uO7oM1CRmjJd2jD+PRQz5Maok9aMZpwrpgA8bMt6Wy vJ5niYcrbPpZu8Ogy6SBtExQPX5ozRLjQdoP1PH2jx4D9Uy1rAn5Is+ILm2TuOF/UUsO ucxeVpDcs4jUGoOLPWBcAX2s8UwO1pR7DrFJDGCFLmuiM6n7r3HY1aedFy9t9wxu5MjO 8yFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=eep8Xi7UqaO2aP4V8ZuSDtp+KDuR2Kw3YoepF8M+Ejo=; b=1AEtL+Ik+ijyeYLO5woNurdxClJ6+ckSYpF1ArHhGkiKC+OXJBmv+s1VAFgNbXA7Eu S9k7HQ5PTfz6zd0Yr3rdB36aySL1bK+xyXAx7TA276hpJZeyD/byjJlqylXgeIr+wkTD 0niApFe3//QfnopAWcvIc8s2wIqzB10ASoIQ7P93biFXcTSOPJV5x+y7uFCMlNSnqMKe YjvZ2gfrmz3N1YqsoIP82LvjaqCH5m5M3gAP6Uwixhxm+QVCIRNHmiNZdC55+w1LxL+m 7GqFD0/TvPV81B0pISYTMu94LQtROf706EIQ1M0Vlok19UGOOTiLLItS2hNIE8nkGURc v2gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=KhvFchy6; 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 m6si29242298pjl.60.2019.06.05.13.19.35; Wed, 05 Jun 2019 13:19:51 -0700 (PDT) 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; dkim=pass header.i=@lca.pw header.s=google header.b=KhvFchy6; 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 S1726568AbfFEUST (ORCPT + 99 others); Wed, 5 Jun 2019 16:18:19 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:44891 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbfFEUST (ORCPT ); Wed, 5 Jun 2019 16:18:19 -0400 Received: by mail-qt1-f195.google.com with SMTP id x47so7379qtk.11 for ; Wed, 05 Jun 2019 13:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id; bh=eep8Xi7UqaO2aP4V8ZuSDtp+KDuR2Kw3YoepF8M+Ejo=; b=KhvFchy6WV2EGfCS0aKB8oaKfyjgeRmeyn5nergkSRaRclnHRr0EFgeHPHkV3yyjO4 MTPwrCIXy50L0s7MQp+ilwKKfvjwr/zNgTQvTMn1Rb2rHDdUUeBz/07gqhGk9HGhynZ1 s/faqm6zGOU1WwUU0J55rjchdzu2qMhuRNVVG3yVcOZj01qjQE+GXvnQFbPXgAg0v+LW c4bZMzOr3OMmCgbQPNKmZzGSs9lNqK20G76vSNLgUhzSMIfPEx/7IYxkjm1pSgHqg8nd H4/6yUbrfvKZn9lA8l0YybNIqV108wW+TRieMvtg3wXE9x/jIkVyGy3mlb41Z6Gaggi/ QV9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eep8Xi7UqaO2aP4V8ZuSDtp+KDuR2Kw3YoepF8M+Ejo=; b=gMrVhEw4TfiCGqcBY+ljm6i9FKxuJTqbQ9Q43pKoD41YQVv3ZU+xBQARu2nGuImROd y2mCOoejWK3/VXNMYPtlLwAUNOAkyc/8U7NArB5zdx7EEafLcxPzkISThOD4amHy+Tq7 eyyhqhaaAayIBAeHxcKuX98LGBIYLmfxrt4zrzqfHNOFNXtqcMmzzbTfNVZ1l8DdSxzh hguQQVnakw4Axv4TOugg3Rx1g1G4l0nvwRfSlHkr2dlvneezTMqsLdrBEMDil9Citnuc nwZvwpx77t8w1kghOcjZ2daXMrlCmcIqOVExUObdhpTCPcM2taz4J/509DC3nWkWSJ/C j+3Q== X-Gm-Message-State: APjAAAWsUAtRgvqc6uEkhJUbIoDLiKJanbo8a56zyClJ25U1VqWe3QyR gktrY996KagZpy3p43Vk6W9K7g== X-Received: by 2002:ac8:1796:: with SMTP id o22mr34231264qtj.98.1559765898586; Wed, 05 Jun 2019 13:18:18 -0700 (PDT) Received: from qcai.nay.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id d7sm7840507qth.44.2019.06.05.13.18.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 13:18:17 -0700 (PDT) From: Qian Cai To: mpe@ellerman.id.au Cc: paulus@samba.org, benh@kernel.crashing.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH] powerpc/setup_64: fix -Wempty-body warnings Date: Wed, 5 Jun 2019 16:17:55 -0400 Message-Id: <1559765875-6328-1-git-send-email-cai@lca.pw> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At the beginning of setup_64.c, it has, #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) #else #define DBG(fmt...) #endif where DBG() could be compiled away, and generate warnings, arch/powerpc/kernel/setup_64.c: In function 'initialize_cache_info': arch/powerpc/kernel/setup_64.c:579:49: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] DBG("Argh, can't find dcache properties !\n"); ^ arch/powerpc/kernel/setup_64.c:582:49: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] DBG("Argh, can't find icache properties !\n"); Signed-off-by: Qian Cai --- arch/powerpc/kernel/setup_64.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 44b4c432a273..23758834324f 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -575,12 +575,13 @@ void __init initialize_cache_info(void) * d-cache and i-cache sizes... -Peter */ if (cpu) { - if (!parse_cache_info(cpu, false, &ppc64_caches.l1d)) + /* Add an extra brace to silence -Wempty-body warnings. */ + if (!parse_cache_info(cpu, false, &ppc64_caches.l1d)) { DBG("Argh, can't find dcache properties !\n"); - - if (!parse_cache_info(cpu, true, &ppc64_caches.l1i)) + } + if (!parse_cache_info(cpu, true, &ppc64_caches.l1i)) { DBG("Argh, can't find icache properties !\n"); - + } /* * Try to find the L2 and L3 if any. Assume they are * unified and use the D-side properties. -- 1.8.3.1