Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2940725imm; Fri, 10 Aug 2018 00:38:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzM9xzihnJsTc9m08F1C2cFuRRFVVYz9rC1J47zuK0Scc+9/vILV4xVbOgARimgyGOBi6ia X-Received: by 2002:a17:902:5a08:: with SMTP id q8-v6mr5016717pli.300.1533886712462; Fri, 10 Aug 2018 00:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533886712; cv=none; d=google.com; s=arc-20160816; b=BvSLXDQ/hIzk74zZE3c+5DAo8X0S5sDeE/gRTVyaC8tmD1sZW2CI9FuojoICPURll+ 7oQpMASVfHVq+sAdKcMWnNTUlV/H/yxwbXwlqBDP5MLIOCnqnxmVTKt4s1u8RVi5v4bM SrKR3qxaEMc+YWzavfdBfQhPrw2N9LF/znt6G+ucD5J3XTTWCuzH+H4q6DWGLxozwo0f EZVoT5dN1Mdu5cJhPIEN+lDXbW975ozq+9zFEjEAdSKicxgraujkLF55wiaq5FnRmzC5 2Kf0VcvFFpomEXAJAW4nbugRw0YPg5N74lDEDDStFXDsk73+5ERMi24BliQHwIA7MWc7 DT7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=YQ1mvc3fpLCYZ1k9LMumyPnyEEMxxI7a897RhpnxXLU=; b=gDNj6nFU/mzLLDm80z3xXgzDWhbYaLpy12Yyky8uqn34AUq8JUEyHQaJo6fTkrEI94 i3TplSnxnvVI+7I5/VeOkh3jzaabjlpYmff7IzFRQSmUmvIIyNlDcBNc8AW6wG2Se778 qJOeiDLw1rpRGI4iaEJ+10vv9vj71j6EEh2ESZXQSaVp6ctqfpLKCvQoJBf12iKp75PR EobC0K6KqOqxr4yuwO3sNm0zZZRNizr12ABtgQSSpBgQCExIFqWTYTXy3A9ZqtVN9Cmf sadXyMGTNqdyYlgsJEaL511pbRxiPtUuhs4JAFWLtFckWPt7ARfOgTV0Qe4cLDDqvUCy rOIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jBHG/bkX"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x68-v6si9344723pfc.239.2018.08.10.00.38.17; Fri, 10 Aug 2018 00:38:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jBHG/bkX"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727408AbeHJJlo (ORCPT + 99 others); Fri, 10 Aug 2018 05:41:44 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:40891 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbeHJJlo (ORCPT ); Fri, 10 Aug 2018 05:41:44 -0400 Received: by mail-it0-f68.google.com with SMTP id h23-v6so1405480ita.5 for ; Fri, 10 Aug 2018 00:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YQ1mvc3fpLCYZ1k9LMumyPnyEEMxxI7a897RhpnxXLU=; b=jBHG/bkX3e6KHpGd6oXgTfbi6R2QBozPot5oBqgXMjnccn2SZmlKkvQ69xyRiRJsI2 tdRgpF3DSw6Ct1rpuJSocQsqcafRDkyta+RGiNir8E9Zh2Jka08aMwU48D4NFhimUHnV Bnr8sKzxutA3cEVII4cRmomFhf3p2DBChOCzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YQ1mvc3fpLCYZ1k9LMumyPnyEEMxxI7a897RhpnxXLU=; b=SqVW7IA0RFS3sY100z9lQHpo3vEXCUiCRxrfcfMDYllq5S+2UcVA1YrhCtGoCg3bRx bTWsbp6AhybuoHN5EXMle3Nct4L2L0Wuz7bbegZ3MoV6ajX1F4rkSZ3rkJwF3X/LujPo njE9GxKed+wbvZCsuQL//A66ZI7V5X+ZtdrEE+xx5Ghwnns+MxqHfr8/a7dVfUt0uTcP jXGoYbevGuQde3lc+uBDI6Xm7SqhyStr0SPJ8FZ86TMioSHOMUXCfK/41k64A7KHeZ1z GUBOzdXx1h59c0O2duMrUZirKi1BqUxel8ZBjRSh1ENldc4K1AW7o3PN1ioVYj0yM9Jk jiSQ== X-Gm-Message-State: AOUpUlGSiJ0Y7jT0CPjcmkl36q47mxRpDpLye2om6EWKLrGLRqBB74Rx s35GlrdTuUVY0QZwFcBWJckgCfB2QKMKsaFF3albYA== X-Received: by 2002:a24:55cd:: with SMTP id e196-v6mr1141991itb.8.1533885190645; Fri, 10 Aug 2018 00:13:10 -0700 (PDT) MIME-Version: 1.0 References: <20180810023523.23923-1-douly.fnst@cn.fujitsu.com> In-Reply-To: <20180810023523.23923-1-douly.fnst@cn.fujitsu.com> From: Vincent Guittot Date: Fri, 10 Aug 2018 09:12:59 +0200 Message-ID: Subject: Re: [PATCH] sched/core: Fix compiling warring in smp=n case To: douly.fnst@cn.fujitsu.com Cc: linux-kernel , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dou, On Fri, 10 Aug 2018 at 04:35, Dou Liyang wrote: > > When compiling kernel with SMP disabled, the build warns with: > > kernel/sched/core.c: In function =E2=80=98update_rq_clock_task=E2=80=99: > kernel/sched/core.c:139:17: warning: unused variable =E2=80=98irq_delta= =E2=80=99 [-Wunused-variable] > s64 steal =3D 0, irq_delta =3D 0; > > Fix this by revert the HAVE_SCHED_AVG_IRQ to > > defined(CONFIG_IRQ_TIME_ACCOUNTING) || defined(CONFIG_PARAVIRT_TIME_ACC= OUNTING) > > Fixes: 2e62c4743adc ("sched/fair: Remove #ifdefs from scale_rt_capacity()= ") > Signed-off-by: Dou Liyang Acked-by: Vincent Guitttot > --- > kernel/sched/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index c45de46fdf10..ef954d96c80c 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -177,7 +177,7 @@ static void update_rq_clock_task(struct rq *rq, s64 d= elta) > > rq->clock_task +=3D delta; > > -#ifdef HAVE_SCHED_AVG_IRQ > +#if defined(CONFIG_IRQ_TIME_ACCOUNTING) || defined(CONFIG_PARAVIRT_TIME_= ACCOUNTING) > if ((irq_delta + steal) && sched_feat(NONTASK_CAPACITY)) > update_irq_load_avg(rq, irq_delta + steal); > #endif > -- > 2.14.3 > > >