All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] bus: mhi: ep: remove useless judgement in mhi_ep_ring_add_element
@ 2022-03-17  3:31 Yu Liao
  2022-03-17  3:52 ` Yu Liao
  0 siblings, 1 reply; 3+ messages in thread
From: Yu Liao @ 2022-03-17  3:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: manivannan.sadhasivam, liwei391, liaoyu15

Remove the check of 'ret' that is impossible to be non-zero.

Signed-off-by: Yu Liao <liaoyu15@huawei.com>
---
 drivers/bus/mhi/ep/ring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/bus/mhi/ep/ring.c b/drivers/bus/mhi/ep/ring.c
index ac2043e71943..161505cd628f 100644
--- a/drivers/bus/mhi/ep/ring.c
+++ b/drivers/bus/mhi/ep/ring.c
@@ -131,8 +131,6 @@ int mhi_ep_ring_add_element(struct mhi_ep_ring *ring, struct mhi_ring_element *e
 
 	mhi_cntrl->write_to_host(mhi_cntrl, (void __iomem *)el, ring->rbase + (old_offset *
 				 sizeof(*el)), sizeof(*el));
-	if (ret < 0)
-		return ret;
 
 	return 0;
 }
-- 
2.25.1


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

* Re: [PATCH -next] bus: mhi: ep: remove useless judgement in mhi_ep_ring_add_element
  2022-03-17  3:31 [PATCH -next] bus: mhi: ep: remove useless judgement in mhi_ep_ring_add_element Yu Liao
@ 2022-03-17  3:52 ` Yu Liao
  2022-03-17  4:48   ` Manivannan Sadhasivam
  0 siblings, 1 reply; 3+ messages in thread
From: Yu Liao @ 2022-03-17  3:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: manivannan.sadhasivam, liwei391

Hi Manivannan, I found that 'ret = ' has been removed. If this is intentional,
the check of 'ret' is redundant.

Thanks,

Yu
On 2022/3/17 11:31, Yu Liao wrote:
> Remove the check of 'ret' that is impossible to be non-zero.
> 
> Signed-off-by: Yu Liao <liaoyu15@huawei.com>
> ---
>  drivers/bus/mhi/ep/ring.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/bus/mhi/ep/ring.c b/drivers/bus/mhi/ep/ring.c
> index ac2043e71943..161505cd628f 100644
> --- a/drivers/bus/mhi/ep/ring.c
> +++ b/drivers/bus/mhi/ep/ring.c
> @@ -131,8 +131,6 @@ int mhi_ep_ring_add_element(struct mhi_ep_ring *ring, struct mhi_ring_element *e
>  
>  	mhi_cntrl->write_to_host(mhi_cntrl, (void __iomem *)el, ring->rbase + (old_offset *
>  				 sizeof(*el)), sizeof(*el));
> -	if (ret < 0)
> -		return ret;
>  
>  	return 0;
>  }

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

* Re: [PATCH -next] bus: mhi: ep: remove useless judgement in mhi_ep_ring_add_element
  2022-03-17  3:52 ` Yu Liao
@ 2022-03-17  4:48   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2022-03-17  4:48 UTC (permalink / raw)
  To: Yu Liao; +Cc: linux-kernel, liwei391

Hi,

On Thu, Mar 17, 2022 at 11:52:32AM +0800, Yu Liao wrote:
> Hi Manivannan, I found that 'ret = ' has been removed. If this is intentional,
> the check of 'ret' is redundant.
>

That's not intentional, thanks for finding it out. I've updated the patch.
Since the patches are under development, I've squashed the change with the
initial patch.

Thanks,
Mani
 
> Thanks,
> 
> Yu
> On 2022/3/17 11:31, Yu Liao wrote:
> > Remove the check of 'ret' that is impossible to be non-zero.
> > 
> > Signed-off-by: Yu Liao <liaoyu15@huawei.com>
> > ---
> >  drivers/bus/mhi/ep/ring.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/bus/mhi/ep/ring.c b/drivers/bus/mhi/ep/ring.c
> > index ac2043e71943..161505cd628f 100644
> > --- a/drivers/bus/mhi/ep/ring.c
> > +++ b/drivers/bus/mhi/ep/ring.c
> > @@ -131,8 +131,6 @@ int mhi_ep_ring_add_element(struct mhi_ep_ring *ring, struct mhi_ring_element *e
> >  
> >  	mhi_cntrl->write_to_host(mhi_cntrl, (void __iomem *)el, ring->rbase + (old_offset *
> >  				 sizeof(*el)), sizeof(*el));
> > -	if (ret < 0)
> > -		return ret;
> >  
> >  	return 0;
> >  }

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

end of thread, other threads:[~2022-03-17  5:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17  3:31 [PATCH -next] bus: mhi: ep: remove useless judgement in mhi_ep_ring_add_element Yu Liao
2022-03-17  3:52 ` Yu Liao
2022-03-17  4:48   ` Manivannan Sadhasivam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.