From 4dfb7cbef856689caebd0f498dbd140d1b79954f Mon Sep 17 00:00:00 2001 From: "Salyzyn, Mark" Date: Tue, 27 Mar 2007 15:07:28 -0400 Subject: [SCSI] aacraid: resolve compiler warnings using ptrdiff_t Unsigned long is not always the same size as a pointer, namely on 32 bit systems with 64 bit address space. Ptrdiff_t is the same size as a pointer in all configurations. By using ptrdiff_t we can mitigate the warning messages on these configurations. There should be no side effects of this patch. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley --- drivers/scsi/aacraid/commctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/scsi/aacraid/commctrl.c') diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 987e35e4078..72b0393b459 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -391,10 +391,8 @@ static int close_getadapter_fib(struct aac_dev * dev, void __user *arg) /* * Extract the fibctx from the input parameters */ - if (fibctx->unique == (u32)(unsigned long)arg) { - /* We found a winner */ + if (fibctx->unique == (u32)(ptrdiff_t)arg) /* We found a winner */ break; - } entry = entry->next; fibctx = NULL; } -- cgit v1.2.3