diff options
author | Salyzyn, Mark <mark_salyzyn@adaptec.com> | 2007-03-27 15:07:28 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-04-01 11:25:21 -0400 |
commit | 4dfb7cbef856689caebd0f498dbd140d1b79954f (patch) | |
tree | ce9ee4971a82f8b15e9e4c03b0beef4138c1deb2 /drivers/scsi/aacraid/dpcsup.c | |
parent | 10c9a017f1bd84a7aedaea7029cd5224863197db (diff) |
[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 <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/dpcsup.c')
-rw-r--r-- | drivers/scsi/aacraid/dpcsup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/dpcsup.c b/drivers/scsi/aacraid/dpcsup.c index 4e53f9db1b2c..fbf27f59a311 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) | |||
256 | return 1; | 256 | return 1; |
257 | } | 257 | } |
258 | memset(hw_fib, 0, sizeof(struct hw_fib)); | 258 | memset(hw_fib, 0, sizeof(struct hw_fib)); |
259 | memcpy(hw_fib, (struct hw_fib *)(((unsigned long)(dev->regs.sa)) + (index & ~0x00000002L)), sizeof(struct hw_fib)); | 259 | memcpy(hw_fib, (struct hw_fib *)(((ptrdiff_t)(dev->regs.sa)) + |
260 | (index & ~0x00000002L)), sizeof(struct hw_fib)); | ||
260 | memset(fib, 0, sizeof(struct fib)); | 261 | memset(fib, 0, sizeof(struct fib)); |
261 | INIT_LIST_HEAD(&fib->fiblink); | 262 | INIT_LIST_HEAD(&fib->fiblink); |
262 | fib->type = FSAFS_NTC_FIB_CONTEXT; | 263 | fib->type = FSAFS_NTC_FIB_CONTEXT; |