Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08f0e161 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Doug Ledford
Browse files

RDMA/uverbs: Update sizeof users



Update sizeof() users to be consistent with coding style.

Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent b5bc5981
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -468,7 +468,7 @@ void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context)
		return;
		return;
	}
	}


	entry = kmalloc(sizeof *entry, GFP_ATOMIC);
	entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
	if (!entry) {
	if (!entry) {
		spin_unlock_irqrestore(&ev_queue->lock, flags);
		spin_unlock_irqrestore(&ev_queue->lock, flags);
		return;
		return;
@@ -501,7 +501,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
		return;
		return;
	}
	}


	entry = kmalloc(sizeof *entry, GFP_ATOMIC);
	entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
	if (!entry) {
	if (!entry) {
		spin_unlock_irqrestore(&file->async_file->ev_queue.lock, flags);
		spin_unlock_irqrestore(&file->async_file->ev_queue.lock, flags);
		return;
		return;
@@ -676,10 +676,10 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
		return -EACCES;
		return -EACCES;
	}
	}


	if (count < sizeof hdr)
	if (count < sizeof(hdr))
		return -EINVAL;
		return -EINVAL;


	if (copy_from_user(&hdr, buf, sizeof hdr))
	if (copy_from_user(&hdr, buf, sizeof(hdr)))
		return -EFAULT;
		return -EFAULT;


	srcu_key = srcu_read_lock(&file->device->disassociate_srcu);
	srcu_key = srcu_read_lock(&file->device->disassociate_srcu);
@@ -1032,7 +1032,7 @@ static void ib_uverbs_add_one(struct ib_device *device)
	if (!device->alloc_ucontext)
	if (!device->alloc_ucontext)
		return;
		return;


	uverbs_dev = kzalloc(sizeof *uverbs_dev, GFP_KERNEL);
	uverbs_dev = kzalloc(sizeof(*uverbs_dev), GFP_KERNEL);
	if (!uverbs_dev)
	if (!uverbs_dev)
		return;
		return;