From patchwork Mon Apr 14 16:23:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28350 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6E30A20534 for ; Mon, 14 Apr 2014 16:28:36 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id a41sf31664250yho.2 for ; Mon, 14 Apr 2014 09:28:36 -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=tCmLvLL21BQNaYyPdow2eRfDTEYVFA7KOHbKAqCf3JA=; b=CgU0jWFtTlW6PM9up0rZsgQck6vTja+TertpOFhrE92kiuF3yZ/71Ohz8HSh7meKi4 HP+y/Q4bDTI3PvaRHCdKQMdE3UmFr/hLsRubOlORuMSyB2YPA7WG57edqAoy8UHvtX2L 43WTPR3nwxMZExP4X4Sovu8N3KNkFF7cdegptUNaq1ea7iHgZ3VMs/LXUBjEsctcELkp HwBZZFgJ+k4SFr3sXchAGZDIl9UWYGyWuPCbzfq405z/354nR6EJiPScDSpJhj0WDBpw B/OMelV6gv98LLqR/dKMxg27/3BIpOzxnCM/JpV3lk81WXLX6p7qY8BFk6+HOFRcurC2 vG5w== X-Gm-Message-State: ALoCoQnMH9um8GBsSEb8GGfNUyqOYuwr3PlLHpPtM/m7B8m78JB2d9t/SfqPo9f4tsHJTZCnjIBY X-Received: by 10.236.138.113 with SMTP id z77mr16840305yhi.25.1397492916174; Mon, 14 Apr 2014 09:28:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.103 with SMTP id k94ls803600qgd.30.gmail; Mon, 14 Apr 2014 09:28:36 -0700 (PDT) X-Received: by 10.220.191.134 with SMTP id dm6mr37836047vcb.16.1397492916006; Mon, 14 Apr 2014 09:28:36 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id ya4si2837162vec.109.2014.04.14.09.28.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:28:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 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.182; Received: by mail-vc0-f182.google.com with SMTP id ib6so7967898vcb.13 for ; Mon, 14 Apr 2014 09:28:35 -0700 (PDT) X-Received: by 10.58.90.99 with SMTP id bv3mr1010979veb.34.1397492915931; Mon, 14 Apr 2014 09:28:35 -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 ib8csp162939vcb; Mon, 14 Apr 2014 09:28:35 -0700 (PDT) X-Received: by 10.66.102.4 with SMTP id fk4mr45088255pab.59.1397492915017; Mon, 14 Apr 2014 09:28:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tc10si6201513pbc.203.2014.04.14.09.28.34; Mon, 14 Apr 2014 09:28:34 -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 S1755915AbaDNQ2P (ORCPT + 26 others); Mon, 14 Apr 2014 12:28:15 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:53598 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753360AbaDNQ2L (ORCPT ); Mon, 14 Apr 2014 12:28:11 -0400 Received: by mail-pd0-f181.google.com with SMTP id p10so8240941pdj.12 for ; Mon, 14 Apr 2014 09:28:10 -0700 (PDT) X-Received: by 10.66.191.134 with SMTP id gy6mr30137788pac.27.1397492890698; Mon, 14 Apr 2014 09:28:10 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id vb7sm34767716pbc.13.2014.04.14.09.28.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:28:10 -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 36/38] tick-broadcast: get rid of extra comparison in tick_do_broadcast_on_off() Date: Mon, 14 Apr 2014 21:53:58 +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.220.182 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: , We are doing an extra comparison in tick_do_broadcast_on_off(): if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE) tick_broadcast_force = 1; Whereas it can be handled easily in the switch block only. It doesn't look like there is any strict ordering of instructions required here and so move setting 'tick_broadcast_force' at the beginning. Signed-off-by: Viresh Kumar --- kernel/time/tick-broadcast.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 3b07569..ec86227 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -348,15 +348,14 @@ static void tick_do_broadcast_on_off(unsigned long *reason) bc_stopped = cpumask_empty(tick_broadcast_mask); switch (*reason) { - case CLOCK_EVT_NOTIFY_BROADCAST_ON: case CLOCK_EVT_NOTIFY_BROADCAST_FORCE: + tick_broadcast_force = 1; + case CLOCK_EVT_NOTIFY_BROADCAST_ON: cpumask_set_cpu(cpu, tick_broadcast_on); if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) { if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) clockevents_shutdown(dev); } - if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE) - tick_broadcast_force = 1; break; case CLOCK_EVT_NOTIFY_BROADCAST_OFF: if (tick_broadcast_force)