* [PATCH] Staging: rts5208: fix check for dma mapping error @ 2016-02-09 10:35 Haneen Mohammed 2016-02-09 10:50 ` [Outreachy kernel] " Julia Lawall 0 siblings, 1 reply; 4+ messages in thread From: Haneen Mohammed @ 2016-02-09 10:35 UTC (permalink / raw) To: outreachy-kernel use dma_mapping_error() instead of comparing the returned address with zero after dma_map_single(). Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> --- drivers/staging/rts5208/rtsx_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c index f27491e..0c9549b 100644 --- a/drivers/staging/rts5208/rtsx_transport.c +++ b/drivers/staging/rts5208/rtsx_transport.c @@ -653,7 +653,7 @@ static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, return -ENXIO; addr = dma_map_single(&(rtsx->pci->dev), buf, len, dma_dir); - if (!addr) + if (dma_mapping_error(&rtsx->pci->dev, addr)) return -ENOMEM; if (card == SD_CARD) -- 1.9.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rts5208: fix check for dma mapping error 2016-02-09 10:35 [PATCH] Staging: rts5208: fix check for dma mapping error Haneen Mohammed @ 2016-02-09 10:50 ` Julia Lawall 2016-02-09 11:21 ` Haneen Mohammed 0 siblings, 1 reply; 4+ messages in thread From: Julia Lawall @ 2016-02-09 10:50 UTC (permalink / raw) To: Haneen Mohammed; +Cc: outreachy-kernel On Tue, 9 Feb 2016, Haneen Mohammed wrote: > use dma_mapping_error() instead of comparing the returned address with > zero after dma_map_single(). Acked-by: Julia Lawall <julia.lawall@lip6.fr> However, the parentheses in &(rtsx->pci->dev) are really unpleasant. Especially since they make the call to dma_map_single different from the call to dma_mapping_error. Maybe you could send a patch series to also get rid of them? julia > > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> > --- > drivers/staging/rts5208/rtsx_transport.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c > index f27491e..0c9549b 100644 > --- a/drivers/staging/rts5208/rtsx_transport.c > +++ b/drivers/staging/rts5208/rtsx_transport.c > @@ -653,7 +653,7 @@ static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, > return -ENXIO; > > addr = dma_map_single(&(rtsx->pci->dev), buf, len, dma_dir); > - if (!addr) > + if (dma_mapping_error(&rtsx->pci->dev, addr)) > return -ENOMEM; > > if (card == SD_CARD) > -- > 1.9.1 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160209103540.GA27735%40haneenVB. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rts5208: fix check for dma mapping error 2016-02-09 10:50 ` [Outreachy kernel] " Julia Lawall @ 2016-02-09 11:21 ` Haneen Mohammed 2016-02-09 12:00 ` Julia Lawall 0 siblings, 1 reply; 4+ messages in thread From: Haneen Mohammed @ 2016-02-09 11:21 UTC (permalink / raw) To: Julia Lawall, outreachy-kernel On Tue, Feb 09, 2016 at 11:50:58AM +0100, Julia Lawall wrote: > > > On Tue, 9 Feb 2016, Haneen Mohammed wrote: > > > use dma_mapping_error() instead of comparing the returned address with > > zero after dma_map_single(). > > Acked-by: Julia Lawall <julia.lawall@lip6.fr> > > However, the parentheses in &(rtsx->pci->dev) are really unpleasant. > Especially since they make the call to dma_map_single different from the > call to dma_mapping_error. > > Maybe you could send a patch series to also get rid of them? > > julia > Sure. should I send it as v2? Also, I noticed in the discussion in the previous thread about keeping the acked, yet I'm not sure how to do it. could yo advise me on that please? Thank you, Haneen > > > > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> > > --- > > drivers/staging/rts5208/rtsx_transport.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c > > index f27491e..0c9549b 100644 > > --- a/drivers/staging/rts5208/rtsx_transport.c > > +++ b/drivers/staging/rts5208/rtsx_transport.c > > @@ -653,7 +653,7 @@ static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, > > return -ENXIO; > > > > addr = dma_map_single(&(rtsx->pci->dev), buf, len, dma_dir); > > - if (!addr) > > + if (dma_mapping_error(&rtsx->pci->dev, addr)) > > return -ENOMEM; > > > > if (card == SD_CARD) > > -- > > 1.9.1 > > > > -- > > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > > To post to this group, send email to outreachy-kernel@googlegroups.com. > > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160209103540.GA27735%40haneenVB. > > For more options, visit https://groups.google.com/d/optout. > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rts5208: fix check for dma mapping error 2016-02-09 11:21 ` Haneen Mohammed @ 2016-02-09 12:00 ` Julia Lawall 0 siblings, 0 replies; 4+ messages in thread From: Julia Lawall @ 2016-02-09 12:00 UTC (permalink / raw) To: Haneen Mohammed; +Cc: outreachy-kernel On Tue, 9 Feb 2016, Haneen Mohammed wrote: > On Tue, Feb 09, 2016 at 11:50:58AM +0100, Julia Lawall wrote: > > > > > > On Tue, 9 Feb 2016, Haneen Mohammed wrote: > > > > > use dma_mapping_error() instead of comparing the returned address with > > > zero after dma_map_single(). > > > > Acked-by: Julia Lawall <julia.lawall@lip6.fr> > > > > However, the parentheses in &(rtsx->pci->dev) are really unpleasant. > > Especially since they make the call to dma_map_single different from the > > call to dma_mapping_error. > > > > Maybe you could send a patch series to also get rid of them? > > > > julia > > > Sure. should I send it as v2? Also, I noticed in the discussion in the > previous thread about keeping the acked, yet I'm not sure how to do it. > could yo advise me on that please? Yes, a v2 would be good. For the ack, just put it under your signed off by, for the specific patch that I acked. julia > > Thank you, > Haneen > > > > > > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> > > > --- > > > drivers/staging/rts5208/rtsx_transport.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c > > > index f27491e..0c9549b 100644 > > > --- a/drivers/staging/rts5208/rtsx_transport.c > > > +++ b/drivers/staging/rts5208/rtsx_transport.c > > > @@ -653,7 +653,7 @@ static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf, > > > return -ENXIO; > > > > > > addr = dma_map_single(&(rtsx->pci->dev), buf, len, dma_dir); > > > - if (!addr) > > > + if (dma_mapping_error(&rtsx->pci->dev, addr)) > > > return -ENOMEM; > > > > > > if (card == SD_CARD) > > > -- > > > 1.9.1 > > > > > > -- > > > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > > > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > > > To post to this group, send email to outreachy-kernel@googlegroups.com. > > > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160209103540.GA27735%40haneenVB. > > > For more options, visit https://groups.google.com/d/optout. > > > > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160209112101.GA27970%40haneenVB. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-09 12:00 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-09 10:35 [PATCH] Staging: rts5208: fix check for dma mapping error Haneen Mohammed 2016-02-09 10:50 ` [Outreachy kernel] " Julia Lawall 2016-02-09 11:21 ` Haneen Mohammed 2016-02-09 12:00 ` Julia Lawall
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.