mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
To: "Andreas Schwab" <schwab@suse.de>,
	"Stephen Rothwell" <sfr@canb.auug.org.au>
Cc: <linux-scsi@vger.kernel.org>, "LKML" <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/1] aacraid: don't assign cpu_to_le32(int) to u8
Date: Wed, 7 Nov 2007 10:58:12 -0500	[thread overview]
Message-ID: <AE4F746F2AECFC4DA4AADD66A1DFEF01F95EF7@otce2k301.adaptec.com> (raw)
In-Reply-To: <jefxzqqeha.fsf@sykes.suse.de>

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

Good point, thanks. The intent of the management applications
utilization of this AIF report is to observe the LSB of the value of
integer value in BlinkLED. The actions of the cpu_to_le32 actually
breaks this and reports the wrong content in swapped architectures.

This attached follow-up patch is against current scsi-misc-2.6 *after*
the application of the 'don't assign cpu_to_le32(constant) to u8' patch
submitted by Stephen Rothwell which has already been taken by the -mm
tree. Inspection of other areas of the aacraid driver came up blank for
similar style bugs.

ObligatoryDisclaimer: Please accept my condolences regarding Outlook's
handling of patch attachments (inline gets damaged, use attachment).

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>

 drivers/scsi/aacraid/commsup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -ru a/drivers/scsi/aacraid/commsup.c
b/drivers/scsi/aacraid/commsup.c
--- a/drivers/scsi/aacraid/commsup.c    2007-11-07 10:35:16.603727464
-0500
+++ b/drivers/scsi/aacraid/commsup.c    2007-11-07 10:37:50.540311107
-0500
@@ -1342,7 +1342,7 @@
                        aif->data[0] = AifEnExpEvent;
                        aif->data[1] = AifExeFirmwarePanic;
                        aif->data[2] = AifHighPriority;
-                       aif->data[3] = cpu_to_le32(BlinkLED);
+                       aif->data[3] = BlinkLED;

                        /*
                         * Put the FIB onto the

Sincerely -- Mark Salyzyn

> -----Original Message-----
> From: Andreas Schwab [mailto:schwab@suse.de] 
> Sent: Thursday, November 01, 2007 9:31 AM
> To: Stephen Rothwell
> Cc: AACRAID; linux-scsi@vger.kernel.org; LKML
> Subject: Re: [PATCHv2] aacraid: don't assign 
> cpu_to_le32(constant) to u8
> 
> Stephen Rothwell <sfr@canb.auug.org.au> writes:
> 
> > diff --git a/drivers/scsi/aacraid/commsup.c 
> b/drivers/scsi/aacraid/commsup.c
> > index 240a0bb..3c2dbc0 100644
> > --- a/drivers/scsi/aacraid/commsup.c
> > +++ b/drivers/scsi/aacraid/commsup.c
> > @@ -1339,9 +1339,9 @@ int aac_check_health(struct aac_dev * aac)
> >  			aif = (struct aac_aifcmd *)hw_fib->data;
> >  			aif->command = cpu_to_le32(AifCmdEventNotify);
> >  		 	aif->seqnum = cpu_to_le32(0xFFFFFFFF);
> > -		 	aif->data[0] = cpu_to_le32(AifEnExpEvent);
> > -			aif->data[1] = cpu_to_le32(AifExeFirmwarePanic);
> > -		 	aif->data[2] = cpu_to_le32(AifHighPriority);
> > +			aif->data[0] = AifEnExpEvent;
> > +			aif->data[1] = AifExeFirmwarePanic;
> > +			aif->data[2] = AifHighPriority;
> >  			aif->data[3] = cpu_to_le32(BlinkLED);
> 
> What about the last line?
> 
> Andreas.

[-- Attachment #2: aacraid_BlinkLED.patch --]
[-- Type: application/octet-stream, Size: 461 bytes --]

diff -ru a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
--- a/drivers/scsi/aacraid/commsup.c	2007-11-07 10:35:16.603727464 -0500
+++ b/drivers/scsi/aacraid/commsup.c	2007-11-07 10:37:50.540311107 -0500
@@ -1342,7 +1342,7 @@
 			aif->data[0] = AifEnExpEvent;
 			aif->data[1] = AifExeFirmwarePanic;
 			aif->data[2] = AifHighPriority;
-			aif->data[3] = cpu_to_le32(BlinkLED);
+			aif->data[3] = BlinkLED;
 
 			/*
 			 * Put the FIB onto the

  reply	other threads:[~2007-11-07 15:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  4:02 [PATCH] aacraid: don't assign cpu_to_le32(constant) " Stephen Rothwell
2007-10-31 13:53 ` Salyzyn, Mark
2007-11-01  6:32 ` [PATCHv2] " Stephen Rothwell
2007-11-01 13:11   ` Salyzyn, Mark
2007-11-01 13:31   ` Andreas Schwab
2007-11-07 15:58     ` Salyzyn, Mark [this message]
2007-11-07 17:33       ` [PATCH 1/1] aacraid: don't assign cpu_to_le32(int) " Christoph Hellwig
2007-11-07 18:51         ` Salyzyn, Mark
2007-11-08 17:27           ` Christoph Hellwig
2007-11-08 18:09             ` Salyzyn, Mark
     [not found]       ` <532ABFBDAAC3A34EB12EBA6CEC2838F40FE734@ADPE2K703.adaptec.com>
     [not found]         ` <532ABFBDAAC3A34EB12EBA6CEC2838F40FE735@ADPE2K703.adaptec.com>
     [not found]           ` <532ABFBDAAC3A34EB12EBA6CEC2838F40FE736@ADPE2K703.adaptec.com>
     [not found]             ` <532ABFBDAAC3A34EB12EBA6CEC2838F40FE738@ADPE2K703.adaptec.com>
     [not found]               ` <532ABFBDAAC3A34EB12EBA6CEC2838F40FE739@ADPE2K703.adaptec.com>
     [not found]                 ` <532ABFBDAAC3A34EB12EBA6CEC2838F40FE73E@ADPE2K703.adaptec.com>
     [not found]                   ` <532ABFBDAAC3A34EB12EBA6CEC2838F437E96989@ADPE2K703.adaptec.com>
2008-01-11 16:41                     ` [RFC] aacraid: driver feature flags? Salyzyn, Mark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AE4F746F2AECFC4DA4AADD66A1DFEF01F95EF7@otce2k301.adaptec.com \
    --to=mark_salyzyn@adaptec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=schwab@suse.de \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®