>> @@ -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

Reply via email to