From patchwork Mon Apr 14 16:17:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28329 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 068D020534 for ; Mon, 14 Apr 2014 16:19:04 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf4864095obb.6 for ; Mon, 14 Apr 2014 09:19:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=C+pTAFkGVvafxLmOK0FvbrpGhmJvIedJ3aCgrHK39ak=; b=QNbZ6zDKzbviwTNRYs+9OOmfwcX5ltq7UMEUTcIZZPSTPmA8Xys65qj0o+0emgo2YA T9lf5kGYglCG0WzrtO1O4RwTtbKEBZNkGLtSWrzc1b4MzJ4uLpOLAj3LM/Ad1cbVo48b RF/TOWDCYCeVxpfsiy9aQtqVmWKrc8Pe1C4vRsFv9AGhrSKvdqWkR6ojDa5K3aWoqduA uKmD0L1PxXmVXyFFoyvQ6UTk4s7HLO264LJiZF85vBJIyG6/fhCfPiNGbVXaUMc5+SRr KCBL5PGAWG3s58aM4pts4nNcVx0n0nAwYVCPUe+djs8C0+DeHbdGLYzj47z8Q79Lf5yF MPjw== X-Gm-Message-State: ALoCoQnq40V8pOfIiXj5FsV9dAzUBZfuXOMWsTFibsLNpjZbvtNooe/5yhuuI93SRu+glyCckwrL X-Received: by 10.182.28.36 with SMTP id y4mr20728049obg.46.1397492344505; Mon, 14 Apr 2014 09:19:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.244 with SMTP id f107ls2822625qgf.65.gmail; Mon, 14 Apr 2014 09:19:04 -0700 (PDT) X-Received: by 10.52.104.7 with SMTP id ga7mr2381008vdb.29.1397492344363; Mon, 14 Apr 2014 09:19:04 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id xo2si2828222vec.116.2014.04.14.09.19.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:19:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so7592249vcb.7 for ; Mon, 14 Apr 2014 09:19:04 -0700 (PDT) X-Received: by 10.220.2.142 with SMTP id 14mr218449vcj.48.1397492344277; Mon, 14 Apr 2014 09:19:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp162334vcb; Mon, 14 Apr 2014 09:19:03 -0700 (PDT) X-Received: by 10.68.99.194 with SMTP id es2mr45098035pbb.100.1397492343567; Mon, 14 Apr 2014 09:19:03 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zt8si9136696pbc.187.2014.04.14.09.19.02; Mon, 14 Apr 2014 09:19:02 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755216AbaDNQSw (ORCPT + 26 others); Mon, 14 Apr 2014 12:18:52 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:47674 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755029AbaDNQSt (ORCPT ); Mon, 14 Apr 2014 12:18:49 -0400 Received: by mail-pa0-f54.google.com with SMTP id lf10so8437100pab.13 for ; Mon, 14 Apr 2014 09:18:48 -0700 (PDT) X-Received: by 10.68.170.131 with SMTP id am3mr44846341pbc.97.1397492328901; Mon, 14 Apr 2014 09:18:48 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id e6sm34735696pbg.4.2014.04.14.09.18.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:18:47 -0700 (PDT) From: Viresh Kumar To: peterz@infradead.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, mingo@redhat.com, Viresh Kumar Subject: [PATCH] sched/core: fix formatting issues in sched_can_stop_tick() Date: Mon, 14 Apr 2014 21:47:41 +0530 Message-Id: <6c3484ccb8220d0c58db1cbd9c929fc8d83005fd.1397492119.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , sched_can_stop_tick() was using 7 spaces instead of 8 spaces or a 'tab' at the beginning of each line. Which doesn't align with the Coding Guidelines. Also it removes the *rq variable as it was used at only one place and hence we can directly use this_rq() instead. Signed-off-by: Viresh Kumar --- I don't think rq = tihs_rq() has to be done before smp_mb(), in case yes sorry for this patch :( kernel/sched/core.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 268a45e..13299c5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -666,18 +666,14 @@ static inline bool got_nohz_idle_kick(void) #ifdef CONFIG_NO_HZ_FULL bool sched_can_stop_tick(void) { - struct rq *rq; - - rq = this_rq(); - - /* Make sure rq->nr_running update is visible after the IPI */ - smp_rmb(); + /* Make sure rq->nr_running update is visible after the IPI */ + smp_rmb(); - /* More than one running task need preemption */ - if (rq->nr_running > 1) - return false; + /* More than one running task need preemption */ + if (this_rq()->nr_running > 1) + return false; - return true; + return true; } #endif /* CONFIG_NO_HZ_FULL */