From mboxrd@z Thu Jan 1 00:00:00 1970 From: akpm@linux-foundation.org Subject: + scsi-gdthc-use-unaligned-access-helpers.patch added to -mm tree Date: Tue, 22 Jul 2008 03:36:36 -0700 Message-ID: <200807221036.m6MAaaTK023743@imap1.linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:43541 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754138AbYGVKhR (ORCPT ); Tue, 22 Jul 2008 06:37:17 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org Cc: harvey.harrison@gmail.com, James.Bottomley@HansenPartnership.com, bharrosh@panasas.com The patch titled scsi: gdth.c use unaligned access helpers has been added to the -mm tree. Its filename is scsi-gdthc-use-unaligned-access-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: gdth.c use unaligned access helpers From: Harvey Harrison Remove two now unnecessary local vars. Signed-off-by: Harvey Harrison Cc: Boaz Harrosh Cc: James Bottomley Signed-off-by: Andrew Morton --- drivers/scsi/gdth.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff -puN drivers/scsi/gdth.c~scsi-gdthc-use-unaligned-access-helpers drivers/scsi/gdth.c --- a/drivers/scsi/gdth.c~scsi-gdthc-use-unaligned-access-helpers +++ a/drivers/scsi/gdth.c @@ -131,6 +131,7 @@ #include #include #include +#include #include #include #include @@ -2441,8 +2442,8 @@ static int gdth_fill_cache_cmd(gdth_ha_s { register gdth_cmd_str *cmdp; struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); - ulong32 cnt, blockcnt; - ulong64 no, blockno; + ulong32 blockcnt; + ulong64 blockno; int i, cmd_index, read_write, sgcnt, mode64; cmdp = ha->pccb; @@ -2510,19 +2511,15 @@ static int gdth_fill_cache_cmd(gdth_ha_s if (read_write) { if (scp->cmd_len == 16) { - memcpy(&no, &scp->cmnd[2], sizeof(ulong64)); - blockno = be64_to_cpu(no); - memcpy(&cnt, &scp->cmnd[10], sizeof(ulong32)); - blockcnt = be32_to_cpu(cnt); + blockno = get_unaligned_be64(&scp->cmnd[2]); + blockcnt = get_unaligned_be64(&scp->cmnd[10]); } else if (scp->cmd_len == 10) { - memcpy(&no, &scp->cmnd[2], sizeof(ulong32)); - blockno = be32_to_cpu(no); - memcpy(&cnt, &scp->cmnd[7], sizeof(ushort)); - blockcnt = be16_to_cpu(cnt); + blockno = get_unaligned_be32(&scp->cmnd[2]); + blockcnt = get_unaligned_be16(&scp->cmnd[7]); } else { - memcpy(&no, &scp->cmnd[0], sizeof(ulong32)); - blockno = be32_to_cpu(no) & 0x001fffffUL; - blockcnt= scp->cmnd[4]==0 ? 0x100 : scp->cmnd[4]; + blockno = get_unaligned_be32(&scp->cmnd[2]); + blockno &= 0x001fffffUL; + blockcnt= scp->cmnd[4]==0 ? 0x100 : scp->cmnd[4]; } if (mode64) { cmdp->u.cache64.BlockNo = blockno; _ Patches currently in -mm which might be from harvey.harrison@gmail.com are origin.patch linux-next.patch cifs-remove-global_extern-macro.patch mtd-diskonchipc-fix-sparse-endian-warnings.patch lockd-trivial-sparse-endian-annotations.patch pci-procc-sparse-endian-annotations.patch scsi-replace-remaining-__function__-occurrences.patch fusion-replace-remaining-__function__-occurrences.patch scsi-replace-__inline-with-inline.patch scsi-aic79xx_core-fix-shadowed-variables-add-statics.patch scsi-aic79xx-aic79xx_pcic-fix-shadowed-variables.patch scsi-gdthc-use-unaligned-access-helpers.patch xfs-use-get_unaligned_-helpers.patch xtensa-replace-remaining-__function__-occurences.patch fs-ldm-use-get_unaligned_-helpers.patch include-use-get-put_unaligned_-helpers.patch lzo-use-get-put_unaligned_-helpers.patch asm-generic-int-ll64h-always-provide-__su64.patch olpc-olpc_batteryc-sparse-endian-annotations.patch ecryptfs-cryptoc-use-unaligned-byteorder-helpers.patch ecryptfs-inodec-mmapc-use-unaligned-byteorder-helpers.patch markers-fix-sparse-integer-as-null-pointer-warning.patch scsi-use-the-common-hex_asc-array-rather-than-a-private-one.patch isdn-use-the-common-ascii-hex-helpers.patch net-use-the-common-ascii-hex-helpers.patch cris-use-the-common-ascii-hex-helpers.patch frv-use-the-common-ascii-hex-helpers.patch mips-use-the-common-ascii-hex-helpers.patch ppc-use-the-common-ascii-hex-helpers.patch ppc-use-the-common-ascii-hex-helpers-fix.patch mn10300-use-the-common-ascii-hex-helpers.patch byteorder-add-a-new-include-linux-swabh-to-define-byteswapping-functions.patch byteorder-add-include-linux-byteorderh-to-define-endian-helpers.patch