public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] misc/fastrpc: add checked value for dma_set_mask
@ 2019-03-19  2:05 Bo YU
  2019-03-21  9:31 ` Bo YU
  2019-03-27 17:10 ` Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Bo YU @ 2019-03-19  2:05 UTC (permalink / raw)
  To: arnd, gregkh, linux-kernel, yuzibode; +Cc: Bo YU

There be should check return value from dma_set_mask to throw some infos
if fail to set dma mask.

Detected by CoverityScan, CID# 1443983:  Error handling issues (CHECKED_RETURN)

Fixes:f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)
Signed-off-by: Bo YU <tsu.yubo@gmail.com>
---
 drivers/misc/fastrpc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 39f832d27288..36d0d5c9cfba 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
 	struct fastrpc_session_ctx *sess;
 	struct device *dev = &pdev->dev;
 	int i, sessions = 0;
+	int rc;
 
 	cctx = dev_get_drvdata(dev->parent);
 	if (!cctx)
@@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
 	}
 	cctx->sesscount++;
 	spin_unlock(&cctx->lock);
-	dma_set_mask(dev, DMA_BIT_MASK(32));
+	rc = dma_set_mask(dev, DMA_BIT_MASK(32));
+	if (rc) {
+		dev_err(dev, "32-bit DMA enable failed\n");
+		return rc;
+	}
 
 	return 0;
 }
-- 
2.11.0


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

* Re: [PATCH] misc/fastrpc: add checked value for dma_set_mask
  2019-03-19  2:05 [PATCH] misc/fastrpc: add checked value for dma_set_mask Bo YU
@ 2019-03-21  9:31 ` Bo YU
  2019-03-21  9:56   ` Kroah-Hartman
  2019-03-27 17:10 ` Greg KH
  1 sibling, 1 reply; 6+ messages in thread
From: Bo YU @ 2019-03-21  9:31 UTC (permalink / raw)
  To: Arnd Bergmann, Kroah-Hartman, open list, 于波

On Tue, Mar 19, 2019 at 10:05 AM Bo YU <tsu.yubo@gmail.com> wrote:
>
> There be should check return value from dma_set_mask to throw some infos
> if fail to set dma mask.
>
> Detected by CoverityScan, CID# 1443983:  Error handling issues (CHECKED_RETURN)
>
> Fixes:f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)
> Signed-off-by: Bo YU <tsu.yubo@gmail.com>
> ---
>  drivers/misc/fastrpc.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index 39f832d27288..36d0d5c9cfba 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
>         struct fastrpc_session_ctx *sess;
>         struct device *dev = &pdev->dev;
>         int i, sessions = 0;
> +       int rc;
>
>         cctx = dev_get_drvdata(dev->parent);
>         if (!cctx)
> @@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
>         }
>         cctx->sesscount++;
>         spin_unlock(&cctx->lock);
> -       dma_set_mask(dev, DMA_BIT_MASK(32));
> +       rc = dma_set_mask(dev, DMA_BIT_MASK(32));
> +       if (rc) {
> +               dev_err(dev, "32-bit DMA enable failed\n");
> +               return rc;
> +       }
>
Ping?
Do me need resend it?
>         return 0;
>  }
> --
> 2.11.0
>

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

* Re: [PATCH] misc/fastrpc: add checked value for dma_set_mask
  2019-03-21  9:31 ` Bo YU
@ 2019-03-21  9:56   ` Kroah-Hartman
  2019-03-21 10:51     ` Bo YU
  0 siblings, 1 reply; 6+ messages in thread
From: Kroah-Hartman @ 2019-03-21  9:56 UTC (permalink / raw)
  To: Bo YU; +Cc: Arnd Bergmann, open list, 于波

On Thu, Mar 21, 2019 at 05:31:51PM +0800, Bo YU wrote:
> On Tue, Mar 19, 2019 at 10:05 AM Bo YU <tsu.yubo@gmail.com> wrote:
> >
> > There be should check return value from dma_set_mask to throw some infos
> > if fail to set dma mask.
> >
> > Detected by CoverityScan, CID# 1443983:  Error handling issues (CHECKED_RETURN)
> >
> > Fixes:f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)
> > Signed-off-by: Bo YU <tsu.yubo@gmail.com>
> > ---
> >  drivers/misc/fastrpc.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> > index 39f832d27288..36d0d5c9cfba 100644
> > --- a/drivers/misc/fastrpc.c
> > +++ b/drivers/misc/fastrpc.c
> > @@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
> >         struct fastrpc_session_ctx *sess;
> >         struct device *dev = &pdev->dev;
> >         int i, sessions = 0;
> > +       int rc;
> >
> >         cctx = dev_get_drvdata(dev->parent);
> >         if (!cctx)
> > @@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
> >         }
> >         cctx->sesscount++;
> >         spin_unlock(&cctx->lock);
> > -       dma_set_mask(dev, DMA_BIT_MASK(32));
> > +       rc = dma_set_mask(dev, DMA_BIT_MASK(32));
> > +       if (rc) {
> > +               dev_err(dev, "32-bit DMA enable failed\n");
> > +               return rc;
> > +       }
> >
> Ping?
> Do me need resend it?

2 days?  Please give us time to catch up on patches, right after the
merge window closed.  This isn't a big deal, we have much higher
priority patches to review.  It will be gotten to eventually :)

thanks,

greg k-h

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

* Re: [PATCH] misc/fastrpc: add checked value for dma_set_mask
  2019-03-21  9:56   ` Kroah-Hartman
@ 2019-03-21 10:51     ` Bo YU
  0 siblings, 0 replies; 6+ messages in thread
From: Bo YU @ 2019-03-21 10:51 UTC (permalink / raw)
  To: Kroah-Hartman; +Cc: Arnd Bergmann, open list, 于波

On Thu, Mar 21, 2019 at 5:56 PM Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Thu, Mar 21, 2019 at 05:31:51PM +0800, Bo YU wrote:
> > On Tue, Mar 19, 2019 at 10:05 AM Bo YU <tsu.yubo@gmail.com> wrote:
> > >
> > > There be should check return value from dma_set_mask to throw some infos
> > > if fail to set dma mask.
> > >
> > > Detected by CoverityScan, CID# 1443983:  Error handling issues (CHECKED_RETURN)
> > >
> > > Fixes:f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)
> > > Signed-off-by: Bo YU <tsu.yubo@gmail.com>
> > > ---
> > >  drivers/misc/fastrpc.c | 7 ++++++-
> > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> > > index 39f832d27288..36d0d5c9cfba 100644
> > > --- a/drivers/misc/fastrpc.c
> > > +++ b/drivers/misc/fastrpc.c
> > > @@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
> > >         struct fastrpc_session_ctx *sess;
> > >         struct device *dev = &pdev->dev;
> > >         int i, sessions = 0;
> > > +       int rc;
> > >
> > >         cctx = dev_get_drvdata(dev->parent);
> > >         if (!cctx)
> > > @@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
> > >         }
> > >         cctx->sesscount++;
> > >         spin_unlock(&cctx->lock);
> > > -       dma_set_mask(dev, DMA_BIT_MASK(32));
> > > +       rc = dma_set_mask(dev, DMA_BIT_MASK(32));
> > > +       if (rc) {
> > > +               dev_err(dev, "32-bit DMA enable failed\n");
> > > +               return rc;
> > > +       }
> > >
> > Ping?
> > Do me need resend it?
>
> 2 days?  Please give us time to catch up on patches, right after the
> merge window closed.  This isn't a big deal, we have much higher
> priority patches to review.  It will be gotten to eventually :)
Ok, thank you. I am not sure the trival patch is ok so disturb you :)
>
> thanks,
>
> greg k-h

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

* Re: [PATCH] misc/fastrpc: add checked value for dma_set_mask
  2019-03-19  2:05 [PATCH] misc/fastrpc: add checked value for dma_set_mask Bo YU
  2019-03-21  9:31 ` Bo YU
@ 2019-03-27 17:10 ` Greg KH
  2019-03-28  1:06   ` Bo YU
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2019-03-27 17:10 UTC (permalink / raw)
  To: Bo YU; +Cc: arnd, linux-kernel, yuzibode

On Mon, Mar 18, 2019 at 10:05:19PM -0400, Bo YU wrote:
> There be should check return value from dma_set_mask to throw some infos
> if fail to set dma mask.
> 
> Detected by CoverityScan, CID# 1443983:  Error handling issues (CHECKED_RETURN)
> 
> Fixes:f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)
> Signed-off-by: Bo YU <tsu.yubo@gmail.com>
> ---
>  drivers/misc/fastrpc.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

This patch no longer applies to my tree due to other fastrpc fixes being
sent before your patch :(

Please rebase and resend.

thanks,
greg k-h

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

* Re: [PATCH] misc/fastrpc: add checked value for dma_set_mask
  2019-03-27 17:10 ` Greg KH
@ 2019-03-28  1:06   ` Bo YU
  0 siblings, 0 replies; 6+ messages in thread
From: Bo YU @ 2019-03-28  1:06 UTC (permalink / raw)
  To: Greg KH; +Cc: Arnd Bergmann, open list, 于波

On Thu, Mar 28, 2019 at 2:29 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, Mar 18, 2019 at 10:05:19PM -0400, Bo YU wrote:
> > There be should check return value from dma_set_mask to throw some infos
> > if fail to set dma mask.
> >
> > Detected by CoverityScan, CID# 1443983:  Error handling issues (CHECKED_RETURN)
> >
> > Fixes:f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)
> > Signed-off-by: Bo YU <tsu.yubo@gmail.com>
> > ---
> >  drivers/misc/fastrpc.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
>
> This patch no longer applies to my tree due to other fastrpc fixes being
> sent before your patch :(
>
> Please rebase and resend.
Ok, will do.
Thank you.
>
> thanks,
> greg k-h

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

end of thread, other threads:[~2019-03-28  1:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-19  2:05 [PATCH] misc/fastrpc: add checked value for dma_set_mask Bo YU
2019-03-21  9:31 ` Bo YU
2019-03-21  9:56   ` Kroah-Hartman
2019-03-21 10:51     ` Bo YU
2019-03-27 17:10 ` Greg KH
2019-03-28  1:06   ` Bo YU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox