diff mbox series

[v2,06/14] soc: mediatek: cmdq: return send msg error code

Message ID 1574819937-6246-8-git-send-email-dennis-yc.hsieh@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [v2,01/14] dt-binding: gce: add gce header file for mt6779 | expand

Commit Message

Dennis-YC Hsieh Nov. 27, 2019, 1:58 a.m. UTC
Return error code to client if send message fail,
so that client has chance to error handling.

Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
---
 drivers/soc/mediatek/mtk-cmdq-helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bibby Hsieh Dec. 6, 2019, 4:02 a.m. UTC | #1
On Wed, 2019-11-27 at 09:58 +0800, Dennis YC Hsieh wrote:
> Return error code to client if send message fail,
> so that client has chance to error handling.
> 
This patches seems like a fix patch.
Please add fixes, thanks.

Bibby
> Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
> ---
>  drivers/soc/mediatek/mtk-cmdq-helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index 274f6f311d05..8421b4090304 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -353,11 +353,11 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>  		spin_unlock_irqrestore(&client->lock, flags);
>  	}
>  
> -	mbox_send_message(client->chan, pkt);
> +	err = mbox_send_message(client->chan, pkt);
>  	/* We can send next packet immediately, so just call txdone. */
>  	mbox_client_txdone(client->chan, 0);
>  
> -	return 0;
> +	return err;
>  }
>  EXPORT_SYMBOL(cmdq_pkt_flush_async);
>
Dennis-YC Hsieh Dec. 18, 2019, 8 a.m. UTC | #2
Hi Bibby,

On Fri, 2019-12-06 at 12:02 +0800, Bibby Hsieh wrote:
> On Wed, 2019-11-27 at 09:58 +0800, Dennis YC Hsieh wrote:
> > Return error code to client if send message fail,
> > so that client has chance to error handling.
> > 
> This patches seems like a fix patch.
> Please add fixes, thanks.
> 
> Bibby

Do you mean add *fixes* in title?
How about *fixes flush async function return error when send fail* ?


Regards,
Dennis

> > Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
> > ---
> >  drivers/soc/mediatek/mtk-cmdq-helper.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > index 274f6f311d05..8421b4090304 100644
> > --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> > +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > @@ -353,11 +353,11 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >  		spin_unlock_irqrestore(&client->lock, flags);
> >  	}
> >  
> > -	mbox_send_message(client->chan, pkt);
> > +	err = mbox_send_message(client->chan, pkt);
> >  	/* We can send next packet immediately, so just call txdone. */
> >  	mbox_client_txdone(client->chan, 0);
> >  
> > -	return 0;
> > +	return err;
> >  }
> >  EXPORT_SYMBOL(cmdq_pkt_flush_async);
> >  
> 
>
Bibby Hsieh Dec. 18, 2019, 8:14 a.m. UTC | #3
On Wed, 2019-12-18 at 16:00 +0800, Dennis-YC Hsieh wrote:
> Hi Bibby,
> 
> On Fri, 2019-12-06 at 12:02 +0800, Bibby Hsieh wrote:
> > On Wed, 2019-11-27 at 09:58 +0800, Dennis YC Hsieh wrote:
> > > Return error code to client if send message fail,
> > > so that client has chance to error handling.
> > > 
> > This patches seems like a fix patch.
> > Please add fixes, thanks.
> > 
> > Bibby
> 
> Do you mean add *fixes* in title?
> How about *fixes flush async function return error when send fail* ?
> 
> 
Hi, Dennis,

Please refer to
https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
and find "fixes". 

Thanks :D

Bibby
> Regards,
> Dennis
> 
> > > Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
> > > ---
> > >  drivers/soc/mediatek/mtk-cmdq-helper.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > > index 274f6f311d05..8421b4090304 100644
> > > --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> > > +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > > @@ -353,11 +353,11 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> > >  		spin_unlock_irqrestore(&client->lock, flags);
> > >  	}
> > >  
> > > -	mbox_send_message(client->chan, pkt);
> > > +	err = mbox_send_message(client->chan, pkt);
> > >  	/* We can send next packet immediately, so just call txdone. */
> > >  	mbox_client_txdone(client->chan, 0);
> > >  
> > > -	return 0;
> > > +	return err;
> > >  }
> > >  EXPORT_SYMBOL(cmdq_pkt_flush_async);
> > >  
> > 
> > 
> 
>
diff mbox series

Patch

diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
index 274f6f311d05..8421b4090304 100644
--- a/drivers/soc/mediatek/mtk-cmdq-helper.c
+++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
@@ -353,11 +353,11 @@  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 		spin_unlock_irqrestore(&client->lock, flags);
 	}
 
-	mbox_send_message(client->chan, pkt);
+	err = mbox_send_message(client->chan, pkt);
 	/* We can send next packet immediately, so just call txdone. */
 	mbox_client_txdone(client->chan, 0);
 
-	return 0;
+	return err;
 }
 EXPORT_SYMBOL(cmdq_pkt_flush_async);