]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA/uverbs: Update sizeof users
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 21 Feb 2018 16:12:32 +0000 (18:12 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 23 Feb 2018 03:29:11 +0000 (22:29 -0500)
Update sizeof() users to be consistent with coding style.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_main.c

index 7cadd4b5a0c0989c0c0baabfe2a676d243fe75aa..66b2f92bd47bd6e9ffba2de599f1ceee4d2f283b 100644 (file)
@@ -468,7 +468,7 @@ void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context)
                return;
        }
 
-       entry = kmalloc(sizeof *entry, GFP_ATOMIC);
+       entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
        if (!entry) {
                spin_unlock_irqrestore(&ev_queue->lock, flags);
                return;
@@ -501,7 +501,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
                return;
        }
 
-       entry = kmalloc(sizeof *entry, GFP_ATOMIC);
+       entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
        if (!entry) {
                spin_unlock_irqrestore(&file->async_file->ev_queue.lock, flags);
                return;
@@ -676,10 +676,10 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
                return -EACCES;
        }
 
-       if (count < sizeof hdr)
+       if (count < sizeof(hdr))
                return -EINVAL;
 
-       if (copy_from_user(&hdr, buf, sizeof hdr))
+       if (copy_from_user(&hdr, buf, sizeof(hdr)))
                return -EFAULT;
 
        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)
                return;
 
-       uverbs_dev = kzalloc(sizeof *uverbs_dev, GFP_KERNEL);
+       uverbs_dev = kzalloc(sizeof(*uverbs_dev), GFP_KERNEL);
        if (!uverbs_dev)
                return;