Re: + scsi-use-get_unaligned_-helpers.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2008-05-02 at 16:09 -0700, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> The patch titled
>      scsi: use get_unaligned_* helpers
> has been added to the -mm tree.  Its filename is
>      scsi-use-get_unaligned_-helpers.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 
> See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
> out what to do about this
> 
> The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
> 
> ------------------------------------------------------
> Subject: scsi: use get_unaligned_* helpers
> From: Harvey Harrison <harvey.harrison@xxxxxxxxx>
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>
> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---
> 
>  drivers/scsi/libiscsi.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -puN drivers/scsi/libiscsi.c~scsi-use-get_unaligned_-helpers drivers/scsi/libiscsi.c
> --- a/drivers/scsi/libiscsi.c~scsi-use-get_unaligned_-helpers
> +++ a/drivers/scsi/libiscsi.c
> @@ -508,7 +508,7 @@ invalid_datalen:
>  			goto out;
>  		}
>  
> -		senselen = be16_to_cpu(get_unaligned((__be16 *) data));
> +		senselen = get_unaligned_be16(data);
>  		if (datalen < senselen)
>  			goto invalid_datalen;
>  

Actually, if you want to be useful, there's far more than just this.
The whole of SCSI and SAS is peppered with thinks like this.  See for
example the include/scsi/scsi.h:scsi_to_u32() sas.h:SAS_ADDR() etc.

Unfortunately, since SCSI is a BE bus, a lot of it is simply roll your
own inside the .c files.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux