All of lore.kernel.org
 help / color / mirror / Atom feed
* + scsi-use-get_unaligned_-helpers.patch added to -mm tree
@ 2008-05-02 23:09 akpm
  2008-05-02 23:47 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2008-05-02 23:09 UTC (permalink / raw)
  To: mm-commits; +Cc: harvey.harrison, James.Bottomley


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@gmail.com>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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;
 
_

Patches currently in -mm which might be from harvey.harrison@gmail.com are

origin.patch
linux-next.patch
misc-fix-integer-as-null-pointer-warnings.patch
cifs-remove-global_extern-macro.patch
input-replace-remaining-__function__-occurrences.patch
input-make-one-bit-signed-bitfields-unsigned.patch
input-ff-memlessc-use-clamp_val-macro.patch
ata-remove-fit-macro.patch
ide-eliminate-fit-macro.patch
ide-tape-use-clamp_t-rather-than-nested-min_t-max_t.patch
git-mips.patch
dccp-ccid2c-ccid3c-use-clamp-clamp_t.patch
nfs-replace-remaining-__function__-occurrences.patch
parisc-replace-remaining-__function__-occurences.patch
drivers-parisc-replace-remaining-__function__-occurrences.patch
scsi-replace-remaining-__function__-occurrences.patch
fusion-replace-remaining-__function__-occurrences.patch
scsi-replace-__inline-with-inline.patch
usb-fix-integer-as-null-pointer-sparse-warnings.patch
git-watchdog.patch
mac80211-michaelc-use-kernel-provided-infrastructure.patch
mac80211-introduce-struct-michael_mic_ctx-and-static-helpers.patch
mac80211-tkipc-use-kernel-provided-infrastructure.patch
mac80211-add-const-remove-unused-function-make-one-function-static.patch
mac80211-add-a-struct-to-hold-tkip-context.patch
mac80211-tkipc-use-struct-tkip_ctx-in-phase-1-key-mixing.patch
mac80211-tkipc-use-struct-tkip_ctx-in-phase-2-key-mixing.patch
b43-replace-limit_value-macro-with-clamp_val.patch
b43legacy-replace-limit_value-macro-with-clamp_val.patch
xtensa-replace-remaining-__function__-occurences.patch
mmc-make-one-bit-signed-bitfields-unsigned.patch
lib-add-ascii-hex-helper-functions.patch
scsi-use-the-common-hex_asc-array-rather-than-a-private-one.patch
cris-use-the-common-ascii-hex-helpers.patch
kgdb-use-the-common-ascii-hex-helpers.patch
frv-gdb-stubc-use-the-common-ascii-hex-helpers.patch
mn10300-gdb-stubc-use-the-common-ascii-hex-helpers.patch
mips-gdb-stubc-use-the-common-ascii-hex-helpers.patch
sh-kgdb-stubc-sh-scic-use-the-common-ascii-hex-helpers.patch
ppc-use-the-common-ascii-hex-helpers.patch
isdn-use-the-common-ascii-hex-helpers.patch
net-use-the-common-ascii-hex-helpers.patch
video-fix-integer-as-null-pointer-warnings.patch
block-use-get_unaligned_-helpers.patch
ide-use-get_unaligned_-helpers.patch
media-use-get_unaligned_-helpers.patch
scsi-use-get_unaligned_-helpers.patch
usb-use-get_unaligned_-helpers.patch
xfs-use-get_unaligned_-helpers.patch
fs-ldm-use-get_unaligned_-helpers.patch
irda-use-get_unaligned_-helpers.patch
hid-use-get-put_unaligned_-helpers.patch
include-use-get-put_unaligned_-helpers.patch
lzo-use-get-put_unaligned_-helpers.patch
bluetooth-use-get-put_unaligned_-helpers.patch
wireless-use-get-put_unaligned_-helpers.patch
net-use-get-put_unaligned_-helpers.patch


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

* Re: + scsi-use-get_unaligned_-helpers.patch added to -mm tree
  2008-05-02 23:09 + scsi-use-get_unaligned_-helpers.patch added to -mm tree akpm
@ 2008-05-02 23:47 ` James Bottomley
  2008-05-02 23:54   ` Harvey Harrison
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2008-05-02 23:47 UTC (permalink / raw)
  To: akpm; +Cc: linux-scsi, harvey.harrison

On Fri, 2008-05-02 at 16:09 -0700, akpm@linux-foundation.org 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@gmail.com>
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  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



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

* Re: + scsi-use-get_unaligned_-helpers.patch added to -mm tree
  2008-05-02 23:47 ` James Bottomley
@ 2008-05-02 23:54   ` Harvey Harrison
  0 siblings, 0 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-05-02 23:54 UTC (permalink / raw)
  To: James Bottomley; +Cc: akpm, linux-scsi

On Fri, 2008-05-02 at 18:47 -0500, James Bottomley wrote:

> 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.
> 

Sure, I'll go for a look-see, this was just the ones that were greppable
to find.  I'll go through scsi looking for this pattern this weekend.

Harvey


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

end of thread, other threads:[~2008-05-02 23:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02 23:09 + scsi-use-get_unaligned_-helpers.patch added to -mm tree akpm
2008-05-02 23:47 ` James Bottomley
2008-05-02 23:54   ` Harvey Harrison

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.