From: Andrew Morton <akpm@linux-foundation.org>
To: Shannon Nelson <shannon.nelson@intel.com>
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
shannon.nelson@intel.com, dan.j.williams@intel.com,
randy.dunlap@oracle.com
Subject: Re: [PATCH 5/5] I/OAT: Add completion callback for async_tx interface use
Date: Wed, 17 Oct 2007 17:44:38 -0700 [thread overview]
Message-ID: <20071017174438.f0d6fe2e.akpm@linux-foundation.org> (raw)
In-Reply-To: <20071018001439.31147.52329.stgit@localhost.localdomain>
On Wed, 17 Oct 2007 17:14:39 -0700
Shannon Nelson <shannon.nelson@intel.com> wrote:
> + printk(KERN_ERR "ioatdma: ioat_dma_test_callback(0x%04llx)\n",
> + (u64)dma_async_param);
Generates a warning on 32-bit:
drivers/dma/ioat_dma.c: In function 'ioat_dma_test_callback':
drivers/dma/ioat_dma.c:660: warning: cast from pointer to integer of different size
and we can never ever print u64's anwyay: we dont' know what type the arch
uses to implement them. The usual fix is to cast to unsigned long long,
but in this case %p will work nicely, no?
> + tx->callback = (void *)ioat_dma_test_callback;
and when I remove this cast I get
drivers/dma/ioat_dma.c: In function 'ioat_dma_self_test':
drivers/dma/ioat_dma.c:718: warning: assignment from incompatible pointer type
because ioat_dma_test_callback isn't void-returning. Something is wrong
here. I assume that ioat_dma_test_callback() should just be
void-returning?
diff -puN drivers/dma/ioat_dma.c~i-oat-add-completion-callback-for-async_tx-interface-use-fix drivers/dma/ioat_dma.c
--- a/drivers/dma/ioat_dma.c~i-oat-add-completion-callback-for-async_tx-interface-use-fix
+++ a/drivers/dma/ioat_dma.c
@@ -654,11 +654,10 @@ static void ioat_dma_start_null_desc(str
*/
#define IOAT_TEST_SIZE 2000
-static dma_async_tx_callback ioat_dma_test_callback(void *dma_async_param)
+static void ioat_dma_test_callback(void *dma_async_param)
{
- printk(KERN_ERR "ioatdma: ioat_dma_test_callback(0x%04llx)\n",
- (u64)dma_async_param);
- return 0;
+ printk(KERN_ERR "ioatdma: ioat_dma_test_callback(0x%p)\n",
+ dma_async_param);
}
/**
@@ -715,7 +714,7 @@ static int ioat_dma_self_test(struct ioa
addr = dma_map_single(dma_chan->device->dev, dest, IOAT_TEST_SIZE,
DMA_FROM_DEVICE);
ioat_set_dest(addr, tx, 0);
- tx->callback = (void *)ioat_dma_test_callback;
+ tx->callback = ioat_dma_test_callback;
tx->callback_param = (void *)0x8086;
cookie = ioat_tx_submit(tx);
if (cookie < 0) {
_
next prev parent reply other threads:[~2007-10-18 0:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 0:14 [PATCH 1/5] I/OAT: cleanup pci issues Shannon Nelson
2007-10-18 0:14 ` [PATCH 2/5] I/OAT: clean up of dca provider start and stop Shannon Nelson
2007-10-18 0:14 ` [PATCH 3/5] I/OAT: clean up error handling and some print messages Shannon Nelson
2007-10-18 0:14 ` [PATCH 4/5] I/OAT: Tighten descriptor setup performance Shannon Nelson
2007-10-18 0:34 ` Andrew Morton
2007-10-18 0:41 ` Nelson, Shannon
2007-10-18 0:14 ` [PATCH 5/5] I/OAT: Add completion callback for async_tx interface use Shannon Nelson
2007-10-18 0:37 ` Andrew Morton
2007-10-18 0:46 ` Nelson, Shannon
2007-10-18 0:44 ` Andrew Morton [this message]
2007-10-18 0:47 ` David Miller
2007-10-18 0:53 ` Nelson, Shannon
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=20071017174438.f0d6fe2e.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=shannon.nelson@intel.com \
--cc=torvalds@linux-foundation.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