interrupt_data->msix_entries =
kcalloc(interrupt_data->num_interrupts,
- sizeof(struct msix_entry), GFP_KERNEL);
+ sizeof(*interrupt_data->msix_entries), GFP_KERNEL);
if (!interrupt_data->msix_entries)
return -ENOMEM;
const struct gasket_driver_desc *driver_desc =
gasket_get_driver_desc(gasket_dev);
- interrupt_data = kzalloc(sizeof(struct gasket_interrupt_data),
- GFP_KERNEL);
+ interrupt_data = kzalloc(sizeof(*interrupt_data), GFP_KERNEL);
if (!interrupt_data)
return -ENOMEM;
gasket_dev->interrupt_data = interrupt_data;
interrupt_data->pack_width = driver_desc->interrupt_pack_width;
interrupt_data->num_configured = 0;
- interrupt_data->eventfd_ctxs = kcalloc(driver_desc->num_interrupts,
- sizeof(struct eventfd_ctx *),
- GFP_KERNEL);
+ interrupt_data->eventfd_ctxs =
+ kcalloc(driver_desc->num_interrupts,
+ sizeof(*interrupt_data->eventfd_ctxs), GFP_KERNEL);
if (!interrupt_data->eventfd_ctxs) {
kfree(interrupt_data);
return -ENOMEM;
}
- interrupt_data->interrupt_counts = kcalloc(driver_desc->num_interrupts,
- sizeof(ulong),
- GFP_KERNEL);
+ interrupt_data->interrupt_counts =
+ kcalloc(driver_desc->num_interrupts,
+ sizeof(*interrupt_data->interrupt_counts), GFP_KERNEL);
if (!interrupt_data->interrupt_counts) {
kfree(interrupt_data->eventfd_ctxs);
kfree(interrupt_data);
/* allocate the physical memory block */
gasket_dev->page_table[index]->coherent_pages =
- kcalloc(num_pages, sizeof(struct gasket_coherent_page_entry),
+ kcalloc(num_pages,
+ sizeof(*gasket_dev->page_table[index]->coherent_pages),
GFP_KERNEL);
if (!gasket_dev->page_table[index]->coherent_pages)
goto nomem;