Re: [PATCH for-next 03/12] IB/hfi1: Remove the debug trace message in pin_sdma_pages()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 26, 2017 at 07:00:17AM -0700, Dennis Dalessandro wrote:
> From: Harish Chegondi <harish.chegondi@xxxxxxxxx>
>
> Remove the debug trace statement in pin_sdma_pages() that
> gets executed when there is a memory allocation failure as
> the trace message doesn't help with debugging the memory
> allocation failure.
>
> Cc: Leon Romanovsky <leon@xxxxxxxxxx>
> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
> Signed-off-by: Harish Chegondi <harish.chegondi@xxxxxxxxx>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
> ---
>  drivers/infiniband/hw/hfi1/user_sdma.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>

Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>

BTW, by looking on something else,

1. I saw that you are not checking for kcalloc failure in drivers/infiniband/hw/hfi1/verbs.c

1138                         empty_buf = kcalloc(extra_bytes, sizeof(u8),
1139                                             GFP_KERNEL);
1140                         seg_pio_copy_mid(pbuf, empty_buf, extra_bytes);

2. The following code in drivers/infiniband/hw/hfi1/sdma.c, can and
should be replaced by kvmalloc. You are incorrectly open-coded failback.

1467                 sde->tx_ring =
1468                         kcalloc(descq_cnt, sizeof(struct sdma_txreq *),
1469                                 GFP_KERNEL);
1470                 if (!sde->tx_ring)
1471                         sde->tx_ring =
1472                                 vzalloc(
1473                                         sizeof(struct sdma_txreq *) *
1474                                         descq_cnt);

Thanks

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux