RE: Re: [PATCH next] siw: Fix pointer-to-int-cast warning in siw_rx_pbl()

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

 



-----"Jason Gunthorpe" <jgg@xxxxxxxx> wrote: -----

>To: "Bernard Metzler" <BMT@xxxxxxxxxxxxxx>
>From: "Jason Gunthorpe" <jgg@xxxxxxxx>
>Date: 06/11/2020 07:05PM
>Cc: "Tom Seewald" <tseewald@xxxxxxxxx>, linux-rdma@xxxxxxxxxxxxxxx,
>"Doug Ledford" <dledford@xxxxxxxxxx>
>Subject: [EXTERNAL] Re: Re: [PATCH next] siw: Fix pointer-to-int-cast
>warning in siw_rx_pbl()
>
>On Thu, Jun 11, 2020 at 03:06:12PM +0000, Bernard Metzler wrote:
>> >> It initially comes from the scatterlist provided by the
>> >> kernel user via drivers .map_mr_sg() method. There we get a
>> >> dma_addr_t describing the users buffer.
>> >
>> >For the SW dma maps you have to convert the dma_addr_t to a kva
>using
>> >kmap, it cannot just be casted.
>> >
>> True for a real dma addr. But here the user initially came
>> with an address it got from dma_virt_ops.dma_virt_map_page(),
>> which provides the virtual address of the page referenced,
>> casted to dma_addr_t.
>
>Oh, that's curiously broken on highmem systems, but OK siw is fine
>with it like that, though I think it would have been better to have
>some helper function connected to dma_virt do this cast.
>
>Jason
>
With that, lets take Tom's simple patch for now.

Reviewed-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>




[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