From: Randy Dunlap <rdunlap@infradead.org>
To: Vinod Koul <vkoul@kernel.org>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: drivers/dma/iop-adma.c cast build warnings
Date: Mon, 20 Apr 2020 17:26:02 -0700 [thread overview]
Message-ID: <5019a2d6-bace-26dc-dda2-c263efc30185@infradead.org> (raw)
Hi,
On i386, when CONFIG_ARCH_DMA_ADDR_T_64BIT=y,
but long and void* are only 32 bits, there are a few build warnings:
CC [M] drivers/dma/iop-adma.o
../drivers/dma/iop-adma.c: In function 'iop_adma_alloc_chan_resources':
../drivers/dma/iop-adma.c:448:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hw_desc = (char *) iop_chan->device->dma_desc_pool;
^
../drivers/dma/iop-adma.c:450:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(dma_addr_t) &hw_desc[idx * IOP_ADMA_SLOT_SIZE];
^
In file included from ../include/linux/printk.h:328:0,
from ../include/linux/kernel.h:15,
from ../include/linux/list.h:9,
from ../include/linux/module.h:12,
from ../drivers/dma/iop-adma.c:13:
../drivers/dma/iop-adma.c: In function 'iop_adma_probe':
../drivers/dma/iop-adma.c:1302:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void *) adev->dma_desc_pool);
^
This is on linux-next 20200420.
Are DMA addresses for this driver/hw device limited to 32 bits?
thanks.
--
~Randy
Reported-by: Randy Dunlap <rdunlap@infradead.org>
reply other threads:[~2020-04-21 0:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5019a2d6-bace-26dc-dda2-c263efc30185@infradead.org \
--to=rdunlap@infradead.org \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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).