public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix idiocy in asd_init_lseq_mdp()
@ 2006-09-25  1:57 Al Viro
  2006-09-25  6:52 ` Luben Tuikov
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Al Viro @ 2006-09-25  1:57 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-scsi, linux-kernel

To whoever had written that code:

a) priority of >> is higher than that of &
b) priority of typecast is higher than that of any binary operator
c) learn the fscking C

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 drivers/scsi/aic94xx/aic94xx_seq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c
index d9b6da5..56e4b3b 100644
--- a/drivers/scsi/aic94xx/aic94xx_seq.c
+++ b/drivers/scsi/aic94xx/aic94xx_seq.c
@@ -764,7 +764,7 @@ static void asd_init_lseq_mdp(struct asd
 	asd_write_reg_word(asd_ha, LmSEQ_FIRST_INV_SCB_SITE(lseq),
 			   (u16)last_scb_site_no+1);
 	asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq),
-			    (u16) LmM0INTEN_MASK & 0xFFFF0000 >> 16);
+			    (u16) ((LmM0INTEN_MASK & 0xFFFF0000) >> 16));
 	asd_write_reg_word(asd_ha, LmSEQ_INTEN_SAVE(lseq) + 2,
 			    (u16) LmM0INTEN_MASK & 0xFFFF);
 	asd_write_reg_byte(asd_ha, LmSEQ_LINK_RST_FRM_LEN(lseq), 0);
-- 
1.4.2.GIT


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* RE: [PATCH] fix idiocy in asd_init_lseq_mdp()
@ 2006-09-25 19:56 Hammer, Jack
  0 siblings, 0 replies; 11+ messages in thread
From: Hammer, Jack @ 2006-09-25 19:56 UTC (permalink / raw)
  To: James Bottomley, Al Viro; +Cc: Luben Tuikov, dougg, linux-scsi, linux-kernel

James,

asd_write_reg_dword() is the correct implementation for writing the
LmM0INTEN_MASK to the LmSEQ_INTEN_SAVE register.

Jack 



-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@SteelEye.com] 
Sent: Monday, September 25, 2006 1:43 PM
To: Hammer, Jack; Al Viro
Cc: Luben Tuikov; dougg@torque.net; linux-scsi@vger.kernel.org;
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix idiocy in asd_init_lseq_mdp()

On Mon, 2006-09-25 at 18:39 +0100, Al Viro wrote:
> Far more interesting question: where does the hardware expect to see 
> the upper 16 bits of that 32bit value?  Which one it is -
> LmSEQ_INTEN_SAVE(lseq)
> ori LmSEQ_INTEN_SAVE(lseq) + 2?

I don't honestly know.  The change was made as part of a slew of changes
by Robert Tarte at Adaptec to make the driver run on Big Endian
platforms.  I've copied Jack Hammer who's now looking after it in the
hope that he can enlighten us.

James




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

end of thread, other threads:[~2006-09-25 19:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-25  1:57 [PATCH] fix idiocy in asd_init_lseq_mdp() Al Viro
2006-09-25  6:52 ` Luben Tuikov
2006-09-25  6:54 ` Luben Tuikov
2006-09-25 14:47 ` Douglas Gilbert
2006-09-25 14:59   ` Al Viro
2006-09-25 17:16   ` Luben Tuikov
2006-09-25 17:39     ` Al Viro
2006-09-25 17:43       ` James Bottomley
2006-09-25 18:29         ` Mike Anderson
2006-09-25 19:14         ` Luben Tuikov
  -- strict thread matches above, loose matches on Subject: below --
2006-09-25 19:56 Hammer, Jack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox