mirror of https://gitee.com/openkylin/linux.git
staging/rdma/hfi1: Use pointer instead of struct name
Use sizeof(*p) instead of sizeof(struct foo) to fix checkpatch check: CHECK: Prefer alloc(sizeof(*p)...) over alloc(sizeof(struct foo)...) Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
3db68f4672
commit
fcdd76df51
|
@ -700,7 +700,7 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type,
|
|||
if (dd->flags & HFI1_FROZEN)
|
||||
return NULL;
|
||||
|
||||
sc = kzalloc_node(sizeof(struct send_context), GFP_KERNEL, numa);
|
||||
sc = kzalloc_node(sizeof(*sc), GFP_KERNEL, numa);
|
||||
if (!sc)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue