From: Ioana Radulescu <ruxandra.radulescu@nxp.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, roy.pledge@nxp.com,
bogdan.purcareata@nxp.com, linux-kernel@vger.kernel.org,
laurentiu.tudor@nxp.com
Subject: [PATCH 1/4] staging: fsl-mc/dpio: Fix incorrect casts
Date: Mon, 26 Feb 2018 10:28:04 -0600 [thread overview]
Message-ID: <20180226162807.20649-2-ruxandra.radulescu@nxp.com> (raw)
In-Reply-To: <20180226162807.20649-1-ruxandra.radulescu@nxp.com>
The DPIO driver incorrectly assumes virtual addresses are always
64b long, which causes compiler errors when building for a 32b
platform.
Fix this by using explicit casts to uintptr_t where necessary.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
---
drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 4 ++--
drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
index 1acff7e..14ed2be 100644
--- a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
@@ -192,7 +192,7 @@ irqreturn_t dpaa2_io_irq(struct dpaa2_io *obj)
u64 q64;
q64 = qbman_result_SCN_ctx(dq);
- ctx = (void *)q64;
+ ctx = (void *)(uintptr_t)q64;
ctx->cb(ctx);
} else {
pr_crit("fsl-mc-dpio: Unrecognised/ignored DQRR entry\n");
@@ -237,7 +237,7 @@ int dpaa2_io_service_register(struct dpaa2_io *d,
return -ENODEV;
ctx->dpio_id = d->dpio_desc.dpio_id;
- ctx->qman64 = (u64)ctx;
+ ctx->qman64 = (u64)(uintptr_t)ctx;
ctx->dpio_private = d;
spin_lock_irqsave(&d->lock_notifications, irqflags);
list_add(&ctx->node, &d->notifications);
diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
index 376e9ed..f57c151 100644
--- a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
+++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
@@ -497,7 +497,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
int stash)
{
/* save the virtual address */
- d->rsp_addr_virt = (u64)storage;
+ d->rsp_addr_virt = (u64)(uintptr_t)storage;
if (!storage) {
d->verb &= ~(1 << QB_VDQCR_VERB_RLS_SHIFT);
@@ -590,7 +590,7 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d)
atomic_inc(&s->vdq.available);
return -EBUSY;
}
- s->vdq.storage = (void *)d->rsp_addr_virt;
+ s->vdq.storage = (void *)(uintptr_t)d->rsp_addr_virt;
p = qbman_get_cmd(s, QBMAN_CENA_SWP_VDQCR);
p->numf = d->numf;
p->tok = QMAN_DQ_TOKEN_VALID;
--
2.7.4
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2018-02-26 16:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 16:28 [PATCH 0/4] staging: fsl-mc/dpio, fsl-dpaa2/eth: Enable multi-arch compile Ioana Radulescu
2018-02-26 16:28 ` Ioana Radulescu [this message]
2018-02-26 16:28 ` [PATCH 2/4] staging: fsl-mc/dpio: allow the driver to compile multi-arch Ioana Radulescu
2018-02-28 2:55 ` [RFC PATCH] staging: fsl-mc/dpio: qbman_pull_desc_set_token() can be static kbuild test robot
2018-02-26 16:28 ` [PATCH 3/4] staging: fsl-dpaa2/eth: Fix incorrect casts Ioana Radulescu
2018-02-26 16:28 ` [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch Ioana Radulescu
2018-02-28 3:43 ` kbuild test robot
2018-03-01 16:31 ` Greg KH
2018-03-02 16:55 ` Ruxandra Ioana Ciocoi Radulescu
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=20180226162807.20649-2-ruxandra.radulescu@nxp.com \
--to=ruxandra.radulescu@nxp.com \
--cc=bogdan.purcareata@nxp.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurentiu.tudor@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roy.pledge@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®