diff options
author | Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> | 2017-03-20 19:38:05 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-04-28 13:58:08 -0400 |
commit | dbb6c91fd8e0f32ff892cf72782f3650df2be811 (patch) | |
tree | 35c3fcfbf62b394bbe84aa72d2e0d4e098d097b8 /drivers/infiniband/core | |
parent | f96a318714496c01c6d3cecea06500f69e5c7edc (diff) | |
download | op-kernel-dev-dbb6c91fd8e0f32ff892cf72782f3650df2be811.zip op-kernel-dev-dbb6c91fd8e0f32ff892cf72782f3650df2be811.tar.gz |
IB/SA: Add braces when using sizeof
This fixes a checkpatch issue. The fix is needed
so that some of these functions can be moved around
in the forthcoming patches
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')
-rw-r--r-- | drivers/infiniband/core/sa_query.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index a37c8aa..23d026f 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -944,7 +944,7 @@ static void update_sm_ah(struct work_struct *work) return; } - new_ah = kmalloc(sizeof *new_ah, GFP_KERNEL); + new_ah = kmalloc(sizeof(*new_ah), GFP_KERNEL); if (!new_ah) { return; } @@ -957,7 +957,7 @@ static void update_sm_ah(struct work_struct *work) IB_DEFAULT_PKEY_FULL, &new_ah->pkey_index)) pr_err("Couldn't find index for default PKey\n"); - memset(&ah_attr, 0, sizeof ah_attr); + memset(&ah_attr, 0, sizeof(ah_attr)); ah_attr.dlid = port_attr.sm_lid; ah_attr.sl = port_attr.sm_sl; ah_attr.port_num = port->port_num; |