From patchwork Tue Sep 2 03:41:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 4822921 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BA5489F32F for ; Tue, 2 Sep 2014 03:41:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 415982018A for ; Tue, 2 Sep 2014 03:41:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03295200E0 for ; Tue, 2 Sep 2014 03:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752527AbaIBDln (ORCPT ); Mon, 1 Sep 2014 23:41:43 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:52952 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752453AbaIBDlm (ORCPT ); Mon, 1 Sep 2014 23:41:42 -0400 Received: by mail-pd0-f179.google.com with SMTP id z10so7426007pdj.24 for ; Mon, 01 Sep 2014 20:41:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=b7370VI7/d5Cg5JiesHxxFWS/+z+oKD1sGTq5CKwBDA=; b=PfkhLbHX1mX/pZUScxAQzKDBjjIh9+AiasVGs8v+GiuMTgmqiYDVXxEdDBfFgAmlF/ v6kbxU8Tc+OA/LwSMkynXr4wPNu9W+zoyVao1TBi69mQGwSrbvE5dTXdCC3RfQsO0tlq MECm7/UBUtsSsZnIpuIKDlA2XBWoKNal7n8hVB7oqdX8UdkGqxOW7yd6XxvTKMpKPjo+ OIWfX7Wb0WgQ+A0yeBrkVUDAyW4B4uZxjlz+MjtMCbSWZ3KPQZZCJDd0MgVN1p1GiPB9 IV6rrQ9UpT1pfNrbyV9zWtoOSZs2btX19mIsjs/sNj287M200j0EsaloWbcN6KslNJ8o Hytw== X-Gm-Message-State: ALoCoQn+Dx9P4NJptvwGZ3VE86nvoc2XJGjTPVRsmyTor1uiG9d3nbPMr2211XP6Coxzmg796t7P X-Received: by 10.70.102.200 with SMTP id fq8mr935191pdb.152.1409629302303; Mon, 01 Sep 2014 20:41:42 -0700 (PDT) Received: from localhost ([122.167.123.172]) by mx.google.com with ESMTPSA id ez8sm3414836pdb.63.2014.09.01.20.41.40 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Sep 2014 20:41:41 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , yuantian.tang@freescale.com Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, hongbo.zhang@freescale.com, leoli@freescale.com, Viresh Kumar Subject: [PATCH 1/2] cpufreq: ppc-corenet: remove duplicate update of cpu_data Date: Tue, 2 Sep 2014 09:11:24 +0530 Message-Id: <09092df3d8b03df99ee475357c5f5c9cc439c61c.1409629117.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'cpu_data' is updated for policy->cpu first and then for all CPUs in policy->cpus. policy->cpus is guaranteed to contain policy->cpu as well and so the first write to 'cpu_data' for policy->cpu is redundant. Remove it. Signed-off-by: Viresh Kumar Acked-by: Tang Yuantian Acked-by: Tang Yuantian --- Hi Yuantian, I was looking into this driver due to issues reported by Hongtao (cc'd) and found that we can live without some code. These aren't fixing any bugs and are just cleanups. I didn't had a compiler for this and so this isn't even compiled. It would be great if you can please review/test these patches. drivers/cpufreq/ppc-corenet-cpufreq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c index 3607070..bee5df7 100644 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c @@ -199,7 +199,6 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) } data->table = table; - per_cpu(cpu_data, cpu) = data; /* update ->cpus if we have cluster, no harm if not */ cpumask_copy(policy->cpus, per_cpu(cpu_mask, cpu));