diff options
author | Jubin John <jubin.john@intel.com> | 2016-02-14 20:21:16 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-10 20:45:40 -0500 |
commit | fcdd76df519e7be5e1094a4bf995374398c44efc (patch) | |
tree | c85026f9ab6eec8794529ebc6b09cc4cbca0b0a3 | |
parent | staging/rdma/hfi1: Remove CamelCase (diff) | |
download | linux-dev-fcdd76df519e7be5e1094a4bf995374398c44efc.tar.xz linux-dev-fcdd76df519e7be5e1094a4bf995374398c44efc.zip |
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>
-rw-r--r-- | drivers/staging/rdma/hfi1/pio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/pio.c b/drivers/staging/rdma/hfi1/pio.c index 7907e4c268d8..b0a2a4526a7c 100644 --- a/drivers/staging/rdma/hfi1/pio.c +++ b/drivers/staging/rdma/hfi1/pio.c @@ -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; |