On 12/09/2015 01:42 PM, Nelson Escobar wrote:
> Signed-off-by: Dave Goodell
> Reviewed-by: Reese Faucette
> Reviewed-by: Xuyang Wang
> Signed-off-by: Nelson Escobar
> ---
> drivers/infiniband/hw/usnic/usnic_vnic.c
> Thanks for looking at the code. I am still not understanding your point.
>> Old code:
>> usnic_vnic_res_free_cnt(vnic, type) == 0 and cnt == 1 will return EINVAL
> Yes:
> if (0 < 1 || 1 < 1 || !owner)
> return -EINVAL;
>> New code
>> snic_vnic_res_free_cnt(vnic, type) ==
On 12/9/2015 10:47 PM, Leon Romanovsky wrote:
> On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote:
>> -if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 1 || !owner)
>> +if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 0 || !owner)
> Before this change you returned
On Thu, Dec 10, 2015 at 11:22:24AM -0800, Nelson Escobar wrote:
> On 12/9/2015 10:47 PM, Leon Romanovsky wrote:
> > On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote:
> >> - if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 1 || !owner)
> >> + if (usnic_vnic_res_free_cnt(vnic,
On 12/10/2015 11:47 AM, l...@leon.nu wrote:
> On Thu, Dec 10, 2015 at 11:22:24AM -0800, Nelson Escobar wrote:
>> On 12/9/2015 10:47 PM, Leon Romanovsky wrote:
>>> On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote:
- if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 1 ||
Signed-off-by: Dave Goodell
Reviewed-by: Reese Faucette
Reviewed-by: Xuyang Wang
Signed-off-by: Nelson Escobar
---
drivers/infiniband/hw/usnic/usnic_vnic.c | 54 +---
1 file changed, 29
On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote:
> - if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 1 || !owner)
> + if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 0 || !owner)
Before this change you returned EINVAL if no free_cnt were available,
now you will