diff mbox series

RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz()

Message ID 0-v1-982a13cc5c6d+501ae-fix_best_pgsz_stub_jgg@nvidia.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz() | expand

Commit Message

Jason Gunthorpe Aug. 25, 2020, 6:17 p.m. UTC
The original function returns unsigned long and 0 on failure.

Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
---
 include/rdma/ib_umem.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Gal Pressman Aug. 26, 2020, 6:15 a.m. UTC | #1
On 25/08/2020 21:17, Jason Gunthorpe wrote:
> The original function returns unsigned long and 0 on failure.
> 
> Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR")
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>  include/rdma/ib_umem.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h
> index 71f573a418bf06..07a764eb692eed 100644
> --- a/include/rdma/ib_umem.h
> +++ b/include/rdma/ib_umem.h
> @@ -68,10 +68,11 @@ static inline int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offs
>  		      		    size_t length) {
>  	return -EINVAL;
>  }
> -static inline int ib_umem_find_best_pgsz(struct ib_umem *umem,
> -					 unsigned long pgsz_bitmap,
> -					 unsigned long virt) {
> -	return -EINVAL;
> +static inline unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
> +						   unsigned long pgsz_bitmap,
> +						   unsigned long virt)
> +{
> +	return 0;
>  }
>  
>  #endif /* CONFIG_INFINIBAND_USER_MEM */
> 

Reviewed-by: Gal Pressman <galpress@amazon.com>
Shiraz Saleem Aug. 30, 2020, 11:32 p.m. UTC | #2
> Subject: [PATCH] RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz()
> 
> The original function returns unsigned long and 0 on failure.
> 
> Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page
> size in an MR")
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>  include/rdma/ib_umem.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index
> 71f573a418bf06..07a764eb692eed 100644
> --- a/include/rdma/ib_umem.h
> +++ b/include/rdma/ib_umem.h
> @@ -68,10 +68,11 @@ static inline int ib_umem_copy_from(void *dst, struct
> ib_umem *umem, size_t offs
>  		      		    size_t length) {
>  	return -EINVAL;
>  }
> -static inline int ib_umem_find_best_pgsz(struct ib_umem *umem,
> -					 unsigned long pgsz_bitmap,
> -					 unsigned long virt) {
> -	return -EINVAL;
> +static inline unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
> +						   unsigned long pgsz_bitmap,
> +						   unsigned long virt)
> +{
> +	return 0;
>  }
> 
>  #endif /* CONFIG_INFINIBAND_USER_MEM */

Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Jason Gunthorpe Aug. 31, 2020, 3:26 p.m. UTC | #3
On Tue, Aug 25, 2020 at 03:17:08PM -0300, Jason Gunthorpe wrote:
> The original function returns unsigned long and 0 on failure.
> 
> Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR")
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> Reviewed-by: Gal Pressman <galpress@amazon.com>
> Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
> ---
>  include/rdma/ib_umem.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Applied to for-next

Jason
diff mbox series

Patch

diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h
index 71f573a418bf06..07a764eb692eed 100644
--- a/include/rdma/ib_umem.h
+++ b/include/rdma/ib_umem.h
@@ -68,10 +68,11 @@  static inline int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offs
 		      		    size_t length) {
 	return -EINVAL;
 }
-static inline int ib_umem_find_best_pgsz(struct ib_umem *umem,
-					 unsigned long pgsz_bitmap,
-					 unsigned long virt) {
-	return -EINVAL;
+static inline unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
+						   unsigned long pgsz_bitmap,
+						   unsigned long virt)
+{
+	return 0;
 }
 
 #endif /* CONFIG_INFINIBAND_USER_MEM */