From patchwork Mon Apr 14 16:23:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28340 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 897AF20534 for ; Mon, 14 Apr 2014 16:26:39 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id jt11sf32238097pbb.3 for ; Mon, 14 Apr 2014 09:26: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=3M1qSg8ZoyupmhArYDA348SoUXDD8BPVQZ+d8nmvKGk=; b=Nj80VHhBL3jv5O5GIJsluyk9H1OR/0/itkR06agE2ngQ6YZ77XtMRClbvQYKIgZu0p 8Jgpl/4DA07rCJr6uxuR5/bLzVl+pxtjdv1ZEBn+bODHka+GSxhWzJw17VyEcUpmFr8H FC9NV843PPa7aqK8UnYffD91/202XIEKqVhmkYK6w5ExoE/nvgN4IMAIEpohW8l1geXy UwVwf4uy+jLPCVSbsciVrz/ziBn6qhnNwP9J85PaRXcd127qAhrQLZQzWpd5JrpvL4VJ PHWs+Qj8/czlq5ROpy1r+yCLHxCrJdyB1Shiw090k+L4STApKBB/I+og0g16yO5PcBV6 Qm2A== X-Gm-Message-State: ALoCoQluU2oRQK6MfAHoGrVd/iGjNoDnve7d6/iLOQE9yAJrlOfyn1vZxk+53srjg5P7Z14eQz/u X-Received: by 10.66.189.228 with SMTP id gl4mr21801637pac.26.1397492798835; Mon, 14 Apr 2014 09:26:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.244 with SMTP id f107ls2825043qgf.65.gmail; Mon, 14 Apr 2014 09:26:38 -0700 (PDT) X-Received: by 10.52.138.112 with SMTP id qp16mr806071vdb.40.1397492798567; Mon, 14 Apr 2014 09:26:38 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id ck5si1801619vdd.127.2014.04.14.09.26.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:26:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 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.173; Received: by mail-vc0-f173.google.com with SMTP id il7so7679677vcb.18 for ; Mon, 14 Apr 2014 09:26:38 -0700 (PDT) X-Received: by 10.52.231.72 with SMTP id te8mr204712vdc.54.1397492798486; Mon, 14 Apr 2014 09:26: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.221.72 with SMTP id ib8csp162811vcb; Mon, 14 Apr 2014 09:26:38 -0700 (PDT) X-Received: by 10.68.211.164 with SMTP id nd4mr44975565pbc.44.1397492797754; Mon, 14 Apr 2014 09:26:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bs8si9142921pad.299.2014.04.14.09.26.36; Mon, 14 Apr 2014 09:26:36 -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 S1755629AbaDNQ0R (ORCPT + 26 others); Mon, 14 Apr 2014 12:26:17 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:51533 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754857AbaDNQ0O (ORCPT ); Mon, 14 Apr 2014 12:26:14 -0400 Received: by mail-pd0-f175.google.com with SMTP id x10so8257054pdj.34 for ; Mon, 14 Apr 2014 09:26:14 -0700 (PDT) X-Received: by 10.66.149.7 with SMTP id tw7mr22520170pab.72.1397492774116; Mon, 14 Apr 2014 09:26:14 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id qc8sm34692229pbc.68.2014.04.14.09.26.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:26:13 -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 20/38] tick-sched: initialize 'cpu' while defining it in tick_nohz_full_setup() Date: Mon, 14 Apr 2014 21:53:42 +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.173 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 this currently: int cpu; cpu = smp_processor_id(); And we can rewrite it to make it shorter: int cpu = smp_processor_id(); Signed-off-by: Viresh Kumar --- kernel/time/tick-sched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 649b920..e9f9f87 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -274,7 +274,7 @@ out: /* Parse the boot-time nohz CPU list from the kernel parameters. */ static int __init tick_nohz_full_setup(char *str) { - int cpu; + int cpu = smp_processor_id(); alloc_bootmem_cpumask_var(&tick_nohz_full_mask); if (cpulist_parse(str, tick_nohz_full_mask) < 0) { @@ -282,7 +282,6 @@ static int __init tick_nohz_full_setup(char *str) return 1; } - cpu = smp_processor_id(); if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) { pr_warning("NO_HZ: Clearing %d from nohz_full range for timekeeping\n", cpu);