[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAKohpomeNmNA+7biiVqPWEx4UeiBj_GR2ccPVDpQADFzfs+XAw@mail.gmail.com>
Date: Mon, 18 Aug 2014 13:00:30 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Anand Moon <moon.linux@...oo.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Stephen Boyd <sboyd@...eaurora.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpufreq_opp: Fixed the order of argument for kcalloc.
On 16 August 2014 14:52, Anand Moon <moon.linux@...oo.com> wrote:
> 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 <moon.linux@...oo.com>
> ---
> 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;
Fixes: 3c5445c cpufreq: OPP: Avoid sleeping while atomic
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists