Commit 20571fef authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] gcc-3.5: drivers/scsi/53c700

In file included from drivers/scsi/53c700.c:140:
drivers/scsi/53c700.h: In function `NCR_700_set_SXFER':
drivers/scsi/53c700.h:106: error: invalid lvalue in assignment
drivers/scsi/53c700.h:107: error: invalid lvalue in assignment
drivers/scsi/53c700.h: In function `NCR_700_set_depth':
drivers/scsi/53c700.h:116: error: invalid lvalue in assignment
drivers/scsi/53c700.h:117: error: invalid lvalue in assignment
drivers/scsi/53c700.h: In function `NCR_700_set_flag':
drivers/scsi/53c700.h:137: error: invalid lvalue in assignment
drivers/scsi/53c700.h: In function `NCR_700_clear_flag':
drivers/scsi/53c700.h:142: error: invalid lvalue in assignment
parent 42828d8d
...@@ -103,8 +103,8 @@ struct NCR_700_SG_List { ...@@ -103,8 +103,8 @@ struct NCR_700_SG_List {
static inline void static inline void
NCR_700_set_SXFER(Scsi_Device *SDp, __u8 sxfer) NCR_700_set_SXFER(Scsi_Device *SDp, __u8 sxfer)
{ {
((unsigned long)SDp->hostdata) &= 0xffffff00; SDp->hostdata = (void *)(((long)SDp->hostdata & 0xffffff00) |
((unsigned long)SDp->hostdata) |= sxfer & 0xff; (sxfer & 0xff));
} }
static inline __u8 NCR_700_get_SXFER(Scsi_Device *SDp) static inline __u8 NCR_700_get_SXFER(Scsi_Device *SDp)
{ {
...@@ -113,8 +113,11 @@ static inline __u8 NCR_700_get_SXFER(Scsi_Device *SDp) ...@@ -113,8 +113,11 @@ static inline __u8 NCR_700_get_SXFER(Scsi_Device *SDp)
static inline void static inline void
NCR_700_set_depth(Scsi_Device *SDp, __u8 depth) NCR_700_set_depth(Scsi_Device *SDp, __u8 depth)
{ {
((unsigned long)SDp->hostdata) &= 0xffff00ff; long l = (long)SDp->hostdata;
((unsigned long)SDp->hostdata) |= (0xff00 & (depth << 8));
l &= 0xffff00ff;
l |= 0xff00 & (depth << 8);
SDp->hostdata = (void *)l;
} }
static inline __u8 static inline __u8
NCR_700_get_depth(Scsi_Device *SDp) NCR_700_get_depth(Scsi_Device *SDp)
...@@ -134,12 +137,12 @@ NCR_700_is_flag_clear(Scsi_Device *SDp, __u32 flag) ...@@ -134,12 +137,12 @@ NCR_700_is_flag_clear(Scsi_Device *SDp, __u32 flag)
static inline void static inline void
NCR_700_set_flag(Scsi_Device *SDp, __u32 flag) NCR_700_set_flag(Scsi_Device *SDp, __u32 flag)
{ {
((unsigned long)SDp->hostdata) |= (flag & 0xffff0000); SDp->hostdata = (void *)((long)SDp->hostdata | (flag & 0xffff0000));
} }
static inline void static inline void
NCR_700_clear_flag(Scsi_Device *SDp, __u32 flag) NCR_700_clear_flag(Scsi_Device *SDp, __u32 flag)
{ {
((unsigned long)SDp->hostdata) &= ~(flag & 0xffff0000); SDp->hostdata = (void *)((long)SDp->hostdata & ~(flag & 0xffff0000));
} }
struct NCR_700_command_slot { struct NCR_700_command_slot {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment