linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <hannah@marvell.com>
To: <dan.j.williams@intel.com>, <vkoul@kernel.org>,
	<dmaengine@vger.kernel.org>
Cc: <thomas.petazzoni@bootlin.com>, <linux-kernel@vger.kernel.org>,
	<nadavh@marvell.com>, <omrii@marvell.com>, <oferh@marvell.com>,
	<gregory.clement@bootlin.com>, Hanna Hawa <hannah@marvell.com>
Subject: [PATCH 1/1] dmaengine: mv_xor_v2: use {lower,upper}_32_bits to configure HW descriptor address
Date: Tue, 24 Jul 2018 16:40:30 +0300	[thread overview]
Message-ID: <1532439630-23555-1-git-send-email-hannah@marvell.com> (raw)

From: Hanna Hawa <hannah@marvell.com>

>> drivers/dma/mv_xor_v2.c:647:36: sparse: constant 0xFFFF00000000 is so big it is long
   include/linux/device.h:678:13: sparse: undefined identifier '__builtin_mul_overflow'
   include/linux/device.h:678:13: sparse: call with no type!

Use lower_32_bits and upper_32_bits to set the hw_desq address, instead of
using constant.

Signed-off-by: Hanna Hawa <hannah@marvell.com>
---
 drivers/dma/mv_xor_v2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index d41d916..8dc0aa4 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -642,9 +642,9 @@ static int mv_xor_v2_descq_init(struct mv_xor_v2_device *xor_dev)
 	       xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_SIZE_OFF);
 
 	/* write the DESQ address to the DMA enngine*/
-	writel(xor_dev->hw_desq & 0xFFFFFFFF,
+	writel(lower_32_bits(xor_dev->hw_desq),
 	       xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_BALR_OFF);
-	writel((xor_dev->hw_desq & 0xFFFF00000000) >> 32,
+	writel(upper_32_bits(xor_dev->hw_desq),
 	       xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_BAHR_OFF);
 
 	/*
-- 
1.9.1


             reply	other threads:[~2018-07-24 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 13:40 hannah [this message]
2018-07-25 12:17 ` [PATCH 1/1] dmaengine: mv_xor_v2: use {lower,upper}_32_bits to configure HW descriptor address Vinod

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=1532439630-23555-1-git-send-email-hannah@marvell.com \
    --to=hannah@marvell.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nadavh@marvell.com \
    --cc=oferh@marvell.com \
    --cc=omrii@marvell.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vkoul@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).