Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp84253pxb; Wed, 6 Oct 2021 00:02:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEhKUPs2UmfBKSFgpJyohcawZg/PWF1SxfweB29MNyGEJIrHvbczks0t1/kVxLfGlDSmHv X-Received: by 2002:a17:90a:cc13:: with SMTP id b19mr190078pju.45.1633503733972; Wed, 06 Oct 2021 00:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633503733; cv=none; d=google.com; s=arc-20160816; b=WELcvg6Kek+gzk7YZLZxxKFt7jqxmTFfZ2AuY/GvYJIwqw9qS4qfCRdz8qnP6wZIxu JDiUqnO9BrOxCBu7Wu1zTOiTnS8O2yD9oH2ryi1uilP7jHJlMG3Ws7NLc5TIoo/zpA99 5yP65u6eciZb9qcckcqXiwMTmM+cXBg8yQo6hfBbOF8GGkMHwT7ixv8MJ4mB/uBADcOg 3pBdQZjitgCy/JrgK5Ebjutjhg4WCJ2x3OAo47jBJpUhAuJMUi/Ps/atKnKIL+VuHv1J XyfMKPDBB5Fr7tYCH2gQ+PNZ345K+bPscLQ+IHnrBjhmpE0dcJOBF/XMr7N2vqfEmBzq bwzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wBTyyFcBBtcxWCJ/gfsqd3HkEj6+cOF3wElfnSB+otk=; b=Qfsw+J5+utcxq3aSTnAg2s5dI/jyK1+PnKSzYP5q8wd89GAzKJnVQ685qd1iVriP2I lKdukk4/Q7h+nHONLQ+ERwXdAapnsUudpLuCUAEPsv4V6OLTBh/hYJs/n/n8UdSKF19g 5Y6O6ph58O5lnnnXkvrhT7/KMVav8SOcRc/2VFcFBmKV/GwSDjSlfAMNMHDqRvn+WONJ eGZGJ1OSGJXfEnYyayELH6KcHti9XoH3yi1EkOswwUukJCHqjY5ArOMM8KfMf5qgoG28 CfbbRRLtvpXLbgiL5mJh9nhvJ60WXcO+dPQfyOTrAbhpVlbSV+arbVVPCgLt62E7zILk 4AUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Cx1oyKd4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z62si22298318pfb.362.2021.10.06.00.02.00; Wed, 06 Oct 2021 00:02:13 -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=@infradead.org header.s=casper.20170209 header.b=Cx1oyKd4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237292AbhJFHCs (ORCPT + 99 others); Wed, 6 Oct 2021 03:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbhJFHCr (ORCPT ); Wed, 6 Oct 2021 03:02:47 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8702C061749; Wed, 6 Oct 2021 00:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=wBTyyFcBBtcxWCJ/gfsqd3HkEj6+cOF3wElfnSB+otk=; b=Cx1oyKd4nFGGk+UgnYKrNG5CeD G+N8PrAQDcUz7BHf1csIkaxlO18JVzFxtWxegM/cBtLkK1uJXC75J7IVGr09VXQXmuVgU5BlL6C+l yc5FKnHVt4T1JCFZ/cIevVTjV1GWKTHaQrx/jvEMzxlbIOVdy5YBG9bAMKwV31vvgEIVCAAjQw0J9 9wuahyqHUyJwrCjGEh+PdLQirenBpgkzwojHUsDxvYbwcIvGg7neRs40tLu2NazsR16uKvqE7UREc 8CzqNp15wQhNxxdCFKdBeyey6Z68JWvyT+NXBNP3jBHAAm/tjG7+m9IIh2psM2ZY65toc2600rRh3 TQVYDUeA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY0tp-000d5j-8Q; Wed, 06 Oct 2021 06:59:52 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 76EF430019C; Wed, 6 Oct 2021 08:59:31 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id AE14B2038E20D; Wed, 6 Oct 2021 08:59:31 +0200 (CEST) Date: Wed, 6 Oct 2021 08:59:31 +0200 From: Peter Zijlstra To: Stephen Rothwell Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Yafang Shao , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build warning after merge of the tip tree Message-ID: References: <20210920113330.29f12b99@canb.auug.org.au> <20211006140655.6381bc5d@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20211006140655.6381bc5d@canb.auug.org.au> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 06, 2021 at 02:06:55PM +1100, Stephen Rothwell wrote: > Hi Peter, >=20 > On Mon, 20 Sep 2021 13:18:53 +0200 Peter Zijlstra = wrote: > > > > On Mon, Sep 20, 2021 at 11:33:30AM +1000, Stephen Rothwell wrote: > > >=20 > > > After merging the tip tree, today's linux-next build (powerpc_ppc64 > > > defconfig) produced this warning: > > >=20 > > > kernel/sched/debug.c: In function 'print_cfs_group_stats': > > > kernel/sched/debug.c:460:41: warning: unused variable 'stats' [-Wunus= ed-variable] > > > 460 | struct sched_statistics *stats =3D __schedsta= ts_from_se(se); > > > | ^~~~~ > >=20 > > So I've not seen that one *yet*, I've dont a bunch of SCHEDSTAT=3Dn > > builds. I do think GCC is being quite stupid for giving it, seeing how > > the whole thing is within if (0). The GCC people seem to disagree when I > > brought it up. > >=20 > > Anyway, what I did in other parts was the below; that seems to 'upgrade' > > the warnings from -Wunused-variable to -Wunused-but-set-variable, and > > that latter *is* in W=3D1, and I'm arguing it should be promoted to W= =3D2 or > > thereabout. > >=20 > > Given that whole if(0) {} thing, I don't feel motivated to change things > > overly much and quite strongly feel this is the compiler being daft. > >=20 > > --- > >=20 > > diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c > > index 935dad7dffb7..ef71de01e4d7 100644 > > --- a/kernel/sched/debug.c > > +++ b/kernel/sched/debug.c > > @@ -457,7 +457,8 @@ static void print_cfs_group_stats(struct seq_file *= m, int cpu, struct task_group > > PN(se->sum_exec_runtime); > > =20 > > if (schedstat_enabled()) { > > - struct sched_statistics *stats =3D __schedstats_from_s= e(se); > > + struct sched_statistics *stats; > > + stats =3D __schedstats_from_se(se); > > =20 > > PN_SCHEDSTAT(wait_start); > > PN_SCHEDSTAT(sleep_start); >=20 > Any progress on this? I am still getting the warning. Urgh, sorry, fell through cracks. Will commit fixup in a few.