From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: Re: [PATCH 3/5] IB/hfi1: Adjust another size determination in hfi1_user_sdma_alloc_queues() Date: Mon, 13 Feb 2017 10:32:13 +0100 Message-ID: <4dca91c1-488d-120d-bd25-74f400242bd2@users.sourceforge.net> References: <8a997282-09c7-0f9f-645e-d7c6e8c79e67@users.sourceforge.net> <0fdf4d81-58d7-c6fc-b37f-41d47675dd83@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Johannes Thumshirn , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Dennis Dalessandro , Doug Ledford , Hal Rosenstock , Mike Marciniszyn , Sean Hefty , LKML , kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rdma@vger.kernel.org >> @@ -443,8 +442,8 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, struct file *fp) >> if (!cq) >> goto cq_nomem; >> >> - memsize = PAGE_ALIGN(sizeof(*cq->comps) * hfi1_sdma_comp_ring_size); >> - cq->comps = vmalloc_user(memsize); >> + cq->comps = vmalloc_user(PAGE_ALIGN(sizeof(*cq->comps) >> + * hfi1_sdma_comp_ring_size)); >> if (!cq->comps) >> goto cq_comps_nomem; >> >> > > IMHO this makes readability worse. How often does it really make sense to keep such a product in this local variable? > What's the intention behind this patch? I suggested just another simple omission of an extra variable. Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html