All of lore.kernel.org
 help / color / mirror / Atom feed
* aic7xxx: Missing parentheses in ahc_init()?
@ 2009-11-03 22:38 Roel Kluin
  2009-11-03 22:57 ` James Bottomley
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-11-03 22:38 UTC (permalink / raw)
  To: Hannes Reinecke, linux-scsi

This looks odd, are there maybe parentheses missing here?

Thanks, Roel

diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index 8dfb59d..e6aad3e 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: aic7xxx: Missing parentheses in ahc_init()?
  2009-11-03 22:38 aic7xxx: Missing parentheses in ahc_init()? Roel Kluin
@ 2009-11-03 22:57 ` James Bottomley
  0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2009-11-03 22:57 UTC (permalink / raw)
  To: Roel Kluin; +Cc: Hannes Reinecke, linux-scsi

On Tue, 2009-11-03 at 23:38 +0100, Roel Kluin wrote:
> This looks odd, are there maybe parentheses missing here?
> 
> Thanks, Roel
> 
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
> index 8dfb59d..e6aad3e 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_core.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
> @@ -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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-03 22:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-03 22:38 aic7xxx: Missing parentheses in ahc_init()? Roel Kluin
2009-11-03 22:57 ` James Bottomley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.