From: Shaun Ren <shaun.ren@linux.com> To: gregkh@linuxfoundation.org, rjui@broadcom.com Cc: sbranden@broadcom.com, jonmason@broadcom.com, mahfouz.saif.elyazal@gmail.com, joe@perches.com, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, Shaun Ren <shaun.ren@linux.com> Subject: [PATCH v2 9/9] Staging: rts5208: Add missing dma_mapping_error Date: Mon, 8 Feb 2016 17:31:25 -0800 [thread overview] Message-ID: <1454981485-15686-10-git-send-email-shaun.ren@linux.com> (raw) In-Reply-To: <1454981485-15686-1-git-send-email-shaun.ren@linux.com> This patch adds a dma_mapping_error call to debug potential DMA mapping errors after the dma_map_single call in rtsx_transport.c. Signed-off-by: Shaun Ren <shaun.ren@linux.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 c0fd8c5..00da7ab 100644 --- a/drivers/staging/rts5208/rtsx_transport.c +++ b/drivers/staging/rts5208/rtsx_transport.c @@ -664,7 +664,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) -- 2.7.0
WARNING: multiple messages have this Message-ID (diff)
From: shaun.ren@linux.com (Shaun Ren) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 9/9] Staging: rts5208: Add missing dma_mapping_error Date: Mon, 8 Feb 2016 17:31:25 -0800 [thread overview] Message-ID: <1454981485-15686-10-git-send-email-shaun.ren@linux.com> (raw) In-Reply-To: <1454981485-15686-1-git-send-email-shaun.ren@linux.com> This patch adds a dma_mapping_error call to debug potential DMA mapping errors after the dma_map_single call in rtsx_transport.c. Signed-off-by: Shaun Ren <shaun.ren@linux.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 c0fd8c5..00da7ab 100644 --- a/drivers/staging/rts5208/rtsx_transport.c +++ b/drivers/staging/rts5208/rtsx_transport.c @@ -664,7 +664,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) -- 2.7.0
next prev parent reply other threads:[~2016-02-09 1:32 UTC|newest] Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-01-26 2:27 [PATCH 0/2] Staging: rts5208: Coding style and dma mapping fixes Shaun Ren 2016-01-26 2:27 ` Shaun Ren 2016-01-26 2:27 ` [PATCH 1/2] Staging: rts5208: Cleanup rtsx_transport.c Shaun Ren 2016-01-26 2:27 ` Shaun Ren 2016-02-08 4:03 ` Greg KH 2016-02-08 4:03 ` Greg KH 2016-01-26 2:27 ` [PATCH 2/2] Staging: rts5208: Add missing dma_mapping_error Shaun Ren 2016-01-26 2:27 ` Shaun Ren 2016-02-08 4:03 ` Greg KH 2016-02-08 4:03 ` Greg KH 2016-02-09 1:31 ` [PATCH v2 0/9] Staging: rts5208: Coding style and dma mapping fixes Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-09 1:31 ` [PATCH v2 1/9] Staging: rts5208: rtsx_transport.c: Fix comment style warnings Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-09 3:05 ` Joshua Clayton 2016-02-09 3:05 ` Joshua Clayton 2016-02-09 1:31 ` [PATCH v2 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-10 5:21 ` Sudip Mukherjee 2016-02-10 5:21 ` Sudip Mukherjee 2016-02-09 1:31 ` [PATCH v2 3/9] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-09 1:31 ` [PATCH v2 4/9] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-09 1:31 ` [PATCH v2 5/9] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-09 1:31 ` [PATCH v2 6/9] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-09 1:31 ` [PATCH v2 7/9] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-10 5:26 ` Sudip Mukherjee 2016-02-10 5:26 ` Sudip Mukherjee 2016-02-10 18:38 ` Shaun Ren 2016-02-10 18:38 ` Shaun Ren 2016-02-09 1:31 ` [PATCH v2 8/9] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren 2016-02-09 1:31 ` Shaun Ren 2016-02-09 1:31 ` Shaun Ren [this message] 2016-02-09 1:31 ` [PATCH v2 9/9] Staging: rts5208: Add missing dma_mapping_error Shaun Ren 2016-02-10 2:45 ` [PATCH v3 0/9] Staging: rts5208: Coding style and dma mapping fixes Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 2:45 ` [PATCH v3 1/9] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 3:06 ` Joshua Clayton 2016-02-10 3:06 ` Joshua Clayton 2016-02-10 2:45 ` [PATCH v3 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 2:58 ` Joe Perches 2016-02-10 2:58 ` Joe Perches 2016-02-10 2:45 ` [PATCH v3 3/9] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 2:45 ` [PATCH v3 4/9] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 2:45 ` [PATCH v3 5/9] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 2:45 ` [PATCH v3 6/9] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 2:45 ` [PATCH v3 7/9] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 2:45 ` [PATCH v3 8/9] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-10 2:45 ` [PATCH v3 9/9] Staging: rts5208: Add missing dma_mapping_error Shaun Ren 2016-02-10 2:45 ` Shaun Ren 2016-02-12 4:07 ` [PATCH v4 0/8] Staging: rts5208: Fix coding style Shaun Ren 2016-02-12 4:07 ` Shaun Ren 2016-02-12 4:07 ` [PATCH v4 1/8] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren 2016-02-12 4:07 ` Shaun Ren 2016-02-12 4:07 ` [PATCH v4 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren 2016-02-12 4:07 ` Shaun Ren 2016-02-12 4:32 ` Joe Perches 2016-02-12 4:32 ` Joe Perches 2016-02-12 6:56 ` [PATCH v5 " Shaun Ren 2016-02-12 6:56 ` Shaun Ren 2016-02-15 0:41 ` Greg KH 2016-02-15 0:41 ` Greg KH 2016-02-12 4:38 ` [PATCH v4 " kbuild test robot 2016-02-12 4:38 ` kbuild test robot 2016-02-12 4:07 ` [PATCH v4 3/8] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren 2016-02-12 4:07 ` Shaun Ren 2016-02-12 4:07 ` [PATCH v4 4/8] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren 2016-02-12 4:07 ` Shaun Ren 2016-02-12 4:07 ` [PATCH v4 5/8] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren 2016-02-12 4:07 ` Shaun Ren 2016-02-12 4:07 ` [PATCH v4 6/8] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren 2016-02-12 4:07 ` Shaun Ren 2016-02-12 4:07 ` [PATCH v4 7/8] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren 2016-02-12 4:07 ` Shaun Ren 2016-02-12 4:08 ` [PATCH v4 8/8] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren 2016-02-12 4:08 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 0/8] Staging: rts5208: Fix coding style Shaun Ren 2016-02-15 18:58 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 1/8] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren 2016-02-15 18:58 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren 2016-02-15 18:58 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 3/8] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren 2016-02-15 18:58 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 4/8] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren 2016-02-15 18:58 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 5/8] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren 2016-02-15 18:58 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 6/8] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren 2016-02-15 18:58 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 7/8] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren 2016-02-15 18:58 ` Shaun Ren 2016-02-15 18:58 ` [PATCH v5 RESEND 8/8] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren 2016-02-15 18:58 ` Shaun Ren
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1454981485-15686-10-git-send-email-shaun.ren@linux.com \ --to=shaun.ren@linux.com \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=joe@perches.com \ --cc=jonmason@broadcom.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mahfouz.saif.elyazal@gmail.com \ --cc=rjui@broadcom.com \ --cc=sbranden@broadcom.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.