From patchwork Tue Nov 6 05:42:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 150247 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3486226ljp; Mon, 5 Nov 2018 21:43:08 -0800 (PST) X-Google-Smtp-Source: AJdET5cJZAdbwM09PmTdSHqZayMj/GGk8IFIgVD4BXFi4MgFwdhb+/6HLsUpFbYX5Su0+c8QYwnk X-Received: by 2002:a65:51c6:: with SMTP id i6-v6mr22236506pgq.227.1541482987923; Mon, 05 Nov 2018 21:43:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541482987; cv=none; d=google.com; s=arc-20160816; b=JxNcvqZmwHPxUEtu8hzNw6YYMI6BNv1EbdKnPGwOU0j0LJKPQS+c9U1TuO8K0ILQDf 54xaHOv6xAyJPaVSVh1+DAIwptOixsX7ObIZalVcXws2P0BNfb+ZZ9mxaOofGwYkcffG zTG5x/IwKz8ORMU1k6JJFOn/bdvB1ENNOh4kvn2DdZpJbhf2h+0uKXlyJKwW7JZIIHlN hoW7OYQSQ97t+R8lRuF4NtwJXjRHOaFVHA1yLKLyeZPMQFs3urMv9N7Nhp2h9rDwv4xV XPqeA6Q5znKM/1MpDRzuW+HZ8iDxTO+KeQfm+7Vhl39P3coUSemwr2yaJH8omNHjkluW odYg== 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:dkim-signature; bh=713B2YJc8DMVCIsxQId0TubBbtFhH4LE/O/KGRCq34k=; b=eg5o5vB5TYbH0x7gHu3xnMq3TO7wAFF53RkHTazlhho96gGeBXPH05jaLlKo7otzEr uuxhVnvuy72JTqizTTJh2UGCABQ+undXMbHSj2jNlB3PwvnWU7MHO/2g4mzremVaLZ4d EhMB3XtjSkGEAMvGLBOSYUXZfyDWO3x8d+qYiYUZEVrSc1TiZzgUiMge56abxCRzah5x L3aDkqaZZf9K5Mmff7hEXOSKPOxOHxsHSembPf0UFCPP5admenjod8FFtJ8dqBImQiwW S+Q44GRlgasJz5CWk2sTyE5dvRX0dRj6zYggNcIsbNAplGz28IrdBc8j+TL03wKWZT77 pCuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BDuji+jW; 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 w17-v6si41882768pgg.489.2018.11.05.21.43.07; Mon, 05 Nov 2018 21:43:07 -0800 (PST) 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=BDuji+jW; 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 S1729820AbeKFPGe (ORCPT + 32 others); Tue, 6 Nov 2018 10:06:34 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43195 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729319AbeKFPGd (ORCPT ); Tue, 6 Nov 2018 10:06:33 -0500 Received: by mail-pl1-f196.google.com with SMTP id g59-v6so5616334plb.10 for ; Mon, 05 Nov 2018 21:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=713B2YJc8DMVCIsxQId0TubBbtFhH4LE/O/KGRCq34k=; b=BDuji+jWtTodTv9YA1GG0M4rOt+B+BWvdHCL3jKgBUvNJ6rvt8Yz6nfyDc84U1EtOO LyAP6oXHf255DMCLvc8fDKjGmwVUY258z9ZmqEGMBbY+emAckoXIPE9Jnd8YrhqtzyK0 wUBxPfqhFcMKXkU+TRrRKWMq27d8iq6aPAnJ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=713B2YJc8DMVCIsxQId0TubBbtFhH4LE/O/KGRCq34k=; b=KcA1WVFAcMbf5CCq9ALCMz4s4EFBWY0914Bp4tOON7YG9THmlUDNDcQ73UZ/wt7vuE MseSdVCxY8gJWyRKnomM3Nd0ZhNqu6/J/6vwDY9ixYK75Wj20WwcNpvBPXUP+B5mPql3 Bzs4bJqs14hk3XMyCVPvlP5Y8dzlHDr0W/g9zdfzZxUwXjCoROw7gXwIKlXYVtmsrM2h MeA4RBJppoXJhCgbzN2L8QbRPtqJpWsydXF7QXG61AU/YHZ9UGmZoGOGbRWGENaklg8n qhVLXdZe4Lp1xwTdaQpF+5AmDUNSWBrgVegFY2HYZvirwtSUlgkIH/xEtvRDe2t1UXPc WjzQ== X-Gm-Message-State: AGRZ1gLAeLeKIrmqk3itXLL6uhW79X5rgM3T4ZT/YMWwNqfZUrVr1phg FrpesWrt2n398cNM8L0W3xBEWw== X-Received: by 2002:a17:902:a5c6:: with SMTP id t6-v6mr25260883plq.31.1541482983020; Mon, 05 Nov 2018 21:43:03 -0800 (PST) Received: from localhost ([171.61.116.174]) by smtp.gmail.com with ESMTPSA id g8-v6sm26747069pfh.57.2018.11.05.21.43.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 21:43:01 -0800 (PST) From: Viresh Kumar To: Ingo Molnar , Peter Zijlstra Cc: Viresh Kumar , Vincent Guittot , Daniel Lezcano , linux-kernel@vger.kernel.org Subject: [PATCH] sched: Fix the ifdef block in add_nr_running() Date: Tue, 6 Nov 2018 11:12:57 +0530 Message-Id: <78cbd78a615d6f9fdcd3327f1ead68470f92593e.1541482935.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e3369a MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no point in keeping the conditional statement of the if block outside of the ifdef block, while all of its body is contained within the ifdef block. Move the conditional statement as well under the ifdef block. Signed-off-by: Viresh Kumar --- kernel/sched/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.19.1.568.g152ad8e3369a diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index b7a3147874e3..e0e052a50fcd 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1801,12 +1801,12 @@ static inline void add_nr_running(struct rq *rq, unsigned count) rq->nr_running = prev_nr + count; - if (prev_nr < 2 && rq->nr_running >= 2) { #ifdef CONFIG_SMP + if (prev_nr < 2 && rq->nr_running >= 2) { if (!READ_ONCE(rq->rd->overload)) WRITE_ONCE(rq->rd->overload, 1); -#endif } +#endif sched_update_tick_dependency(rq); }