From patchwork Mon Apr 14 16:23:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28364 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B0D112036A for ; Mon, 14 Apr 2014 16:55:14 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id i8sf27896490qcq.4 for ; Mon, 14 Apr 2014 09:55:14 -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=Vm1NAyIuUaW8c1zYBi4SHMcDTV6Oq4V2qhXrZjGu3oI=; b=MF0icGlrmxjW3IUg6PnJwvJFgt376Pdg57JyD/+zju8rwP5FT+Y7uLWXujwnOS6oXq WmKmIEDUCwjHNiy8ovmFAQd+hZvkpHMFjfEFOZp0GkvCJhBFwFjrb5VTrhJXC7ag0TOR RltYvI6viYMV+IofCezUWD2CLJBKw6Mho2TJD89kBgkO8A7Gn886pm1FeTqhyqpoPNde 9XzzzcyoWny+v52CgFR3ncwUCuOqGUHmX7fi4GJcFbQnS0zI7CB1T8rO1TKqKCc0JECk Da+GSjuDpHjjA3ZEaSzf3IfIojLkh8uj5qDebSJHd1K6YpW7uXnPnzDMH/hRXQUnf+Hf MAkQ== X-Gm-Message-State: ALoCoQkpbLt+QUQhU8uVBFEJXbhzN+U7LVMWZc/+QD+n1+W7jvjntuY+iLQ4gQu7rFgck2YLlfJL X-Received: by 10.58.168.137 with SMTP id zw9mr22448158veb.15.1397494514369; Mon, 14 Apr 2014 09:55:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.244 with SMTP id f107ls2833747qgf.65.gmail; Mon, 14 Apr 2014 09:55:14 -0700 (PDT) X-Received: by 10.58.126.4 with SMTP id mu4mr39034501veb.0.1397494514244; Mon, 14 Apr 2014 09:55:14 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id af10si2850540vec.77.2014.04.14.09.55.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:55:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id db12so7996859veb.10 for ; Mon, 14 Apr 2014 09:55:14 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr37548116vcb.6.1397494514161; Mon, 14 Apr 2014 09:55:14 -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 ib8csp164942vcb; Mon, 14 Apr 2014 09:55:13 -0700 (PDT) X-Received: by 10.68.189.68 with SMTP id gg4mr45362975pbc.42.1397494513436; Mon, 14 Apr 2014 09:55:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id py5si3106612pbc.13.2014.04.14.09.55.06; Mon, 14 Apr 2014 09:55:06 -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 S1755867AbaDNQy5 (ORCPT + 26 others); Mon, 14 Apr 2014 12:54:57 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:34086 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754819AbaDNQZc (ORCPT ); Mon, 14 Apr 2014 12:25:32 -0400 Received: by mail-pd0-f176.google.com with SMTP id r10so8275652pdi.35 for ; Mon, 14 Apr 2014 09:25:32 -0700 (PDT) X-Received: by 10.67.5.131 with SMTP id cm3mr45121122pad.92.1397492731950; Mon, 14 Apr 2014 09:25:31 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id ff4sm82440477pad.24.2014.04.14.09.25.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25:31 -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 13/38] tick-common: don't check tick_oneshot_mode_active() from tick_check_preferred() Date: Mon, 14 Apr 2014 21:53:35 +0530 Message-Id: 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.128.179 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 = TICKDEV_MODE_ONESHOT is only called when the event device had 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 6868d6a..3dc31f5 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -240,8 +240,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; } /*