Re: [PATCH] RDMA/hns: Use 64-bit arithmetic instead of 32-bit

2018-10-29 Thread Leon Romanovsky
On Thu, Oct 18, 2018 at 08:17:10PM -0400, Doug Ledford wrote: > On Thu, 2018-10-18 at 14:01 +0300, Leon Romanovsky wrote: > > On Thu, Oct 18, 2018 at 10:02:58AM +0200, Gustavo A. R. Silva wrote: > > > Cast *max_num_sg* to u64 in order to give the compiler complete > > > information about the proper

Re: [PATCH] RDMA/hns: Use 64-bit arithmetic instead of 32-bit

2018-10-22 Thread Gustavo A. R. Silva
On 10/22/18 8:15 PM, Jason Gunthorpe wrote: > On Thu, Oct 18, 2018 at 10:02:58AM +0200, Gustavo A. R. Silva wrote: >> Cast *max_num_sg* to u64 in order to give the compiler complete >> information about the proper arithmetic to use. >> >> Notice that such variable is used in a context that expec

Re: [PATCH] RDMA/hns: Use 64-bit arithmetic instead of 32-bit

2018-10-22 Thread Jason Gunthorpe
On Thu, Oct 18, 2018 at 10:02:58AM +0200, Gustavo A. R. Silva wrote: > Cast *max_num_sg* to u64 in order to give the compiler complete > information about the proper arithmetic to use. > > Notice that such variable is used in a context that expects an > expression of type u64 (64 bits, unsigned) a

Re: [PATCH] RDMA/hns: Use 64-bit arithmetic instead of 32-bit

2018-10-18 Thread Doug Ledford
On Thu, 2018-10-18 at 14:01 +0300, Leon Romanovsky wrote: > On Thu, Oct 18, 2018 at 10:02:58AM +0200, Gustavo A. R. Silva wrote: > > Cast *max_num_sg* to u64 in order to give the compiler complete > > information about the proper arithmetic to use. > > > > Notice that such variable is used in a co

Re: [PATCH] RDMA/hns: Use 64-bit arithmetic instead of 32-bit

2018-10-18 Thread Leon Romanovsky
On Thu, Oct 18, 2018 at 10:02:58AM +0200, Gustavo A. R. Silva wrote: > Cast *max_num_sg* to u64 in order to give the compiler complete > information about the proper arithmetic to use. > > Notice that such variable is used in a context that expects an > expression of type u64 (64 bits, unsigned) an

[PATCH] RDMA/hns: Use 64-bit arithmetic instead of 32-bit

2018-10-18 Thread Gustavo A. R. Silva
Cast *max_num_sg* to u64 in order to give the compiler complete information about the proper arithmetic to use. Notice that such variable is used in a context that expects an expression of type u64 (64 bits, unsigned) and the following expression is currently being evaluated using 32-bit arithmeti