From patchwork Mon Apr 21 09:55:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28683 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f69.google.com (mail-qg0-f69.google.com [209.85.192.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1CFBB2032B for ; Mon, 21 Apr 2014 09:59:07 +0000 (UTC) Received: by mail-qg0-f69.google.com with SMTP id a108sf11689677qge.8 for ; Mon, 21 Apr 2014 02:59:06 -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=rGWcfCAcfVhhpqKeDYN+NAcZLQqZzX77tEr+gqUj/Eg=; b=Sx6079lXNsu7pXvgGhkcMIn96CsvoS1KCb48p024nyRvPHSfho8rJRAInEcMPlHjW9 zHK/XvTO/CDEmroZhw88FhAIJjIX5czhdwQqr3WAk0VH5DGl8fk6UWrn95OlIG1k1zS5 kRHnNTBcvnR3DW1b1jKnfj8+ggm/PZoDjeCnEg9oSM0Wuu4t2b1gqJ4d6qsOfhKrLWxm uaZ8yVSHESylJevCaapSO53P66MrjRLQzfxMmTVaJ50GQaU7agCKExH59Z3l21d5DbjQ 9JcxUINezvcR69jlniNAJa+IwSwdHMGe/c+QKmnFVeNWVKgFdYOxDen5yc1C1EXdbs8c rMYQ== X-Gm-Message-State: ALoCoQm8jdvsw+n7lXuZfMMquJOM6QhQ0uBmUQRqVqBbfx2EIAPCfQ/aaA4wJt2p63SIypfCstrl X-Received: by 10.236.25.175 with SMTP id z35mr16124453yhz.32.1398074346902; Mon, 21 Apr 2014 02:59:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.232 with SMTP id 95ls2325455qgp.68.gmail; Mon, 21 Apr 2014 02:59:06 -0700 (PDT) X-Received: by 10.220.163.3 with SMTP id y3mr30602316vcx.7.1398074346826; Mon, 21 Apr 2014 02:59:06 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id cb3si6168121vdc.203.2014.04.21.02.59.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 02:59:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id jz11so7422109veb.39 for ; Mon, 21 Apr 2014 02:59:06 -0700 (PDT) X-Received: by 10.58.123.71 with SMTP id ly7mr33528570veb.11.1398074346743; Mon, 21 Apr 2014 02:59:06 -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 ib8csp280364vcb; Mon, 21 Apr 2014 02:59:06 -0700 (PDT) X-Received: by 10.68.215.68 with SMTP id og4mr36888385pbc.112.1398074345896; Mon, 21 Apr 2014 02:59:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zt8si20530528pbc.316.2014.04.21.02.59.05; Mon, 21 Apr 2014 02:59:05 -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 S1752360AbaDUJ64 (ORCPT + 26 others); Mon, 21 Apr 2014 05:58:56 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:42274 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751937AbaDUJ4k (ORCPT ); Mon, 21 Apr 2014 05:56:40 -0400 Received: by mail-we0-f169.google.com with SMTP id w62so3592245wes.28 for ; Mon, 21 Apr 2014 02:56:39 -0700 (PDT) X-Received: by 10.181.8.204 with SMTP id dm12mr6619679wid.1.1398074199597; Mon, 21 Apr 2014 02:56:39 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id kp5sm56484024wjb.30.2014.04.21.02.56.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 21 Apr 2014 02:56:38 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linaro-networking@linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Viresh Kumar Subject: [PATCH V2 13/19] tick-common: remove local variable 'broadcast' from tick_resume() Date: Mon, 21 Apr 2014 15:25:09 +0530 Message-Id: <59f9a0281bac84fe356ed3d0f54ae371ad1e430d.1398072824.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.128.180 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: , 'broadcast' is used just once and we can use tick_resume_broadcast() directly instead. Also it changes the code a bit to get rid of extra indentation level which was forcing us to break function calls into two lines. Signed-off-by: Viresh Kumar --- kernel/time/tick-common.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 85ee9fd..2dc6822 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -350,17 +350,16 @@ void tick_resume(void) { struct tick_device *td = tick_get_cpu_device(); struct clock_event_device *dev = td->evtdev; - int broadcast = tick_resume_broadcast(); clockevents_set_mode(dev, CLOCK_EVT_MODE_RESUME); - if (!broadcast) { - if (td->mode == TICKDEV_MODE_PERIODIC) - tick_setup_periodic(dev, 0); - else - tick_setup_oneshot(dev, dev->event_handler, - ktime_get()); - } + if (tick_resume_broadcast()) + return; + + if (td->mode == TICKDEV_MODE_PERIODIC) + tick_setup_periodic(dev, 0); + else + tick_setup_oneshot(dev, dev->event_handler, ktime_get()); } /**