Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp5181707pxb; Tue, 5 Oct 2021 20:08:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzheNO9S5XvITOvl5c+PjRsekiBVC+OMr8kr6ckD4xeUtw2mHVWPWyamkV6qv5XHohMgLuy X-Received: by 2002:a17:902:bd45:b0:13d:b4d1:eb39 with SMTP id b5-20020a170902bd4500b0013db4d1eb39mr8538247plx.53.1633489722525; Tue, 05 Oct 2021 20:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633489722; cv=none; d=google.com; s=arc-20160816; b=IhiqEt+hIZZ3fZXflfH9xNn6BxV1Jzasay8f2kVti+6RfMDh7xnou3gP40U4K7PuAk lKwkIEFVLFO22CLB3r2lzBi7RIrHiTkWv71XD1eLiXoHGQjp2/q8zcsxEPbLZiMD6CBJ FelG3RGzh1oHKMS4fuUGIvve6jNHzi735d9ZoxCa9lTPt/05eK/R396BiXm9IbaUSIMc sPX+3Et1IqWMNBwfnkhezuH//wGz2W0k8VWYiCGfDM9wBykUsrKgJqnYKamctfizTg6B +y1FDiYJTJ4+AVMQtk56VyP1tAMY1lPB25QIFtP2nI2Gl/tZKwneO86lQx2BbbmCDV+E CDTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=FpJb17O/OK8AZco1UjAOqyAOGqm9kvGdwy8j1IJGb8w=; b=qCFLoasDhqxpz7HakW1+8k5aG+5YUQtAxip0/UZ4rWrdx+KuihdDUu8krqk73oIH3a HqcwHl43LtsWVc1/EfnqnKMRFOV6FO1V7uTk4jeT/iFjyHVqw/ykgbW3Suax1+Y41rxa 6xbayyV0bswf9umC5SLOaS0SuRvMsofUMRqK29f76CGk5ozCTonknRYTVxIyZpQqLCx5 SJFBIcdmusI2d4MMXUZnl2pFbG3+w193KFxWzMf+Fa+C2aTp82pDtyzS8GdgBAL2TSyJ iycyZNSP2QZBuOe3fsCuGfZLGh+CfOdtChjUCsBPhDoOeHx+GV7BQo39qYUMk2b/5Y4O DZdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=mo2WjpEG; 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 em22si376225pjb.188.2021.10.05.20.08.29; Tue, 05 Oct 2021 20:08:42 -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=@canb.auug.org.au header.s=201702 header.b=mo2WjpEG; 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 S237251AbhJFDIu (ORCPT + 99 others); Tue, 5 Oct 2021 23:08:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230306AbhJFDIt (ORCPT ); Tue, 5 Oct 2021 23:08:49 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee2:21ea]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33427C061749; Tue, 5 Oct 2021 20:06:58 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4HPK9r0WbYz4xbC; Wed, 6 Oct 2021 14:06:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1633489616; bh=FpJb17O/OK8AZco1UjAOqyAOGqm9kvGdwy8j1IJGb8w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mo2WjpEGpb7AdQE/7SuCHsCwnfve1S9T68OJq6v6Hvvupw4r1lfgQqqPt2jEFmjja tnsrKnPNRde5++Rf49WSkyZm9JSXmO7/Ij/4nXp+5ojBcj1l+GQxdLxcJlbsY+TAZ9 VQKucOskwGASGsrEMEWP9FSpIFkf0bc0kfnkeO5z9eKiRAeMAGlWk6TuPbLH1XNdjk I9lQ7R2VIEhbKE6xuAmIlUqUozDNGP0RCBTSmkBKxpeo+vLTXq+I5FRQP9EEc0OS6b ixE7rJQlYmzLIAmG1Ws7N2vWVXYQTaLqAD9n6Sa615KKIQ+Yn0F3LDGMvZWOmx6H4L Dd88IwQzolWng== Date: Wed, 6 Oct 2021 14:06:55 +1100 From: Stephen Rothwell To: Peter Zijlstra 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: <20211006140655.6381bc5d@canb.auug.org.au> In-Reply-To: References: <20210920113330.29f12b99@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/vX4IllVywMMtwm8gQ4235.v"; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/vX4IllVywMMtwm8gQ4235.v Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Peter, On Mon, 20 Sep 2021 13:18:53 +0200 Peter Zijlstra wr= ote: > > 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' [-Wunused= -variable] > > 460 | struct sched_statistics *stats =3D __schedstats= _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_se(= se); > + struct sched_statistics *stats; > + stats =3D __schedstats_from_se(se); > =20 > PN_SCHEDSTAT(wait_start); > PN_SCHEDSTAT(sleep_start); Any progress on this? I am still getting the warning. --=20 Cheers, Stephen Rothwell --Sig_/vX4IllVywMMtwm8gQ4235.v Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmFdEs8ACgkQAVBC80lX 0GywCwf9FqdLggpxZhSH93X3gPvN72Es9QkzqDcYS6b3me34+2uwiayPgQi65O8c zSkeTRqBJSy7bcBnX+1zJCdQG5djwRrekXu0UkkZKe/0PrwTLxHmsQUWPWWPfFdJ DyiUEES9gBiQ449xovjPhvkhRTKG5pL2qdQ4i3vvl7sOIhoZIUIhHfNzQA2mCh1u sWFp4NgTgvuzhaICSYCTbZJl51FvL/NE0Eljb+vSq4Ov/4OBSfpcgtFQ1amv6Gsx eFHvH8WEHCCavi9AZmKQKVeDpDM4Aeb5dz59hHPuABQ/NtqfmyZYMKqS99ixARLw sHGIv4vqr2tvcf8v5ZVe63gxGwfBvg== =TUTX -----END PGP SIGNATURE----- --Sig_/vX4IllVywMMtwm8gQ4235.v--