IB/core: Add braces when using sizeof
authorDasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Sat, 29 Apr 2017 18:41:15 +0000 (14:41 -0400)
committerDoug Ledford <dledford@redhat.com>
Mon, 1 May 2017 18:32:43 +0000 (14:32 -0400)
This patch adds braces around parameters to sizeof
as called out by checkpatch

Reviewed-by: Don Hiatt <don.hiatt@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_marshall.c

index af020f80d50f4888436db49f935f29a0f5f5b22e..ed3e68f915cae96dd5577498a77f8c94a8573dfa 100644 (file)
@@ -36,7 +36,7 @@
 void ib_copy_ah_attr_to_user(struct ib_uverbs_ah_attr *dst,
                             struct ib_ah_attr *src)
 {
-       memcpy(dst->grh.dgid, src->grh.dgid.raw, sizeof src->grh.dgid);
+       memcpy(dst->grh.dgid, src->grh.dgid.raw, sizeof(src->grh.dgid));
        dst->grh.flow_label        = src->grh.flow_label;
        dst->grh.sgid_index        = src->grh.sgid_index;
        dst->grh.hop_limit         = src->grh.hop_limit;