From patchwork Fri Mar 28 11:41:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27268 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 695BC20062 for ; Fri, 28 Mar 2014 11:43:39 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf17253845iec.10 for ; Fri, 28 Mar 2014 04:43:38 -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=dvl8x92aXNOkprjovoHqkIMk7FXW2Sunpqwpq3uiFH4=; b=Jc9DQ8sq0e0jkty8U5i1dGgJ9q8PSi2DTU9StebE1jW1p5uUHMa6vLshYa+ST02+bh MQS+zi+aoSUFIW0DCUiZR9bfQyMmUg4J8Qnji4N1AeK9wznJ/E+1D2u5VMxXupFFSVmD /YEbxjJnGYEZpoKZt29ZF8dwTg8FgZw57FKVGphL2MzJuM4/E74QM3iTML+22GNtQMus pKowe/Ohdl2gOOjrjzoJiRH/m8SfbCHBT0RWODZunIarypgchXARF2LS5i2rM+7Vmw35 F0nwnvzFty/umtZxOH6nHTQZVCNRZg2KnUQhiFiygF2B+La5Tro/+fJ1Re7KAvJFzzGe VwIA== X-Gm-Message-State: ALoCoQlXUCxCOXKiDRa5Geh0WuLEFOm2XT4+oWdqIb4IdDN9remaeZk1Rr3lmFuDdyKO2xN0ZKIP X-Received: by 10.182.133.6 with SMTP id oy6mr3062921obb.31.1396007018804; Fri, 28 Mar 2014 04:43:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.85 with SMTP id i79ls1558127qgd.21.gmail; Fri, 28 Mar 2014 04:43:38 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr6635679vcw.15.1396007018720; Fri, 28 Mar 2014 04:43:38 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id xv15si1195506veb.98.2014.03.28.04.43.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 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.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so5681887veb.29 for ; Fri, 28 Mar 2014 04:43:38 -0700 (PDT) X-Received: by 10.220.95.139 with SMTP id d11mr1223718vcn.21.1396007018647; Fri, 28 Mar 2014 04:43:38 -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.12.8 with SMTP id v8csp1601vcv; Fri, 28 Mar 2014 04:43:38 -0700 (PDT) X-Received: by 10.66.148.134 with SMTP id ts6mr7948827pab.113.1396007017904; Fri, 28 Mar 2014 04:43:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id et3si3511120pbc.420.2014.03.28.04.43.37; Fri, 28 Mar 2014 04:43:37 -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 S1751844AbaC1LnN (ORCPT + 27 others); Fri, 28 Mar 2014 07:43:13 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:62200 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752274AbaC1LnK (ORCPT ); Fri, 28 Mar 2014 07:43:10 -0400 Received: by mail-wg0-f49.google.com with SMTP id a1so3567222wgh.32 for ; Fri, 28 Mar 2014 04:43:08 -0700 (PDT) X-Received: by 10.181.8.66 with SMTP id di2mr11902113wid.43.1396006988909; Fri, 28 Mar 2014 04:43:08 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id em1sm6470144wid.5.2014.03.28.04.43.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:08 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, linaro-networking@linaro.org, Arvind.Chauhan@arm.com, Viresh Kumar Subject: [PATCH 11/16] hrtimer: don't check if timer is queued in __remove_hrtimer() Date: Fri, 28 Mar 2014 17:11:30 +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.170 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: , __remove_hrtimer() is called from three locations: remove_hrtimer(), __run_hrtimer() and migrate_hrtimer_list(). And all these guarantee that timer was queued earlier. And so there is no need to check if the timer is queued or not in __remove_hrtimer(). Signed-off-by: Viresh Kumar --- kernel/hrtimer.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 2702185..04f8e44 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -875,9 +875,6 @@ static void __remove_hrtimer(struct hrtimer *timer, unsigned long newstate, { struct hrtimer_clock_base *base = timer->base; - if (!(timer->state & HRTIMER_STATE_ENQUEUED)) - goto out; - timerqueue_del(&base->active, &timer->node); #ifdef CONFIG_HIGH_RES_TIMERS @@ -891,10 +888,9 @@ static void __remove_hrtimer(struct hrtimer *timer, unsigned long newstate, hrtimer_force_reprogram(base->cpu_base, 1); } #endif + timer->state = newstate; if (!timerqueue_getnext(&base->active)) base->cpu_base->active_bases &= ~(1 << base->index); -out: - timer->state = newstate; } /* remove hrtimer, called with base lock held */