Message ID | 20170810211211.11135-1-yuval.shaia@oracle.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
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>
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@oracle.com> Thanks, applied.
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__ */
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(-)