From: Dan Carpenter <dan.carpenter@oracle.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Martyn Welch <martyn@welchs.me.uk>,
Manohar Vanga <manohar.vanga@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vme: fake: fix build for 64-bit dma_addr_t
Date: Tue, 6 Sep 2016 22:39:25 +0300 [thread overview]
Message-ID: <20160906193925.GC4218@mwanda> (raw)
In-Reply-To: <20160906130013.1616803-1-arnd@arndb.de>
On Tue, Sep 06, 2016 at 02:59:41PM +0200, Arnd Bergmann wrote:
> casting between dma_addr_t and a pointer is generally tricky,
> as they might not be the same size and almost never point into
> the same address space. With 32-bit ARM systems and LPAE, we
> get this warning for the vme_fake driver that stores a pointer
> in a dma_addr_t variable:
>
> drivers/vme/bridges/vme_fake.c: In function 'fake_slave_set':
> drivers/vme/bridges/vme_fake.c:204:29: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
>
> To make this clearer while fixing the warning, I'm adding
> a set of helper functions for the type conversion.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/vme/bridges/vme_fake.c | 26 ++++++++++++++++++--------
> 1 file changed, 18 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/vme/bridges/vme_fake.c b/drivers/vme/bridges/vme_fake.c
> index 7ef298b289f4..ebf35d305321 100644
> --- a/drivers/vme/bridges/vme_fake.c
> +++ b/drivers/vme/bridges/vme_fake.c
> @@ -48,7 +48,7 @@ struct fake_slave_window {
> int enabled;
> unsigned long long vme_base;
> unsigned long long size;
> - dma_addr_t buf_base;
> + void *buf_base;
This shouldn't be u64? (I don't know the answer).
regards,
dan carpenter
next prev parent reply other threads:[~2016-09-06 19:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 12:59 [PATCH] vme: fake: fix build for 64-bit dma_addr_t Arnd Bergmann
2016-09-06 19:39 ` Dan Carpenter [this message]
2016-09-06 20:21 ` Arnd Bergmann
2016-09-08 19:10 ` Martyn Welch
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=20160906193925.GC4218@mwanda \
--to=dan.carpenter@oracle.com \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manohar.vanga@gmail.com \
--cc=martyn@welchs.me.uk \
/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.