Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1690084pxb; Mon, 20 Sep 2021 03:00:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtMxuOUOImv+GC7BH6MFugPPpUFrq5p8ALFa/dBYa5wJ6CXJ8pjNfkCW1NR+HMXBYkxvni X-Received: by 2002:a50:e002:: with SMTP id e2mr6186892edl.40.1632132036182; Mon, 20 Sep 2021 03:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632132036; cv=none; d=google.com; s=arc-20160816; b=VId0+A5atahOWKkEE8zuxLxnTjxAEo6MhGQcCpoitqR5AK8SZrme/WEfb35R9z6JGP XX7H2/XGeAla+dmml9B0tgDEesuOxIt7Jpo173muwwQwOV5jsS7FEqQriW1urGWPt9C8 mI4Hcjc3oGpfDaweJOg0ZGrh7GNeo6dYrvdFRNG1ojB0HKckFWYXejMi4JYVCzeh8MV2 GH8qqLTRAqKWpL/+ilkzmz0Z7m6Sim8wzCnuRfBz7MieE3K1KqnpLAfDJ8DzyfJbeY9E dFZAaNot80DQaGui2ldbHQP68lfsETbn/pTY4/yeqg/SLZw1YZyPEfGIBi8YijLfYGt2 qhTg== 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=k+XcZYc14KsehjLTqP8CjGytdXHzGgRx1VmpN6BiUc0=; b=JMQGAHaH1h0mCc7FacAgnbHMVxWb8mv//NnCL1XosrgXfmTsPzhiSXMkkyh8JHVrZ1 Iizvvr896Nk9KK63b5Fz4NAZmcFCgBMeT8hx5fx3474kRYrVyoQJF4Ly+TXpJzg+9/N5 GDIkm9RmKIJhexlJjo45H7myhQC4HPpNL4retMo/5ZG39PByMrTNeD84gmzjDIDbZskN hnKI3hBeg6AXvwPXc2wqXOvYdyw5ZU9ud3qH0Xu8Ba63GtjmbVx8c6bNj0DRVIZdf2Pb Gzmrwv4rzwvTQUvEVbSDT5K88DcPK2yTexnqIbb22+KIohCiW0kOTBFG8kktZyLWyvr2 /C/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=S+1e5ECk; 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 aq20si2475751ejc.363.2021.09.20.03.00.12; Mon, 20 Sep 2021 03:00:36 -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=S+1e5ECk; 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 S232830AbhITI7L (ORCPT + 99 others); Mon, 20 Sep 2021 04:59:11 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:45949 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbhITI7G (ORCPT ); Mon, 20 Sep 2021 04:59:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1632128258; bh=k+XcZYc14KsehjLTqP8CjGytdXHzGgRx1VmpN6BiUc0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=S+1e5ECkXGBJ49qUH5ObqM5EYaC7S2OMYgRoYoo7rA4Wd5wPtea0r9jlcHCURqFeD NXrpPxlZj2YbYEvQ+HwEMDVV+Ec9yXvoKVypbUoLNWtfuTxaRN5msIB3Coyu/Ywp4f xHtPuAGTkKQCeScX01BbKgMxMWDHdD56U0dF0kHOgt5L1IybTrgoNQj3FotkxGNVNB 07t1hTChGFuYV11psW0KBqWn/c37HA4g6Q0NRflPHh1YjaTp4Vctn+DOYqmtBc4YjG 4/eVfy7s8r+WoHf0XV9zTNQB2AFNKVvPQK4SALX+iDtIHHWo9QeqW7mEyilesr3z6F 8CdXcF3t+cgAw== 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 4HCdjt37Jcz9sRN; Mon, 20 Sep 2021 18:57:38 +1000 (AEST) Date: Mon, 20 Sep 2021 18:57:36 +1000 From: Stephen Rothwell To: Yafang Shao Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build warning after merge of the tip tree Message-ID: <20210920185736.40285450@canb.auug.org.au> In-Reply-To: <20210920183016.3a4778b5@canb.auug.org.au> References: <20210920113330.29f12b99@canb.auug.org.au> <20210920183016.3a4778b5@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/a5ieGo0ylGpX+QzBMDl3Hs="; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/a5ieGo0ylGpX+QzBMDl3Hs= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, On Mon, 20 Sep 2021 18:30:16 +1000 Stephen Rothwell = wrote: > > On Mon, 20 Sep 2021 14:55:29 +0800 Yafang Shao wro= te: > > > > On Mon, Sep 20, 2021 at 9:33 AM Stephen Rothwell = wrote: =20 > > > > > > After merging the tip tree, today's linux-next build (powerpc_ppc64 > > > defconfig) produced this warning: > > > > > > 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); > > > | ^~~~~ > > > > > > Caused by commit > > > > > > cb3e971c435d ("sched: Make struct sched_statistics independent of f= air sched class") > > > > > > # CONFIG_SCHEDSTATS is not set > > > =20 > >=20 > > Thanks for the report. > >=20 > > We have discussed this issue before[1]. > > This warning happens when CONFIG_SCHEDSTATS is not set and > > schedstat_enabled() is 0, so the whole scope should be not compiled. > > It seems that we don't need to fix this warning. > >=20 > > [1]. https://lore.kernel.org/lkml/20210911082505.115758-1-laoar.shao@gm= ail.com/ =20 >=20 > Clearly it will be compiled if CONFIG_SCHEDSTATS is not set as that is > exactly what this build has ... even sections of code guarded by "if > (0)" are compiled, they may just not produce any output in the binary. >=20 > Also, I do not have W=3D1 for this build. >=20 > If you turned schedstat_val() into a static inline function, then this > warning would go away. That also means that argument types and return > values will be better checked. I take it back, that won't work :-( > So, please fix this. Still it needs to be fixed to keep unnecessary warnings out of our builds. --=20 Cheers, Stephen Rothwell --Sig_/a5ieGo0ylGpX+QzBMDl3Hs= Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmFITQAACgkQAVBC80lX 0Gym4Qf+NhTZ/ael2ktYZFyh1dizFiiQd5iFwWEq3nePHw8W7x66RSo/63wXIKCq KjSZz8juNPmYscnbF26EfZSc56Bxj3aZC+cm879Qpo+dQ/29IFmnMx0CZnCTYQwO Ar9FNgxuAgitNDYnulzYdNeHJlnPTdNjn6c4pFaRyrtTSU69efJcgShNbEt4VUP/ 2ZgPOBZprB4R8hriD18kJE3zN4tI8KE5NZXE4JGmivVgIXN2mkaR0qP08hIJ1z/x U0Z99YPY7CIa+/yCfoNgzB2HC8yAygpkTQd9aPJQmvhFcNijpDiPk3/3/E7jiMPS pVLL886yxcKcDClUmZg0LTP/Yz47aQ== =/LRP -----END PGP SIGNATURE----- --Sig_/a5ieGo0ylGpX+QzBMDl3Hs=--