[PATCH] drivers/net/depca.c tidyup (fwd)

From: Peter Denison (lkml@marshadder.uklinux.net)
Date: Mon May 06 2002 - 12:29:44 EST


The ALIGN macro is defined centrally - remove the local version

Applies to: 2.5.13, 2.5.14

--- linux/drivers/net/depca.c.old Sun May 5 12:43:31 2002
+++ linux/drivers/net/depca.c Sun May 5 15:08:11 2002
@@ -339,16 +339,6 @@
 #define MAX_NUM_DEPCAS 2
 
 /*
-** Memory Alignment. Each descriptor is 4 longwords long. To force a
-** particular alignment on the TX descriptor, adjust DESC_SKIP_LEN and
-** DESC_ALIGN. ALIGN aligns the start address of the private memory area
-** and hence the RX descriptor ring's first entry.
-*/
-#define ALIGN4 ((u_long)4 - 1) /* 1 longword align */
-#define ALIGN8 ((u_long)8 - 1) /* 2 longword (quadword) align */
-#define ALIGN ALIGN8 /* Keep the LANCE happy... */
-
-/*
 ** The DEPCA Rx and Tx ring descriptors.
 */
 struct depca_rx_desc {
@@ -641,7 +631,7 @@
         offset += sizeof(struct depca_init);
 
         /* Tx & Rx descriptors (aligned to a quadword boundary) */
- offset = (offset + ALIGN) & ~ALIGN;
+ offset = ALIGN(offset, 8);
         lp->rx_ring = (struct depca_rx_desc *)(lp->sh_mem + offset);
         lp->rx_ring_offset = offset;
 

-- 
Peter Denison <peterd at marshadder dot uklinux dot net>
Please note that my address is changing from <peterd at pnd-pc dot demon.co.uk>

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:27 EST