From patchwork Thu Jul 3 02:11:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 4468891 Return-Path: X-Original-To: patchwork-linux-arm-msm@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 424B29F36A for ; Thu, 3 Jul 2014 02:11:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C675C20353 for ; Thu, 3 Jul 2014 02:11:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E465A202AE for ; Thu, 3 Jul 2014 02:11:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754029AbaGCCLg (ORCPT ); Wed, 2 Jul 2014 22:11:36 -0400 Received: from mail-ob0-f181.google.com ([209.85.214.181]:56873 "EHLO mail-ob0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753802AbaGCCLf (ORCPT ); Wed, 2 Jul 2014 22:11:35 -0400 Received: by mail-ob0-f181.google.com with SMTP id wp4so13224840obc.40 for ; Wed, 02 Jul 2014 19:11:34 -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:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4X6UfjUlF6IRfj+H3c0GS2r0IpiM93an6wX78pIP+Ao=; b=Glp1ubtPFr5DeXA7/I2GtCzy3mzpYLSDRlExl5vEwofM2myAM5uTSlmZCq9qERosGg LDUDZ+3j+j5Zx/FcwlPqd1wR3WEdhjw8+xWz5OK7ZU0eRkGu8magvAFfMrYx0SvAx4Vt KWv39W7NN6pMHH+hO2wKt76sS9yzGBoLjFAAtkEWpqpEUYGUmzLffUOGRlRbDxNW6EsJ /IKJfkpuuPaZ5fsLyEJQGPvFLLehqWA1f86Xim8c2dAeJkapI6Xzp1uqnbBESY/YHm/P sh55qcoLiFdiin4KsNfT5xpclE+PFIfZDLxmRPRKqBISyGkaz8rLxL5hmWnxEqMarjef 7boQ== X-Gm-Message-State: ALoCoQnT1F5HsvT6PBhJrsUEufpCZgpA5oSlhHclBOEQxWjVJUgaMJWU/MBznUJbkQ6gELGC2wxs MIME-Version: 1.0 X-Received: by 10.60.101.170 with SMTP id fh10mr1475129oeb.39.1404353494738; Wed, 02 Jul 2014 19:11:34 -0700 (PDT) Received: by 10.182.233.166 with HTTP; Wed, 2 Jul 2014 19:11:34 -0700 (PDT) In-Reply-To: <53B4A718.3050702@codeaurora.org> References: <53B4A718.3050702@codeaurora.org> Date: Thu, 3 Jul 2014 07:41:34 +0530 Message-ID: Subject: Re: [PATCH 09/14] cpufreq: cpu0: Move per-cluster initialization code to ->init() From: Viresh Kumar To: Stephen Boyd Cc: "Rafael J. Wysocki" , Shawn Guo , Lists linaro-kernel , "linux-pm@vger.kernel.org" , Linux Kernel Mailing List , Arvind Chauhan , linux-arm-msm@vger.kernel.org, Sachin Kamat , Thomas P Abraham , Nishanth Menon , Tomasz Figa Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 On 3 July 2014 06:13, Stephen Boyd wrote: > drivers/cpufreq/cpufreq-generic.c:313:13: warning: 'cdev' may be used > uninitialized in this function [-Wmaybe-uninitialized] > > So I guess we should initialize it to NULL? I somehow didn't got this, I checked again. I have fixed it this way: policy->driver_data = priv; --- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index e6dc8ea..05a18bd 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -240,10 +240,11 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy) dev_err(cpu_dev, "running cpufreq without cooling device: %ld\n", PTR_ERR(cdev)); + else + priv->cdev = cdev; } of_node_put(np); - priv->cdev = cdev; priv->cpu_dev = cpu_dev; priv->cpu_reg = cpu_reg;