diff options
author | Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> | 2017-04-27 19:05:57 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-05-01 14:36:39 -0400 |
commit | 82ffc226483cad8780c25c754da5d0013c88ff8c (patch) | |
tree | aa4ff4779a3d88ac98033bc5f477e61c06cba7d5 /drivers/infiniband/core/cm.c | |
parent | 64b4646eaf3dab4cc7b3040d10d565a83654446f (diff) |
IB/CM: Add braces when using sizeof
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>
Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/cm.c')
-rw-r--r-- | drivers/infiniband/core/cm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index d35c2ded6cbd..53661f34a326 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -1404,7 +1404,7 @@ static void cm_format_paths_from_req(struct cm_req_msg *req_msg, struct ib_sa_path_rec *primary_path, struct ib_sa_path_rec *alt_path) { - memset(primary_path, 0, sizeof *primary_path); + memset(primary_path, 0, sizeof(*primary_path)); primary_path->dgid = req_msg->primary_local_gid; primary_path->sgid = req_msg->primary_remote_gid; primary_path->dlid = req_msg->primary_local_lid; @@ -1426,7 +1426,7 @@ static void cm_format_paths_from_req(struct cm_req_msg *req_msg, primary_path->service_id = req_msg->service_id; if (req_msg->alt_local_lid) { - memset(alt_path, 0, sizeof *alt_path); + memset(alt_path, 0, sizeof(*alt_path)); alt_path->dgid = req_msg->alt_local_gid; alt_path->sgid = req_msg->alt_remote_gid; alt_path->dlid = req_msg->alt_local_lid; @@ -3712,7 +3712,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent, atomic_long_inc(&port->counter_group[CM_RECV]. counter[attr_id - CM_ATTR_ID_OFFSET]); - work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths, + work = kmalloc(sizeof(*work) + sizeof(struct ib_sa_path_rec) * paths, GFP_KERNEL); if (!work) { ib_free_recv_mad(mad_recv_wc); |