filter_cmd.opcode, filter_cmd.length,
filter_cmd.value_ptr);
- filter_value = kzalloc(
- filter_cmd.length * sizeof(u8),
- GFP_KERNEL);
+ filter_value = kcalloc(filter_cmd.length, sizeof(u8),
+ GFP_KERNEL);
if (!filter_value) {
pr_alert("Not enough memory\n");
ret = -ENOMEM;
* The resulting value will be rounded down to the closest
* multiple of dd->rcv_entries.group_size.
*/
- rcd->egrbufs.buffers = kzalloc(sizeof(*rcd->egrbufs.buffers) *
- rcd->egrbufs.count, GFP_KERNEL);
+ rcd->egrbufs.buffers = kcalloc(rcd->egrbufs.count,
+ sizeof(*rcd->egrbufs.buffers),
+ GFP_KERNEL);
if (!rcd->egrbufs.buffers)
goto bail;
- rcd->egrbufs.rcvtids = kzalloc(sizeof(*rcd->egrbufs.rcvtids) *
- rcd->egrbufs.count, GFP_KERNEL);
+ rcd->egrbufs.rcvtids = kcalloc(rcd->egrbufs.count,
+ sizeof(*rcd->egrbufs.rcvtids),
+ GFP_KERNEL);
if (!rcd->egrbufs.rcvtids)
goto bail;
rcd->egrbufs.size = eager_buffer_size;
if (!hfi1_cpulist_count) {
u32 count = num_online_cpus();
- hfi1_cpulist = kzalloc(BITS_TO_LONGS(count) *
- sizeof(long), GFP_KERNEL);
+ hfi1_cpulist = kcalloc(BITS_TO_LONGS(count), sizeof(long),
+ GFP_KERNEL);
if (hfi1_cpulist)
hfi1_cpulist_count = count;
else
unsigned pinned;
iovec->npages = num_user_pages(&iovec->iov);
- iovec->pages = kzalloc(sizeof(*iovec->pages) *
- iovec->npages, GFP_KERNEL);
+ iovec->pages = kcalloc(iovec->npages, sizeof(*iovec->pages),
+ GFP_KERNEL);
if (!iovec->pages) {
SDMA_DBG(req, "Failed page array alloc");
ret = -ENOMEM;