Skip to contentSkip to conversation

cpufreq_opp: Fixed the order of argument for kcalloc.

PATCH Viresh Kumar 3 participants 3 messages Aug 18, 2014 – Sep 4, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Viresh Kumar

author Acked-by
#1 lore raw
Quoted 17 lines · 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)

---
 drivers/cpufreq/cpufreq_opp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cpufreq_opp.c +0 -0
index f7a32d2..773bcde 100644

drivers/cpufreq/cpufreq_opp.c int dev_pm_opp_init_cpufreq_table(struct device *dev, · line 66

Quoted 8 lines
drivers/cpufreq/cpufreq_opp.c +1 -1
@@ -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
Reviewed-by
#2 lore raw
In reply to a message not in the archive
Quoted 9 lines · 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)

---

Oops.

Can this be picked up?

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#3 lore raw
Quoted 8 lines · Stephen Boyd
Quoted 7 lines · 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)

Quoted 8 lines
Quoted 2 lines

---

Oops.

Can this be picked up?

It could be if I could find it. Which is not the case, unfortunately.

Anybody care to resend it?

Rafael