Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4dfb7cbef856689caebd0f498dbd140d1b79954f
Commit:     4dfb7cbef856689caebd0f498dbd140d1b79954f
Parent:     10c9a017f1bd84a7aedaea7029cd5224863197db
Author:     Salyzyn, Mark <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 27 15:07:28 2007 -0400
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Sun Apr 1 10:25:21 2007 -0500

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/aacraid/commctrl.c |    4 +---
 drivers/scsi/aacraid/comminit.c |    4 ++--
 drivers/scsi/aacraid/dpcsup.c   |    3 ++-
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index 987e35e..72b0393 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;
        }
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index ae34768..33682ce 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -5,7 +5,7 @@
  * based on the old aacraid driver that is..
  * Adaptec aacraid device driver for Linux.
  *
- * Copyright (c) 2000 Adaptec, Inc. ([EMAIL PROTECTED])
+ * Copyright (c) 2000-2007 Adaptec, Inc. ([EMAIL PROTECTED])
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -110,7 +110,7 @@ static int aac_alloc_comm(struct aac_dev *dev, void 
**commaddr, unsigned long co
        /*
         *      Align the beginning of Headers to commalign
         */
-       align = (commalign - ((unsigned long)(base) & (commalign - 1)));
+       align = (commalign - ((ptrdiff_t)(base) & (commalign - 1)));
        base = base + align;
        phys = phys + align;
        /*
diff --git a/drivers/scsi/aacraid/dpcsup.c b/drivers/scsi/aacraid/dpcsup.c
index 4e53f9d..fbf27f5 100644
--- a/drivers/scsi/aacraid/dpcsup.c
+++ b/drivers/scsi/aacraid/dpcsup.c
@@ -256,7 +256,8 @@ unsigned int aac_intr_normal(struct aac_dev * dev, u32 
Index)
                        return 1;
                }
                memset(hw_fib, 0, sizeof(struct hw_fib));
-               memcpy(hw_fib, (struct hw_fib *)(((unsigned 
long)(dev->regs.sa)) + (index & ~0x00000002L)), sizeof(struct hw_fib));
+               memcpy(hw_fib, (struct hw_fib *)(((ptrdiff_t)(dev->regs.sa)) +
+                 (index & ~0x00000002L)), sizeof(struct hw_fib));
                memset(fib, 0, sizeof(struct fib));
                INIT_LIST_HEAD(&fib->fiblink);
                fib->type = FSAFS_NTC_FIB_CONTEXT;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to