From patchwork Tue Apr 15 05:24:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28378 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B828D2036A for ; Tue, 15 Apr 2014 05:25:20 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf50778399iec.0 for ; Mon, 14 Apr 2014 22:25:20 -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:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=smB8PgUlT1QuUx/MMkbJF7vaKTcpiRYlXjl05YlNMFA=; b=CYZhY0PWVq7OdPShRZxOcl2oflkK1gtuynPZimUz+FEwqCxcJXkqVslFJZ5RlrGbqt 1gKHQcQamupl50d0fBrPTEdXRitUdJuJ9rcR2zs5OGfEsDdpg8uKcYUK1dnDODZlZ7pI LowVzOL+up8Ir/NfpJXhJpkgFLydMHiK2wl6Bb2RCwyg5YOE7n+9pKzlD89o7FXIX2Sb H8djnYPuQWT35pkmyW8Qr1bj5vJM6IRq0UEwfZ998X/SEYJnUEFQFclxatIdnmw9FIN4 /YYjzHEmGTVYSbTy5yziuvJlUllLJmRKltegZmgDH6iPoE4b/7E96HrmjtG8AaLu1Rzx zCMA== X-Gm-Message-State: ALoCoQmzvbNtiTnIDfrVOGPHvMOfBqmJ9E81xbg79nwJxpsQZTA0aBJ04JTb3Asz7xchRdFAILmJ X-Received: by 10.43.88.73 with SMTP id az9mr19564903icc.5.1397539520189; Mon, 14 Apr 2014 22:25:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.8 with SMTP id l8ls3020758qge.27.gmail; Mon, 14 Apr 2014 22:25:20 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr29054531vcb.19.1397539520088; Mon, 14 Apr 2014 22:25:20 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id dh4si3201379veb.49.2014.04.14.22.25.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 22:25:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 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.178; Received: by mail-vc0-f178.google.com with SMTP id im17so8512276vcb.37 for ; Mon, 14 Apr 2014 22:25:20 -0700 (PDT) X-Received: by 10.58.207.74 with SMTP id lu10mr40810553vec.15.1397539520010; Mon, 14 Apr 2014 22:25:20 -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 ib8csp202937vcb; Mon, 14 Apr 2014 22:25:19 -0700 (PDT) X-Received: by 10.68.163.3 with SMTP id ye3mr48479526pbb.78.1397539519194; Mon, 14 Apr 2014 22:25:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pu9si10085357pbb.276.2014.04.14.22.25.18; Mon, 14 Apr 2014 22:25:18 -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 S1751691AbaDOFZH (ORCPT + 26 others); Tue, 15 Apr 2014 01:25:07 -0400 Received: from mail-we0-f180.google.com ([74.125.82.180]:47697 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbaDOFZE (ORCPT ); Tue, 15 Apr 2014 01:25:04 -0400 Received: by mail-we0-f180.google.com with SMTP id p61so8835748wes.25 for ; Mon, 14 Apr 2014 22:25:02 -0700 (PDT) X-Received: by 10.180.211.207 with SMTP id ne15mr12535007wic.31.1397539502306; Mon, 14 Apr 2014 22:25:02 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id hp5sm28106444wjb.0.2014.04.14.22.24.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 22:25:01 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Arvind.Chauhan@arm.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH V1 Resend 2/5] tick-common: don't check tick_oneshot_mode_active() from tick_check_preferred() Date: Tue, 15 Apr 2014 10:54:38 +0530 Message-Id: <1af3a250749c7c103ef38b52d653559ac4ec899c.1397537987.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: 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.178 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: , If 'curdev' passed to tick_check_preferred() is the current clock_event_device then these two checks look exactly same, because td->mode is set to TICKDEV_MODE_ONESHOT only when the event device has ONESHOT feature. if (curdev && (curdev->features & CLOCK_EVT_FEAT_ONESHOT)) return false; if (tick_oneshot_mode_active()) return false; Now left the case where 'curdev' is not the current clock_event_device. This can happen from the sequence started from clockevents_replace(). Here we are trying to find the best possible device that we should choose. And so even in this case we don't need the above check as we aren't really worried about the current device. So, the second check can be removed. Signed-off-by: Viresh Kumar --- kernel/time/tick-common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 0a0608e..69cab28 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -256,8 +256,6 @@ static bool tick_check_preferred(struct clock_event_device *curdev, if (!(newdev->features & CLOCK_EVT_FEAT_ONESHOT)) { if (curdev && (curdev->features & CLOCK_EVT_FEAT_ONESHOT)) return false; - if (tick_oneshot_mode_active()) - return false; } /*