linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB/pvrdma: Remove unused function
@ 2017-08-10 21:12 Yuval Shaia
       [not found] ` <20170810211211.11135-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Yuval Shaia @ 2017-08-10 21:12 UTC (permalink / raw)
  To: aditr-pghWNbHTmq7QT0dZR+AlfA, pv-drivers-pghWNbHTmq7QT0dZR+AlfA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Yuval Shaia

The function pvrdma_idx_ring_is_valid_idx is not in used so let's remove
it.

Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h
index ed9022a91a1d..8b558ae234c8 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h
@@ -111,21 +111,4 @@ static inline __s32 pvrdma_idx_ring_has_data(const struct pvrdma_ring *r,
 	return PVRDMA_INVALID_IDX;
 }
 
-static inline bool pvrdma_idx_ring_is_valid_idx(const struct pvrdma_ring *r,
-						__u32 max_elems, __u32 *idx)
-{
-	const __u32 tail = atomic_read(&r->prod_tail);
-	const __u32 head = atomic_read(&r->cons_head);
-
-	if (pvrdma_idx_valid(tail, max_elems) &&
-	    pvrdma_idx_valid(head, max_elems) &&
-	    pvrdma_idx_valid(*idx, max_elems)) {
-		if (tail > head && (*idx < tail && *idx >= head))
-			return true;
-		else if (head > tail && (*idx >= head || *idx < tail))
-			return true;
-	}
-	return false;
-}
-
 #endif /* __PVRDMA_RING_H__ */
-- 
2.13.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] IB/pvrdma: Remove unused function
       [not found] ` <20170810211211.11135-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2017-08-18 22:23   ` Adit Ranadive
  2017-08-22 19:43   ` Doug Ledford
  1 sibling, 0 replies; 3+ messages in thread
From: Adit Ranadive @ 2017-08-18 22:23 UTC (permalink / raw)
  To: Yuval Shaia, pv-drivers,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 8/10/17, 2:12 PM, "Yuval Shaia" <yuval.shaia@oracle.com> wrote:
> The function pvrdma_idx_ring_is_valid_idx is not in used so let's remove
> it.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
>  drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h | 17 -----------------
>  1 file changed, 17 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h
> index ed9022a91a1d..8b558ae234c8 100644
> --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h
> +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_ring.h
> @@ -111,21 +111,4 @@ static inline __s32 pvrdma_idx_ring_has_data(const struct pvrdma_ring *r,
>  	return PVRDMA_INVALID_IDX;
>  }
>  
> -static inline bool pvrdma_idx_ring_is_valid_idx(const struct pvrdma_ring *r,
> -						__u32 max_elems, __u32 *idx)
> -{
> -	const __u32 tail = atomic_read(&r->prod_tail);
> -	const __u32 head = atomic_read(&r->cons_head);
> -
> -	if (pvrdma_idx_valid(tail, max_elems) &&
> -	    pvrdma_idx_valid(head, max_elems) &&
> -	    pvrdma_idx_valid(*idx, max_elems)) {
> -		if (tail > head && (*idx < tail && *idx >= head))
> -			return true;
> -		else if (head > tail && (*idx >= head || *idx < tail))
> -			return true;
> -	}
> -	return false;
> -}
> -
>  #endif /* __PVRDMA_RING_H__ */

Thanks.

Acked-by: Adit Ranadive <aditr@vmware.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] IB/pvrdma: Remove unused function
       [not found] ` <20170810211211.11135-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2017-08-18 22:23   ` Adit Ranadive
@ 2017-08-22 19:43   ` Doug Ledford
  1 sibling, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2017-08-22 19:43 UTC (permalink / raw)
  To: Yuval Shaia, aditr-pghWNbHTmq7QT0dZR+AlfA,
	pv-drivers-pghWNbHTmq7QT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Fri, 2017-08-11 at 00:12 +0300, Yuval Shaia wrote:
> The function pvrdma_idx_ring_is_valid_idx is not in used so let's
> remove
> it.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Thanks, applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-22 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-10 21:12 [PATCH] IB/pvrdma: Remove unused function Yuval Shaia
     [not found] ` <20170810211211.11135-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-08-18 22:23   ` Adit Ranadive
2017-08-22 19:43   ` Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).