From patchwork Mon Apr 14 16:23:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28337 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B917720F46 for ; Mon, 14 Apr 2014 16:25:36 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id va2sf15836409obc.5 for ; Mon, 14 Apr 2014 09:25: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=eyXH0G6k3V502IaChhnk38+K9MB3DuIer64TsmRriD0=; b=H4oE9i07KOMqTDQsNNx+E1mRFN26Sf6oVdkR934I/N0QL7HtgTFWSHLFCgbdxE7mTK gnmfZNcKeAgc1cifv+zgeoztXJyjFHme7iJMCXBTFZ4MfWjaZZBCulfEUbcv8eiyDeoB RVraPAJ2qIK7DdVBklYbpy0K+w9HfSr6Zp1TkEkupbnHZ9mJp9KOmcnP+Lpe6YPnacol PndWz18qybG8w0C+KTLmNWfh9K9GoOQXc6cI53tVmGSr0Nc8kM8WDWc+xkl37eUayDfz TCjAUOObZTNpZsngEpWHySA5lpdTJSZIjZ4tQJf2a7rMdQXnGb+f9zeiPKwJmxrlOHCV UVcg== X-Gm-Message-State: ALoCoQnszPlAOv/+qIEZgxHWJipabmrvPIPX3b8abFlF8EOZ0LjE12O5jPEpbxrU3zLL1kyTiMxl X-Received: by 10.42.29.138 with SMTP id r10mr1858690icc.11.1397492736222; Mon, 14 Apr 2014 09:25:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.115 with SMTP id i106ls2397510qgd.97.gmail; Mon, 14 Apr 2014 09:25:36 -0700 (PDT) X-Received: by 10.58.195.202 with SMTP id ig10mr1012478vec.33.1397492736040; Mon, 14 Apr 2014 09:25:36 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id ej2si2833968veb.149.2014.04.14.09.25.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 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.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so7729630vcb.16 for ; Mon, 14 Apr 2014 09:25:36 -0700 (PDT) X-Received: by 10.52.171.115 with SMTP id at19mr208948vdc.48.1397492735951; Mon, 14 Apr 2014 09:25: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 ib8csp162759vcb; Mon, 14 Apr 2014 09:25:35 -0700 (PDT) X-Received: by 10.68.160.163 with SMTP id xl3mr45400602pbb.39.1397492735228; Mon, 14 Apr 2014 09:25:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rb6si9150400pab.149.2014.04.14.09.25.34; Mon, 14 Apr 2014 09:25: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 S1755443AbaDNQZV (ORCPT + 26 others); Mon, 14 Apr 2014 12:25:21 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:52488 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755026AbaDNQZO (ORCPT ); Mon, 14 Apr 2014 12:25:14 -0400 Received: by mail-pd0-f170.google.com with SMTP id v10so8279580pde.15 for ; Mon, 14 Apr 2014 09:25:13 -0700 (PDT) X-Received: by 10.66.243.131 with SMTP id wy3mr45648199pac.32.1397492713727; Mon, 14 Apr 2014 09:25:13 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id av2sm34750718pbc.16.2014.04.14.09.25.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25: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 10/38] tick-common: remove extra checks from tick_check_new_device() Date: Mon, 14 Apr 2014 21:53:32 +0530 Message-Id: <62394f8427b11f7e365870eda7801a277c697eb0.1397492345.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.220.171 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: , tick_check_new_device() is calling tick_check_percpu() which has this as the first test: if (!cpumask_test_cpu(cpu, newdev->cpumask)) return false; And so the same isn't required to be repeated by tick_check_new_device(). Remove it. This also initializes several variables during their definition only. Signed-off-by: Viresh Kumar --- kernel/time/tick-common.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 949f3d3..395cbbd 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -269,16 +269,9 @@ bool tick_check_replacement(struct clock_event_device *curdev, */ void tick_check_new_device(struct clock_event_device *newdev) { - struct clock_event_device *curdev; - struct tick_device *td; - int cpu; - - cpu = smp_processor_id(); - if (!cpumask_test_cpu(cpu, newdev->cpumask)) - goto out_bc; - - td = tick_get_device(cpu); - curdev = td->evtdev; + int cpu = smp_processor_id(); + struct tick_device *td = tick_get_device(cpu); + struct clock_event_device *curdev = td->evtdev; /* cpu local device ? */ if (!tick_check_percpu(curdev, newdev, cpu))