aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJubin John <jubin.john@intel.com>2016-02-14 20:21:16 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:45:40 -0500
commitfcdd76df519e7be5e1094a4bf995374398c44efc (patch)
treec85026f9ab6eec8794529ebc6b09cc4cbca0b0a3
parentstaging/rdma/hfi1: Remove CamelCase (diff)
downloadlinux-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.c2
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;