From: Jubin John Date: Mon, 15 Feb 2016 04:21:16 +0000 (-0800) Subject: staging/rdma/hfi1: Use pointer instead of struct name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fcdd76df519e7be5e1094a4bf995374398c44efc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Jubin John Signed-off-by: Doug Ledford --- 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;