Re: [PATCH rdma-next] RDMA/umem: Silence build warning on i386 architecture

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

 



On Wed, Jan 06, 2021 at 02:20:47PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
> 
> Sacrifice one page in order to silence compilation failure on i386
> architecture.
> 
> drivers/infiniband/core/umem.c:205 __ib_umem_get() warn: impossible
> 			condition '(npages > (~0)) => (0-u32max > u32max)'

I think I prefer to just leave this warning on 32 bit builds.. 32 bit
inherently can't have this overflow so yes the condition should be
impossible

Using >= is just confusing

If you really want to fix it then npages and every place that touches
it should be made size_t or unsigned long.

This includes __sg_alloc_table_from_pages, which doesn't look so bad
actually..

Jason



[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