Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755862AbaDNQy5 (ORCPT ); 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 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } /* -- 1.7.12.rc2.18.g61b472e -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/