public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: bbpetkov@yahoo.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] unify DMA_..BIT_MASK definitions
Date: Mon, 17 Sep 2007 11:14:48 -0700	[thread overview]
Message-ID: <46EEC418.6070005@goop.org> (raw)
In-Reply-To: <20070917175139.GA4941@gollum.tnic>

Borislav Petkov wrote:
> This patches remove redundant DMA_..BIT_MASK definitions across two drivers.
> First off, consolidate dma bitmask definitions in the proper header file...
>
> Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
>
> --
> Index: 23-rc6/include/linux/dma-mapping.h
> ===================================================================
> --- 23-rc6/include/linux/dma-mapping.h.orig	2007-09-17 17:48:20.000000000 +0200
> +++ 23-rc6/include/linux/dma-mapping.h	2007-09-17 19:34:21.000000000 +0200
> @@ -17,6 +17,7 @@
>  #define DMA_48BIT_MASK	0x0000ffffffffffffULL
>  #define DMA_40BIT_MASK	0x000000ffffffffffULL
>  #define DMA_39BIT_MASK	0x0000007fffffffffULL
> +#define DMA_35BIT_MASK	0x00000007ffffffffULL
>  #define DMA_32BIT_MASK	0x00000000ffffffffULL
>  #define DMA_31BIT_MASK	0x000000007fffffffULL
>  #define DMA_30BIT_MASK	0x000000003fffffffULL
>   

Hm.  Wouldn't it be better to define something like

#define DMA_BIT_MASK(x)    ((1ull<<(x))-1)

and then define everything in terms of that (or just use it directly and
deprecate the DMA_XXBIT_MASK macros)?

    J

  reply	other threads:[~2007-09-17 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 17:51 [PATCH 0/2] unify DMA_..BIT_MASK definitions Borislav Petkov
2007-09-17 18:14 ` Jeremy Fitzhardinge [this message]
2007-09-17 18:33   ` Borislav Petkov
2007-09-17 18:48     ` Jeremy Fitzhardinge

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=46EEC418.6070005@goop.org \
    --to=jeremy@goop.org \
    --cc=bbpetkov@yahoo.de \
    --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