Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp377737pxb; Sat, 11 Sep 2021 07:52:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYCkWzihYnZiqLPYdvaLq/vHL6Jo+MCEYQL1JDr3KPJn45J4AIg4AfJ+YwjMFvqKAdUgTm X-Received: by 2002:a5d:9145:: with SMTP id y5mr2212394ioq.200.1631371929554; Sat, 11 Sep 2021 07:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631371929; cv=none; d=google.com; s=arc-20160816; b=JaLKwHLo+u+RG5D20lPOEXrXSUy4r0voQ1C6jVGuImYm6jBk1LgoFYkEtDvWmrTBtN Ig+5qTasRMQDhHc7nIyx20yGcrOPBmLGXnQOMV94kab/FvSFrH1M/ib8b91lrBcP88or keGCrKltiAQbv/F43//FljRh+zbEtgRmBLmZ9t9WrGjg932kKi/rZ09EpL8PR/zZ/t0R 1FjhPLXMC5uCX+UStvAFkyELmLNcgal/6lTvX/8SDbA7+dAGSldnqmBugY+HfR4aWi9t AtIuGayQm8YtLkBVjBj3cRq4HPgZKR0h5lnHjfUYF7Lh9V5+ymEC+LY0QtzBcWJ5zEZP Vgxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vN9qXWbO5z/Pyq2w4tejEYUV3TDdw1Ekd9NcwYO/Sr4=; b=bDN2xLtmwYpz8U3YUG1EmRxZjFc5f0W+w374QoqldvOKL6jKV6yURv/HRhlnSjbIxT NdhHz/83GITnWdOVVRveJ+ogdZL6s/dhLAJTDBnvjjZvqTz/EhLQoY10aLxfrc+5GzUs GriBJHhi8AGPyQqrfAbOz0Rat7/i7KkL/tNnBFWuxA5ohE32OUflWIbEBBbSuGT+mxGX x8rmQD+S6NpNwlfP1MvB95AgyKcgroy1MWwlZ9ReQSO8YOrVXI6EhqvuFocqRWuaSvST HfDNkIYRcUha1naiQWf//yIjRnmjHvhAdq7xOyWdHT9ASjqzTMam2JKaWm2ghOeGBf2J O6DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EqRj3ceR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si1736748ilc.6.2021.09.11.07.51.44; Sat, 11 Sep 2021 07:52:09 -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=@gmail.com header.s=20210112 header.b=EqRj3ceR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbhIKOtn (ORCPT + 99 others); Sat, 11 Sep 2021 10:49:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbhIKOtl (ORCPT ); Sat, 11 Sep 2021 10:49:41 -0400 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F9E2C061574 for ; Sat, 11 Sep 2021 07:48:29 -0700 (PDT) Received: by mail-il1-x12d.google.com with SMTP id b8so3504808ilh.12 for ; Sat, 11 Sep 2021 07:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vN9qXWbO5z/Pyq2w4tejEYUV3TDdw1Ekd9NcwYO/Sr4=; b=EqRj3ceR2ylzqQemmvi3AjVrJUDDlxoVqc9j7bFOrZox4/ihRs+pUZ7vfpT8X93Uf3 GFHYosIyoi1SQ3RXanv5qpNQS9J4kVnuhSd2I75ea1T6cPp6CQ3T1N5WLDiUJVG+XKfK Q2Cy0vk9jqLzVuRVTjGbTVJmuQ4jLPp8xPsTqU8SEU9XFzCowHmx81UJ+1rXrK8dJiPD tHGgmd8ZBqylmJPLn3GK5Sbvmv2KlYDNmpdi2wtW5clrA/aoYHM6yTHaGiaqaZP3gnAV YwmMiJlL7kOijqSOxFQq3xKw5M/rUJ7aV2mBAIN9X17wjyGAcypQlBtlXxFKcZSRa7/4 v+Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vN9qXWbO5z/Pyq2w4tejEYUV3TDdw1Ekd9NcwYO/Sr4=; b=Vgwor5GmVmu7a3WIAIlciKZ9Bzp27VVPwqaD5g0K07M54pxljhtTqbDW34Pw07WXo2 JJwintrZ/b1VHSD3vwhuQ09dThCuGCRE7jsImafYaipRgjs3rSX3a7kOtThnajmDWYrS UsFWnVMKv3/1GJz3Ci9Rgm+cEE1skr8H4CwaVLE67F5VXH41yWghC+JylMQxViVfySsl 4d82cy65adoKpFAxkpMAd8TZq53k1/F6vvuB5R/9rF9RNB6+hfdmdjXhYpkuIvorjyCi 7wGoOZeNZ26NdWqSEC8pw7Aer19KWpoueiSihe/73JtYcnBtqNB/26q6ihMlA0KQdP9W DZkQ== X-Gm-Message-State: AOAM531TenPDq3AoX2rBsi/cTkV9ZPjqCMYUwRaUmA4oAyjnZAZPHHO4 2KDg3wek7fM0dVr27uC4/s3hp10xhj5iNqmbfQtNRZJsUiXKYQ== X-Received: by 2002:a92:d3cf:: with SMTP id c15mr2006806ilh.131.1631371708603; Sat, 11 Sep 2021 07:48:28 -0700 (PDT) MIME-Version: 1.0 References: <20210911082505.115758-1-laoar.shao@gmail.com> <20210911122216.GX4323@worktop.programming.kicks-ass.net> In-Reply-To: <20210911122216.GX4323@worktop.programming.kicks-ass.net> From: Yafang Shao Date: Sat, 11 Sep 2021 22:47:52 +0800 Message-ID: Subject: Re: [PATCH peterz-queue:sched/core] sched: fix build warning with W=1 To: Peter Zijlstra Cc: kbuild test robot , kbuild-all@lists.01.org, LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 11, 2021 at 8:22 PM Peter Zijlstra wrote: > > 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. Got it. Thanks for the review. -- Thanks Yafang