From patchwork Fri Sep 5 03:08:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 36778 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 05AA2202E4 for ; Fri, 5 Sep 2014 03:09:15 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id eu11sf99489205pac.7 for ; Thu, 04 Sep 2014 20:09:13 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=bsrYSXAdoqEbfRMfv0tf/DnuuF/k5Y7g4grM0DZfDVA=; b=O84VPlG58kHivOsxFJmyxUzR6c+5yy4R81oDU6t3b43ol7nYMt0gDNiVYiGtvKvELs WmKEfkIWJ+UZ91cvC/W8YrGAMdKCuy8sHXfDo1UpEIn5+dsKxFRLvujNr7rcmAr/0hz1 3cy8wdnnQZYNM4Yp32+Dt66KmrOyaI1m5HloFwQEWGT+mZ53b2K9y9SMwAXgE9jHLBTC ekCSjRFdboSXAQDyoEYwiriK1ZZxl6hRuUW2xL8XIT4htHc8PU7qulo8NaxVJzgcZUoJ 1PGjAc0K2GtBeT9VAgPP0gmfoKGbwX9soo9dXukcLnlgu672Hdhc0mERzuyVJlm7RFxb /UQA== X-Gm-Message-State: ALoCoQlod3G/EycAp8FgDaG5e7FMfbuBVJe/Ri1YBQKns048yb6B2tLbYLOPI13KoCp65UnJtFUM X-Received: by 10.70.96.197 with SMTP id du5mr5183230pdb.3.1409886553016; Thu, 04 Sep 2014 20:09:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.105.247 with SMTP id c110ls609818qgf.5.gmail; Thu, 04 Sep 2014 20:09:12 -0700 (PDT) X-Received: by 10.52.185.193 with SMTP id fe1mr6784861vdc.31.1409886552896; Thu, 04 Sep 2014 20:09:12 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id qh2si549103vcb.81.2014.09.04.20.09.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Sep 2014 20:09:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id le20so359633vcb.3 for ; Thu, 04 Sep 2014 20:09:12 -0700 (PDT) X-Received: by 10.52.164.199 with SMTP id ys7mr6825430vdb.42.1409886552802; Thu, 04 Sep 2014 20:09:12 -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.221.45.67 with SMTP id uj3csp19204vcb; Thu, 4 Sep 2014 20:09:12 -0700 (PDT) X-Received: by 10.66.121.200 with SMTP id lm8mr15876518pab.1.1409886551653; Thu, 04 Sep 2014 20:09:11 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hc2si1305967pac.86.2014.09.04.20.08.41 for ; Thu, 04 Sep 2014 20:09:11 -0700 (PDT) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751952AbaIEDIk (ORCPT + 15 others); Thu, 4 Sep 2014 23:08:40 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:43159 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbaIEDIk (ORCPT ); Thu, 4 Sep 2014 23:08:40 -0400 Received: by mail-pa0-f48.google.com with SMTP id hz1so478301pad.21 for ; Thu, 04 Sep 2014 20:08:39 -0700 (PDT) X-Received: by 10.70.24.133 with SMTP id u5mr15611510pdf.87.1409886517532; Thu, 04 Sep 2014 20:08:37 -0700 (PDT) Received: from localhost ([122.167.123.172]) by mx.google.com with ESMTPSA id nr2sm471294pbc.37.2014.09.04.20.08.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Sep 2014 20:08:36 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linux-pm@vger.kernel.org, sboyd@codeaurora.org, moon.linux@yahoo.com Subject: [PATCH Resend] cpufreq_opp: Fixed the order of argument for kcalloc. Date: Fri, 5 Sep 2014 08:38:30 +0530 Message-Id: <79b874a04ead23dc710c30edbe0eec4c5cff9be7.1409886422.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) 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: , From: Anand Moon These changes fix the argument to the kcalloc @n: number of elements. @size: element size. @flags: the type of memory to allocate (see kmalloc). void *kcalloc(size_t n, size_t size, gfp_t flags) Signed-off-by: Anand Moon Acked-by: Viresh Kumar Reviewed-by: Stephen Boyd --- drivers/cpufreq/cpufreq_opp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_opp.c b/drivers/cpufreq/cpufreq_opp.c index f7a32d2..773bcde 100644 --- a/drivers/cpufreq/cpufreq_opp.c +++ b/drivers/cpufreq/cpufreq_opp.c @@ -60,7 +60,7 @@ int dev_pm_opp_init_cpufreq_table(struct device *dev, goto out; } - freq_table = kcalloc(sizeof(*freq_table), (max_opps + 1), GFP_ATOMIC); + freq_table = kcalloc((max_opps + 1), sizeof(*freq_table), GFP_ATOMIC); if (!freq_table) { ret = -ENOMEM; goto out;