Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp292392pxb; Sat, 11 Sep 2021 05:24:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0D2oa4f7mNxFVF4MscKBstiGS1jLw9Bi3RbLqxVofvPefXAkOym94QX1rFbXXdvvr54+v X-Received: by 2002:a05:6402:1d36:: with SMTP id dh22mr2988837edb.16.1631363091696; Sat, 11 Sep 2021 05:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631363091; cv=none; d=google.com; s=arc-20160816; b=eq/SBsLANoSDOnsMLQ5VsIZG4K3Lss+1pWiK1GJuI6lYi+UtMgqPO0kqE0GM46j3Lj uWdweb7E9SZZYWpeMQ1+pLNPs2JPYL2bwPzt/LbzotZmeoixmyo6H1hHI4jxSgljYB1U Ufgdxlxx6FqZDT89B7qbwUieL7XiXKuJXE2RP7oy8K3QLNXVOSqVY/FUmebSik+VC3iI yfXkTnIRrhFbOKaaZ8gYaPoVreq+qyT1cTE/BfTg54QavOdI6Bcy7Dmaeq314GqyXJVv ZPtJ8340PMWIIYaFHDcS0ZmTnwUPMygDC1G48uPOOInTJ6OMA3ZK4lPDc+PTj3vJsnxZ 7A1g== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GUNcEutT0mEBhENHiF0F3UXb+JNzNoJHfhcJSMtDZCI=; b=r7szovfl9iGxGbA1dwwD/CFLAhLRjf8vklxCEV9ne5R5mtLtMJG7rN/NVXop5NkWj8 0ysgR0MDSEhE4eXuUfQb+/3i30HwnK8WuVcWKLZe9grbapp6MA7lenT15lfBKQhxiBaV Rn6o8NEnUMHJHk8z+JbsqBfV9x/pEwYaqhRyHQ6j7BOzdiFv3u4f2jhodmsWn86R+BE+ 46kNpQWIVpp2i7ct5GR2eDr2R4SfKPCRJ80vhRYKIdlDs+BPGg7gPUrkYxw2joLpTtye /LQuYrhvy5+8pllQ36A/mgy2W65eNNUdFZcITRXUiTqL4wHPtYQcbgY3fMCZDgux0Pu8 g4iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=NzESvma6; 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 i19si1638623ejw.660.2021.09.11.05.24.27; Sat, 11 Sep 2021 05:24:51 -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=desiato.20200630 header.b=NzESvma6; 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 S235842AbhIKMXf (ORCPT + 99 others); Sat, 11 Sep 2021 08:23:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbhIKMXe (ORCPT ); Sat, 11 Sep 2021 08:23:34 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3523EC061574 for ; Sat, 11 Sep 2021 05:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GUNcEutT0mEBhENHiF0F3UXb+JNzNoJHfhcJSMtDZCI=; b=NzESvma6fyq52V87bsGMq4yXgV 4ILtCo6/hbS+L2UPQ2Oxvg/qmIANgVtKvy0jIpPJEm79aSN7XAk2GsODoqwL8ppkSfc4iXdGXfd8s Uz22cpOKOX11A0BluXHUeCacvTLWUHlQda28fxtwRVgJcaLXmWEI1Zc1AAhhQH/WclAvOvL2Tgxpc BcU71TNP3vM13VyTHbAQ+gOr2ZGl5QEdOllhtz7MRoY4ftXHZW4kYfur4LQMGp6Iexni+Xl8RJqze uZU2NvNNZ6zz/w86XU8N/9BSyoZ6BzbyketHm19qSGQ8h+LgjzKV0MqHqOKwH6MiBIRtXzETEKF3C 2wDrdwUQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mP21R-002N6d-2y; Sat, 11 Sep 2021 12:22:17 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id A7D379862C9; Sat, 11 Sep 2021 14:22:16 +0200 (CEST) Date: Sat, 11 Sep 2021 14:22:16 +0200 From: Peter Zijlstra To: Yafang Shao Cc: lkp@intel.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH peterz-queue:sched/core] sched: fix build warning with W=1 Message-ID: <20210911122216.GX4323@worktop.programming.kicks-ass.net> References: <20210911082505.115758-1-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210911082505.115758-1-laoar.shao@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 11, 2021 at 08:25:05AM +0000, Yafang Shao wrote: > kernel test robot reported some build warnings with W=1 as below, > > kernel/sched/fair.c:892:34: warning: variable 'stats' set but not used > kernel/sched/core.c:10238:42: warning: variable 'stats' set but not used > kernel/sched/fair.c:893:29: warning: variable 'p' set but not used > kernel/sched/rt.c:1292:29: warning: variable 'p' set but not used > kernel/sched/deadline.c:1486:34: warning: variable 'stats' set but not used > arch/nds32/include/asm/current.h:10:13: warning: variable '$r25' set but not used > > These warnings happen when CONFIG_SCHEDSTATS is not set, in which > case the schedstat_* functions will be none. We should add > '__maybe_unused' to fix it I really hate all of this, I think the compiler is just being unhelpful in the extreme. Also, I spupose the warning is in W=1 for a reason, let's just completely ignore all of this.