Skip to content

Commit

Permalink
unify DMA_..BIT_MASK definitions: v3.1
Browse files Browse the repository at this point in the history
Remove redundant DMA_..BIT_MASK definitions across two drivers.  The
computation of the majority of the bitmasks is done by the compiler.  The
initial split of the patch touching each a different file got removed due
to possible git bisect breakage.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Reviewed-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Borislav Petkov authored and Linus Torvalds committed Oct 18, 2007
1 parent 2c62214 commit 34c6538
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
3 changes: 0 additions & 3 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ static char netxen_nic_driver_string[] = "NetXen Network Driver version "
#define NETXEN_ADAPTER_UP_MAGIC 777
#define NETXEN_NIC_PEG_TUNE 0

#define DMA_32BIT_MASK 0x00000000ffffffffULL
#define DMA_35BIT_MASK 0x00000007ffffffffULL

/* Local functions to NetXen NIC driver */
static int __devinit netxen_nic_probe(struct pci_dev *pdev,
const struct pci_device_id *ent);
Expand Down
24 changes: 14 additions & 10 deletions include/linux/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ enum dma_data_direction {
DMA_NONE = 3,
};

#define DMA_64BIT_MASK 0xffffffffffffffffULL
#define DMA_48BIT_MASK 0x0000ffffffffffffULL
#define DMA_40BIT_MASK 0x000000ffffffffffULL
#define DMA_39BIT_MASK 0x0000007fffffffffULL
#define DMA_32BIT_MASK 0x00000000ffffffffULL
#define DMA_31BIT_MASK 0x000000007fffffffULL
#define DMA_30BIT_MASK 0x000000003fffffffULL
#define DMA_29BIT_MASK 0x000000001fffffffULL
#define DMA_28BIT_MASK 0x000000000fffffffULL
#define DMA_24BIT_MASK 0x0000000000ffffffULL
#define DMA_BIT_MASK(n) ((1ULL<<(n))-1)

#define DMA_64BIT_MASK (~0ULL)
#define DMA_48BIT_MASK DMA_BIT_MASK(48)
#define DMA_47BIT_MASK DMA_BIT_MASK(47)
#define DMA_40BIT_MASK DMA_BIT_MASK(40)
#define DMA_39BIT_MASK DMA_BIT_MASK(39)
#define DMA_35BIT_MASK DMA_BIT_MASK(35)
#define DMA_32BIT_MASK DMA_BIT_MASK(32)
#define DMA_31BIT_MASK DMA_BIT_MASK(31)
#define DMA_30BIT_MASK DMA_BIT_MASK(30)
#define DMA_29BIT_MASK DMA_BIT_MASK(29)
#define DMA_28BIT_MASK DMA_BIT_MASK(28)
#define DMA_24BIT_MASK DMA_BIT_MASK(24)

#define DMA_MASK_NONE 0x0ULL

Expand Down

0 comments on commit 34c6538

Please sign in to comment.