linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 09/12] blackfin: use use asm-generic/scatterlist.h
Date: Wed, 7 Apr 2010 23:51:04 -0400	[thread overview]
Message-ID: <y2z8bd0f97a1004072051i3d309852zf3dc1b3ffb06d0ac@mail.gmail.com> (raw)
In-Reply-To: <1270511567-18567-10-git-send-email-fujita.tomonori@lab.ntt.co.jp>

On Mon, Apr 5, 2010 at 19:52, FUJITA Tomonori wrote:
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  arch/blackfin/include/asm/scatterlist.h |   22 +---------------------
>  1 files changed, 1 insertions(+), 21 deletions(-)
>
> diff --git a/arch/blackfin/include/asm/scatterlist.h b/arch/blackfin/include/asm/scatterlist.h
> index 04f4487..64d41d3 100644
> --- a/arch/blackfin/include/asm/scatterlist.h
> +++ b/arch/blackfin/include/asm/scatterlist.h
> @@ -1,27 +1,7 @@
>  #ifndef _BLACKFIN_SCATTERLIST_H
>  #define _BLACKFIN_SCATTERLIST_H
>
> -#include <linux/mm.h>
> -
> -struct scatterlist {
> -#ifdef CONFIG_DEBUG_SG
> -       unsigned long sg_magic;
> -#endif
> -       unsigned long page_link;
> -       unsigned int offset;
> -       dma_addr_t dma_address;
> -       unsigned int length;
> -};
> -
> -/*
> - * These macros should be used after a pci_map_sg call has been done
> - * to get bus addresses of each of the SG entries and their lengths.
> - * You should only work with the number of sg entries pci_map_sg
> - * returns, or alternatively stop on the first sg_dma_len(sg) which
> - * is 0.
> - */
> -#define sg_dma_address(sg)      ((sg)->dma_address)
> -#define sg_dma_len(sg)          ((sg)->length)
> +#include <asm-generic/scatterlist.h>
>
>  #define ISA_DMA_THRESHOLD      (0xffffffff)

this is the same value as the common asm-generic one, so this define
should be punted, especially since this would probably introduce
redefined warnings.

once that is done, this header is simply a redirect, so it'd be better
if it was just one line:
#include <asm-generic/scatterlist.h>

one of the reasons i hadnt converted sooner was that it seems like the
common header introduces bloat.  the Blackfin header has just "length"
while the asm-generic has both "length" and "dma_length".  unless i
missed something, this hasnt been a problem for us.  perhaps the
common header should have something like:
#if __BITS_PER_LONG == 64
    unsigned int    dma_length;
#endif
this would match the existing sg_dma_len code.  or perhaps declare the
two lengths as an anonymous union.
-mike

  reply	other threads:[~2010-04-08  3:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-05 23:52 [PATCH -mm 00/12] use asm-generic/scatterlist.h on every architecture (the second half) FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 01/12] asm-generic: remove ARCH_HAS_SG_CHAIN in scatterlist.h FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 02/12] avr32: use asm-generic/scatterlist.h FUJITA Tomonori
2010-04-06 13:38   ` Haavard Skinnemoen
2010-04-06 23:55     ` FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 03/12] cris: " FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 04/12] h8300: " FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 05/12] m32r: use " FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 06/12] m68k: " FUJITA Tomonori
2010-04-23  8:29   ` Geert Uytterhoeven
2010-04-25 13:46     ` FUJITA Tomonori
2010-04-25 18:17       ` Geert Uytterhoeven
2010-04-05 23:52 ` [PATCH -mm 07/12] mips: use " FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 08/12] xtensa: " FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 09/12] blackfin: " FUJITA Tomonori
2010-04-08  3:51   ` Mike Frysinger [this message]
2010-04-08  5:00     ` FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 10/12] frv: " FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 11/12] mn10300: " FUJITA Tomonori
2010-04-05 23:52 ` [PATCH -mm 12/12] parisc: " FUJITA Tomonori

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=y2z8bd0f97a1004072051i3d309852zf3dc1b3ffb06d0ac@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).