+1
-10
drivers/parisc/iosapic.c
+1
-10
drivers/parisc/iosapic.c
···
221
221
222
222
static struct irt_entry *iosapic_alloc_irt(int num_entries)
223
223
{
224
-
unsigned long a;
225
-
226
-
/* The IRT needs to be 8-byte aligned for the PDC call.
227
-
* Normally kmalloc would guarantee larger alignment, but
228
-
* if CONFIG_DEBUG_SLAB is enabled, then we can get only
229
-
* 4-byte alignment on 32-bit kernels
230
-
*/
231
-
a = (unsigned long)kmalloc(sizeof(struct irt_entry) * num_entries + 8, GFP_KERNEL);
232
-
a = (a + 7UL) & ~7UL;
233
-
return (struct irt_entry *)a;
224
+
return kcalloc(num_entries, sizeof(struct irt_entry), GFP_KERNEL);
234
225
}
235
226
236
227
/**