netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ben@fluff.org.uk
To: netdev@vger.kernel.org
Cc: linux@simtec.co.uk, doong.ping@micrel.com, tristram.ha@micrel.com
Subject: [patch 8/9] KS8851: Use the ks8851.h header to hold union ks8851_tx_hdr
Date: Mon, 07 Dec 2009 12:15:09 +0000	[thread overview]
Message-ID: <20091207121647.349234115@fluff.org.uk> (raw)
In-Reply-To: 20091207121501.819539008@fluff.org.uk

[-- Attachment #1: ks8851-reduce-header-duplication3.patch --]
[-- Type: text/plain, Size: 2833 bytes --]

The union ks8851_tx_hdr turns up in both ks8851.c and ks8851_mll.c in two
different formats, thus making a common version in ks8851.h is going to
save source file usage.

The ks8851_mll.c uses the name ks_tx_hdr instead of ks8851_tx_hdr, so
rename this instance.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>

---

Index: b/drivers/net/ks8851.c
===================================================================
--- a/drivers/net/ks8851.c	2009-12-07 11:24:54.000000000 +0000
+++ b/drivers/net/ks8851.c	2009-12-07 11:29:02.000000000 +0000
@@ -46,19 +46,6 @@ struct ks8851_rxctrl {
 	u16	rxcr2;
 };
 
-/**
- * union ks8851_tx_hdr - tx header data
- * @txb: The header as bytes
- * @txw: The header as 16bit, little-endian words
- *
- * A dual representation of the tx header data to allow
- * access to individual bytes, and to allow 16bit accesses
- * with 16bit alignment.
- */
-union ks8851_tx_hdr {
-	u8	txb[6];
-	__le16	txw[3];
-};
 
 /**
  * struct ks8851_net - KS8851 driver private data
Index: b/drivers/net/ks8851.h
===================================================================
--- a/drivers/net/ks8851.h	2009-12-07 11:26:50.000000000 +0000
+++ b/drivers/net/ks8851.h	2009-12-07 11:28:31.000000000 +0000
@@ -323,3 +323,17 @@
 #define KS_SPIOP_WR				(0x40)
 #define KS_SPIOP_RXFIFO				(0x80)
 #define KS_SPIOP_TXFIFO				(0xC0)
+
+/**
+ * union ks8851_tx_hdr - tx header data
+ * @txb: The header as bytes
+ * @txw: The header as 16bit, little-endian words
+ *
+ * A dual representation of the tx header data to allow
+ * access to individual bytes, and to allow 16bit accesses
+ * with 16bit alignment.
+ */
+union ks8851_tx_hdr {
+	u8	txb[6];
+	__le16	txw[3];
+};
Index: b/drivers/net/ks8851_mll.c
===================================================================
--- a/drivers/net/ks8851_mll.c	2009-12-07 11:24:46.000000000 +0000
+++ b/drivers/net/ks8851_mll.c	2009-12-07 11:28:49.000000000 +0000
@@ -72,20 +72,6 @@ static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0
 #define MAC_ADDR_LEN			6
 
 /**
- * union ks_tx_hdr - tx header data
- * @txb: The header as bytes
- * @txw: The header as 16bit, little-endian words
- *
- * A dual representation of the tx header data to allow
- * access to individual bytes, and to allow 16bit accesses
- * with 16bit alignment.
- */
-union ks_tx_hdr {
-	u8      txb[4];
-	__le16  txw[2];
-};
-
-/**
  * struct ks_net - KS8851 driver private data
  * @net_device 	: The network device we're bound to
  * @hw_addr	: start address of data register.
@@ -137,7 +123,7 @@ struct ks_net {
 	struct net_device	*netdev;
 	void __iomem    	*hw_addr;
 	void __iomem    	*hw_addr_cmd;
-	union ks_tx_hdr		txh ____cacheline_aligned;
+	union ks8851_tx_hdr	txh ____cacheline_aligned;
 	struct mutex      	lock; /* spinlock to be interrupt safe */
 	struct platform_device *pdev;
 	struct mii_if_info	mii;


  parent reply	other threads:[~2009-12-07 12:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091207121501.819539008@fluff.org.uk>
2009-12-07 12:15 ` [patch 1/9] eeprom_93cx6: Add data direction control ben
2009-12-07 12:34   ` Ben Dooks
2009-12-07 12:15 ` [patch 2/9] eeprom_93cx6: Add write support ben
2009-12-07 12:15 ` [patch 3/9] KS8851: Add support for EEPROM MAC address ben
2009-12-09  4:45   ` David Miller
2009-12-07 12:15 ` [patch 4/9] KS8851: Add ethtool support for EEPROM ben
2009-12-07 12:15 ` [patch 5/9] KS8851: Add debugfs export for driver state ben
2009-12-07 12:15 ` [patch 6/9] KS8851: ks8851_mll.c: Use the ks8851.h header for device register defines ben
2009-12-07 12:15 ` [patch 7/9] KS8851: Update ks8851.h header from ks8851_mll.c ben
2009-12-07 12:15 ` ben [this message]
2009-12-07 12:15 ` [patch 9/9] KS8851: Add platform data to specific IRQ trigger type ben
     [not found] <20091207121727.016092171@fluff.org.uk>
2009-12-07 12:17 ` [patch 8/9] KS8851: Use the ks8851.h header to hold union ks8851_tx_hdr Ben Dooks

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=20091207121647.349234115@fluff.org.uk \
    --to=ben@fluff.org.uk \
    --cc=doong.ping@micrel.com \
    --cc=linux@simtec.co.uk \
    --cc=netdev@vger.kernel.org \
    --cc=tristram.ha@micrel.com \
    /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).