Skip to contentSkip to conversation

aic7xxx: Missing parentheses in ahc_init()?

PATCH Roel Kluin 2 participants 2 messages Nov 3, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

This looks odd, are there maybe parentheses missing here?

Thanks, Roel

drivers/scsi/aic7xxx/aic7xxx_core.c +2 -2
index 8dfb59d..e6aad3e 100644
@@ -5534,8 +5534,8 @@ ahc_init(struct ahc_softc *ahc)
 					 * so the format is different.
 					 */
 					scsirate = (scsirate & SXFR) >> 4
-						 | (ultraenb & mask)
-						  ? 0x08 : 0x0
+						 | ((ultraenb & mask)
+						  ? 0x08 : 0x0)
 						 | (scsirate & WIDEXFER);
 					offset = MAX_OFFSET_ULTRA2;
 				} else
#1 lore raw
Quoted 9 lines · Roel Kluin

This looks odd, are there maybe parentheses missing here?

Thanks, Roel

drivers/scsi/aic7xxx/aic7xxx_core.c +0 -0
index 8dfb59d..e6aad3e 100644

drivers/scsi/aic7xxx/aic7xxx_core.c ahc_init(struct ahc_softc *ahc) · line 5538

Quoted 7 lines
drivers/scsi/aic7xxx/aic7xxx_core.c +2 -2
@@ -5534,8 +5534,8 @@ ahc_init(struct ahc_softc *ahc)
 					 * so the format is different.
 					 */
 					scsirate = (scsirate & SXFR) >> 4
-						 | (ultraenb & mask)
-						  ? 0x08 : 0x0
+						 | ((ultraenb & mask)
+						  ? 0x08 : 0x0)

I really don't think so. The top 4 bits of the scsirate registers are supposed to be transfer features; it would make no sense to be transferring them to the bottom 4 bits and oring in an extra flag.

James