From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: akpm@linux-foundation.org
Cc: linux-scsi@vger.kernel.org, harvey.harrison@gmail.com
Subject: Re: + scsi-use-get_unaligned_-helpers.patch added to -mm tree
Date: Fri, 02 May 2008 18:47:01 -0500 [thread overview]
Message-ID: <1209772021.3121.72.camel@localhost.localdomain> (raw)
In-Reply-To: <200805022309.m42N9OJj019849@imap1.linux-foundation.org>
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
next parent reply other threads:[~2008-05-02 23:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200805022309.m42N9OJj019849@imap1.linux-foundation.org>
2008-05-02 23:47 ` James Bottomley [this message]
2008-05-02 23:54 ` + scsi-use-get_unaligned_-helpers.patch added to -mm tree Harvey Harrison
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=1209772021.3121.72.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=harvey.harrison@gmail.com \
--cc=linux-scsi@vger.kernel.org \
/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