Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2731901imm; Thu, 9 Aug 2018 19:36:48 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwzp2b9JMi+GbctB4qoFVvLMfrEapyKYGnVMfcPTn7J/4faqmeAZkDQqlKkAZKeraqK0lI5 X-Received: by 2002:a63:530b:: with SMTP id h11-v6mr4480636pgb.139.1533868608656; Thu, 09 Aug 2018 19:36:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533868608; cv=none; d=google.com; s=arc-20160816; b=bP0kQ9LrtO26ycADcddTh9lpkeJTyeCqY5yaZARcRngi9TXjBRsqf/sn4330KXYJMP tLMF1C8lp5w5rcl/QhWQ3NhcYk1ZnXojoTd7IMVvJeA4JwpXIn66/MNKX8Xwzvk9nuPv 24CHKgvtE7URa/52HC3J6pkMicKxLF8GkXzcNzV3JPn/matX1xK9p+nvhm/sTfAV+rgm L9TL/ZWcMVeGcMABb+7OqrCtEZz1EMSvJCrTts0bPVcsEr3GkLvh05Yov8lns58ckpTT M4o7lwZH/sgcfMHVVnXUFgjE5JT9uShmUvb5gNLI03wcUvclPM3rLO7jKjWvYnGgbgpG axrg== 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:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=4XtlxM3BJel2w2KwOnTRWx50TjvBzXJMXj051k/NacQ=; b=VivV5VSyU1umtB1LpEaHkckAHdIfwJkWts4iJG9X/lT18y+CU+dGzF2VtLkA79fy/M 0L5ogy0bmf1iz2Z1Hi6H1yHMNiTZf64hwmfTTzK/iu3/FnTpgmQXNaV5kyHURYdNXvA9 NokKVd3VuVg9hNFirXSaL6zyPJcIS3T95TYkXDtWLq7Pr9dzqr25jPex5qZjTMBUXsVb 0DixJ8IiLfW1AchgFntDrgVNMWYxwLwA6FpqUlRmvZOeTk1OQEXO+/4dlfNtK/5YchDn Rc6dyr5GDeS4Fc7hpmfMvOoIgHxn2YF97fXW1+ID4JqT3fIV5AgjKQutw5bHSY0rrSfT btHw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2-v6si8915864pgj.550.2018.08.09.19.36.32; Thu, 09 Aug 2018 19:36:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726807AbeHJFDY (ORCPT + 99 others); Fri, 10 Aug 2018 01:03:24 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:26448 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725198AbeHJFDY (ORCPT ); Fri, 10 Aug 2018 01:03:24 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="43311730" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 10 Aug 2018 10:35:38 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id EBA3C4B6ADFF; Fri, 10 Aug 2018 10:35:37 +0800 (CST) Received: from localhost.localdomain (10.167.226.106) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.399.0; Fri, 10 Aug 2018 10:35:49 +0800 From: Dou Liyang To: , CC: , , , , , Dou Liyang Subject: [PATCH] sched/core: Fix compiling warring in smp=n case Date: Fri, 10 Aug 2018 10:35:23 +0800 Message-ID: <20180810023523.23923-1-douly.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: EBA3C4B6ADFF.A0D4E X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When compiling kernel with SMP disabled, the build warns with: kernel/sched/core.c: In function ‘update_rq_clock_task’: kernel/sched/core.c:139:17: warning: unused variable ‘irq_delta’ [-Wunused-variable] s64 steal = 0, irq_delta = 0; Fix this by revert the HAVE_SCHED_AVG_IRQ to defined(CONFIG_IRQ_TIME_ACCOUNTING) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING) Fixes: 2e62c4743adc ("sched/fair: Remove #ifdefs from scale_rt_capacity()") Signed-off-by: Dou Liyang --- 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 delta) rq->clock_task += 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