All of lore.kernel.org
 help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: <linux@arm.linux.org.uk>, <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <arnd@arndb.de>,
	<will.deacon@arm.com>, <grant.likely@linaro.org>,
	<robh+dt@kernel.org>, <devicetree@vger.kernel.org>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Subject: [PATCH] dma-mapping: fix size when of_dma_get_range() fails
Date: Wed, 24 Dec 2014 16:56:50 -0500	[thread overview]
Message-ID: <1419458210-4079-1-git-send-email-m-karicheri2@ti.com> (raw)

When call to of_dma_get_range() fails, the code currently set size
to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
to make the code consistent with the case when size is obtained from
dma-range property.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/of/platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index a54ec10..af9aef1 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
 	ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
 	if (ret < 0) {
 		dma_addr = offset = 0;
-		size = dev->coherent_dma_mask;
+		size = dev->coherent_dma_mask + 1;
 	} else {
 		offset = PFN_DOWN(paddr - dma_addr);
 		dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: Murali Karicheri <m-karicheri2@ti.com>
To: linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, arnd@arndb.de, will.deacon@arm.com,
	grant.likely@linaro.org, robh+dt@kernel.org,
	devicetree@vger.kernel.org
Cc: Murali Karicheri <m-karicheri2@ti.com>
Subject: [PATCH] dma-mapping: fix size when of_dma_get_range() fails
Date: Wed, 24 Dec 2014 16:56:50 -0500	[thread overview]
Message-ID: <1419458210-4079-1-git-send-email-m-karicheri2@ti.com> (raw)

When call to of_dma_get_range() fails, the code currently set size
to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
to make the code consistent with the case when size is obtained from
dma-range property.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/of/platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index a54ec10..af9aef1 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
 	ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
 	if (ret < 0) {
 		dma_addr = offset = 0;
-		size = dev->coherent_dma_mask;
+		size = dev->coherent_dma_mask + 1;
 	} else {
 		offset = PFN_DOWN(paddr - dma_addr);
 		dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
-- 
1.7.9.5

WARNING: multiple messages have this Message-ID (diff)
From: m-karicheri2@ti.com (Murali Karicheri)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dma-mapping: fix size when of_dma_get_range() fails
Date: Wed, 24 Dec 2014 16:56:50 -0500	[thread overview]
Message-ID: <1419458210-4079-1-git-send-email-m-karicheri2@ti.com> (raw)

When call to of_dma_get_range() fails, the code currently set size
to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
to make the code consistent with the case when size is obtained from
dma-range property.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/of/platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index a54ec10..af9aef1 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
 	ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
 	if (ret < 0) {
 		dma_addr = offset = 0;
-		size = dev->coherent_dma_mask;
+		size = dev->coherent_dma_mask + 1;
 	} else {
 		offset = PFN_DOWN(paddr - dma_addr);
 		dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
-- 
1.7.9.5

             reply	other threads:[~2014-12-24 21:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24 21:56 Murali Karicheri [this message]
2014-12-24 21:56 ` [PATCH] dma-mapping: fix size when of_dma_get_range() fails Murali Karicheri
2014-12-24 21:56 ` Murali Karicheri
2015-03-19 19:25 ` Grant Likely
2015-03-19 19:25   ` Grant Likely
2015-03-19 19:25   ` Grant Likely
2015-03-20 11:54   ` Grant Likely
2015-03-20 11:54     ` Grant Likely
2015-03-20 11:54     ` Grant Likely

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=1419458210-4079-1-git-send-email-m-karicheri2@ti.com \
    --to=m-karicheri2@ti.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=robh+dt@kernel.org \
    --cc=will.deacon@arm.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: link
Be 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.