Skip to contentSkip to conversation

staging: delete duplicated files/functionality in rtl8712

PATCH In review Paul Gortmaker 4 participants 7 messages May 10, 2012 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover staging: delete duplicated files/functionality in rtl8712

A git grep happened to lead me into this dir, and once there I couldn't simply leave and pretend I didn't see the stuff that I saw.

There were duplicated basic networking headers like if_ether.h and ip.h (of course, some ancient versions, too). And a whole whack of boilerplate endian handling functionality duplicated too.

I forced myself to stop looking after that.

Anyway, a trivial redirection onto mainline's networking headers in the proper include dir, and a deletion of any references to the endian headers and the thing still happily builds on x86_64 and ppc even after shitcanning seven useless files.

These three commits are against May 8th's linux-next tree. I've used "-D" to hide the line-by-line content of the deletions.

Paul.
---
Cc: Larry Finger <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>

Paul Gortmaker (3):
staging: wean rtl8712 off of its ancient duplicate of if_ether.h
staging: wean rtl8712 off of its ancient duplicate of ip.h
staging: delete all duplicated endian crap from rtl8712 driver

 drivers/staging/rtl8712/big_endian.h        |   94 --------------
 drivers/staging/rtl8712/generic.h           |  178 ---------------------------
 drivers/staging/rtl8712/hal_init.c          |    1 -
 drivers/staging/rtl8712/if_ether.h          |  141 ---------------------
 drivers/staging/rtl8712/ip.h                |  137 --------------------
 drivers/staging/rtl8712/little_endian.h     |   94 --------------
 drivers/staging/rtl8712/osdep_service.h     |    2 -
 drivers/staging/rtl8712/rtl8712_cmd.c       |    1 -
 drivers/staging/rtl8712/rtl8712_recv.c      |    5 +-
 drivers/staging/rtl8712/rtl8712_xmit.c      |    1 -
 drivers/staging/rtl8712/rtl871x_byteorder.h |   32 -----
 drivers/staging/rtl8712/rtl871x_cmd.c       |    1 -
 drivers/staging/rtl8712/rtl871x_recv.c      |    4 +-
 drivers/staging/rtl8712/rtl871x_xmit.c      |    1 -
 drivers/staging/rtl8712/swab.h              |  131 --------------------
 drivers/staging/rtl8712/usb_ops.c           |    1 -
 drivers/staging/rtl8712/wifi.h              |    1 -
 drivers/staging/rtl8712/xmit_linux.c        |    6 +-
 18 files changed, 7 insertions(+), 824 deletions(-)
 delete mode 100644 drivers/staging/rtl8712/big_endian.h
 delete mode 100644 drivers/staging/rtl8712/generic.h
 delete mode 100644 drivers/staging/rtl8712/if_ether.h
 delete mode 100644 drivers/staging/rtl8712/ip.h
 delete mode 100644 drivers/staging/rtl8712/little_endian.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_byteorder.h
 delete mode 100644 drivers/staging/rtl8712/swab.h
Signature · 6 lines
1.7.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH 1/3 staging: wean rtl8712 off of its ancient duplicate of if_ether.h

This driver should not be carrying around ancient copies of headers like <linux/if_ether.h> for its own use. Mapping it onto the mainline one uncovers no build issues.

Cc Larry Finger <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/rtl8712/if_ether.h     |  141 --------------------------------
 drivers/staging/rtl8712/rtl8712_recv.c |    3 +-
 drivers/staging/rtl8712/rtl871x_recv.c |    2 +-
 drivers/staging/rtl8712/xmit_linux.c   |    2 +-
 4 files changed, 4 insertions(+), 144 deletions(-)
 delete mode 100644 drivers/staging/rtl8712/if_ether.h
drivers/staging/rtl8712/if_ether.h deleted +0 -0
deleted file mode 100644
index 2bbe527..0000000
drivers/staging/rtl8712/rtl8712_recv.c +2 -1
index fa6dc9c..b2a7714 100644
@@ -28,12 +28,13 @@
 
 #define _RTL8712_RECV_C_
 
+#include <linux/if_ether.h>
+
 #include "osdep_service.h"
 #include "drv_types.h"
 #include "recv_osdep.h"
 #include "mlme_osdep.h"
 #include "ip.h"
-#include "if_ether.h"
 #include "ethernet.h"
 #include "usb_ops.h"
 #include "wifi.h"
drivers/staging/rtl8712/rtl871x_recv.c +1 -1
index 5b03b40..7376abb 100644
@@ -29,6 +29,7 @@
 #define _RTL871X_RECV_C_
 
 #include <linux/slab.h>
+#include <linux/if_ether.h>
 #include <linux/kmemleak.h>
 
 #include "osdep_service.h"
@@ -36,7 +37,6 @@
 #include "recv_osdep.h"
 #include "mlme_osdep.h"
 #include "ip.h"
-#include "if_ether.h"
 #include "ethernet.h"
 #include "usb_ops.h"
 #include "wifi.h"
drivers/staging/rtl8712/xmit_linux.c +1 -1
index c970362..d27f652 100644
@@ -29,12 +29,12 @@
 #define _XMIT_OSDEP_C_
 
 #include <linux/usb.h>
+#include <linux/if_ether.h>
 
 #include "osdep_service.h"
 #include "drv_types.h"
 
 
-#include "if_ether.h"
 #include "ip.h"
 #include "rtl871x_byteorder.h"
 #include "wifi.h"
Signature · 1 line
1.7.9.1
#2 lore raw

PATCH 2/3 staging: wean rtl8712 off of its ancient duplicate of ip.h

In reply to Paul Gortmaker

This driver should not be carrying around ancient copies of headers like <linux/ip.h> for its own use. Mapping it onto the mainline one uncovers no build issues.

Cc Larry Finger <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/rtl8712/ip.h           |  137 --------------------------------
 drivers/staging/rtl8712/rtl8712_recv.c |    2 +-
 drivers/staging/rtl8712/rtl871x_recv.c |    2 +-
 drivers/staging/rtl8712/xmit_linux.c   |    3 +-
 4 files changed, 3 insertions(+), 141 deletions(-)
 delete mode 100644 drivers/staging/rtl8712/ip.h
drivers/staging/rtl8712/ip.h deleted +0 -0
deleted file mode 100644
index f37b0f8..0000000
drivers/staging/rtl8712/rtl8712_recv.c +1 -1
index b2a7714..e975d0a 100644
@@ -29,12 +29,12 @@
 #define _RTL8712_RECV_C_
 
 #include <linux/if_ether.h>
+#include <linux/ip.h>
 
 #include "osdep_service.h"
 #include "drv_types.h"
 #include "recv_osdep.h"
 #include "mlme_osdep.h"
-#include "ip.h"
 #include "ethernet.h"
 #include "usb_ops.h"
 #include "wifi.h"
drivers/staging/rtl8712/rtl871x_recv.c +1 -1
index 7376abb..c9d1743 100644
@@ -28,6 +28,7 @@
 
 #define _RTL871X_RECV_C_
 
+#include <linux/ip.h>
 #include <linux/slab.h>
 #include <linux/if_ether.h>
 #include <linux/kmemleak.h>
@@ -36,7 +37,6 @@
 #include "drv_types.h"
 #include "recv_osdep.h"
 #include "mlme_osdep.h"
-#include "ip.h"
 #include "ethernet.h"
 #include "usb_ops.h"
 #include "wifi.h"
drivers/staging/rtl8712/xmit_linux.c +1 -2
index d27f652..c6943c5 100644
@@ -29,13 +29,12 @@
 #define _XMIT_OSDEP_C_
 
 #include <linux/usb.h>
+#include <linux/ip.h>
 #include <linux/if_ether.h>
 
 #include "osdep_service.h"
 #include "drv_types.h"
 
-
-#include "ip.h"
 #include "rtl871x_byteorder.h"
 #include "wifi.h"
 #include "mlme_osdep.h"
Signature · 1 line
1.7.9.1
#3 lore raw

PATCH 3/3 staging: delete all duplicated endian crap from rtl8712 driver

In reply to Paul Gortmaker

This driver had headers like big_endian.h, little_endian.h, swab.h and yet we can throw them all in the trash can and the thing still builds on x86-64 and ppc, just by deleting the references to the deleted files.

Cc Larry Finger <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/rtl8712/big_endian.h        |   94 --------------
 drivers/staging/rtl8712/generic.h           |  178 ---------------------------
 drivers/staging/rtl8712/hal_init.c          |    1 -
 drivers/staging/rtl8712/little_endian.h     |   94 --------------
 drivers/staging/rtl8712/osdep_service.h     |    2 -
 drivers/staging/rtl8712/rtl8712_cmd.c       |    1 -
 drivers/staging/rtl8712/rtl8712_xmit.c      |    1 -
 drivers/staging/rtl8712/rtl871x_byteorder.h |   32 -----
 drivers/staging/rtl8712/rtl871x_cmd.c       |    1 -
 drivers/staging/rtl8712/rtl871x_xmit.c      |    1 -
 drivers/staging/rtl8712/swab.h              |  131 --------------------
 drivers/staging/rtl8712/usb_ops.c           |    1 -
 drivers/staging/rtl8712/wifi.h              |    1 -
 drivers/staging/rtl8712/xmit_linux.c        |    1 -
 14 files changed, 0 insertions(+), 539 deletions(-)
 delete mode 100644 drivers/staging/rtl8712/big_endian.h
 delete mode 100644 drivers/staging/rtl8712/generic.h
 delete mode 100644 drivers/staging/rtl8712/little_endian.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_byteorder.h
 delete mode 100644 drivers/staging/rtl8712/swab.h
drivers/staging/rtl8712/big_endian.h deleted +0 -0
deleted file mode 100644
index b16f8ec..0000000
drivers/staging/rtl8712/generic.h deleted +0 -0
deleted file mode 100644
index 8868c9f..0000000
drivers/staging/rtl8712/hal_init.c +0 -1
index cc893c0..cb9d4cf 100644
@@ -36,7 +36,6 @@
 
 #include "osdep_service.h"
 #include "drv_types.h"
-#include "rtl871x_byteorder.h"
 #include "usb_osintf.h"
 
 #define FWBUFF_ALIGN_SZ 512
drivers/staging/rtl8712/little_endian.h deleted +0 -0
deleted file mode 100644
index cd57d6c..0000000
drivers/staging/rtl8712/osdep_service.h +0 -2
index cabf774..f1ccc7e 100644
@@ -106,8 +106,6 @@ static inline void _set_workitem(_workitem *pwork)
 	schedule_work(pwork);
 }
 
-#include "rtl871x_byteorder.h"
-
 #ifndef BIT
 	#define BIT(x)	(1 << (x))
 #endif
drivers/staging/rtl8712/rtl8712_cmd.c +0 -1
index 9f6ebc4..b518505 100644
@@ -50,7 +50,6 @@
 #include "drv_types.h"
 #include "recv_osdep.h"
 #include "mlme_osdep.h"
-#include "rtl871x_byteorder.h"
 #include "rtl871x_ioctl_set.h"
 
 static void check_hw_pbc(struct _adapter *padapter)
drivers/staging/rtl8712/rtl8712_xmit.c +0 -1
index 6933319..3d23514 100644
@@ -30,7 +30,6 @@
 
 #include "osdep_service.h"
 #include "drv_types.h"
-#include "rtl871x_byteorder.h"
 #include "wifi.h"
 #include "osdep_intf.h"
 #include "usb_ops.h"
drivers/staging/rtl8712/rtl871x_byteorder.h deleted +0 -0
deleted file mode 100644
index bd3703b..0000000
drivers/staging/rtl8712/rtl871x_cmd.c +0 -1
index d77388b..659683e 100644
@@ -50,7 +50,6 @@
 #include "drv_types.h"
 #include "recv_osdep.h"
 #include "mlme_osdep.h"
-#include "rtl871x_byteorder.h"
 
 /*
 Caller and the r8712_cmd_thread can protect cmd_q by spin_lock.
drivers/staging/rtl8712/rtl871x_xmit.c +0 -1
index aa57e77..1d3f8b7 100644
@@ -30,7 +30,6 @@
 
 #include "osdep_service.h"
 #include "drv_types.h"
-#include "rtl871x_byteorder.h"
 #include "wifi.h"
 #include "osdep_intf.h"
 #include "usb_ops.h"
drivers/staging/rtl8712/swab.h deleted +0 -0
deleted file mode 100644
index f127818..0000000
drivers/staging/rtl8712/usb_ops.c +0 -1
index 5a8b0eb..c03508d 100644
@@ -33,7 +33,6 @@
 #include "osdep_intf.h"
 #include "usb_ops.h"
 #include "recv_osdep.h"
-#include "rtl871x_byteorder.h"
 
 static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr)
 {
drivers/staging/rtl8712/wifi.h +0 -1
index 277398c..793443e 100644
@@ -26,7 +26,6 @@
 #ifndef _WIFI_H_
 #define _WIFI_H_
 
-#include "rtl871x_byteorder.h"
 #include <linux/compiler.h>
 
 #ifdef BIT
drivers/staging/rtl8712/xmit_linux.c +0 -1
index c6943c5..65542cb 100644
@@ -35,7 +35,6 @@
 #include "osdep_service.h"
 #include "drv_types.h"
 
-#include "rtl871x_byteorder.h"
 #include "wifi.h"
 #include "mlme_osdep.h"
 #include "xmit_osdep.h"
Signature · 1 line
1.7.9.1
#4 lore raw
In reply to Paul Gortmaker
Quoted 8 lines · Paul Gortmaker

A git grep happened to lead me into this dir, and once there I couldn't simply leave and pretend I didn't see the stuff that I saw.

There were duplicated basic networking headers like if_ether.h and ip.h (of course, some ancient versions, too). And a whole whack of boilerplate endian handling functionality duplicated too.

I forced myself to stop looking after that.

Yes, it's a mess, thanks for working on cleaning it up, even a little bit, it all helps.

Quoted 7 lines

Anyway, a trivial redirection onto mainline's networking headers in the proper include dir, and a deletion of any references to the endian headers and the thing still happily builds on x86_64 and ppc even after shitcanning seven useless files.

These three commits are against May 8th's linux-next tree. I've used "-D" to hide the line-by-line content of the deletions.

Can you regenerate these with the full deletion content? There have been some spelling fixes in these files, and your patches do not apply due to them. I can hand-edit the patches if you regenerate it.

Or if you rebase on the last linux-next tree, that will pick those changes up and then I can apply these properly.

thanks,

greg k-h

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

[Re: [PATCH 0/3] staging: delete duplicated files/functionality in rtl8712] On 10/05/2012 (Thu 09:54) Greg Kroah-Hartman wrote:

[...]

Quoted 6 lines

Can you regenerate these with the full deletion content? There have been some spelling fixes in these files, and your patches do not apply due to them. I can hand-edit the patches if you regenerate it.

Or if you rebase on the last linux-next tree, that will pick those changes up and then I can apply these properly.

I've rebased it onto your staging-next of today, so it should be hopefully seamless for you now.

Thanks,
Paul.
---

The following changes since commit 0e545f6d165ad0180b0d04fe1291f6f6268047ff:

staging: rts5139: remove unused variable option.ww_enable (2012-05-10 09:57:21 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.git rtl8712-staging-next

for you to fetch changes up to 9a0fbbb52ab08017ac51aceef76514799837f4b0:

staging: delete all duplicated endian crap from rtl8712 driver (2012-05-10 13:10:03 -0400)

----------------------------------------------------------------
Paul Gortmaker (3):
staging: wean rtl8712 off of its ancient duplicate of if_ether.h
staging: wean rtl8712 off of its ancient duplicate of ip.h
staging: delete all duplicated endian crap from rtl8712 driver

 drivers/staging/rtl8712/big_endian.h        |   94 --------------
 drivers/staging/rtl8712/generic.h           |  178 ---------------------------
 drivers/staging/rtl8712/hal_init.c          |    1 -
 drivers/staging/rtl8712/if_ether.h          |  141 ---------------------
 drivers/staging/rtl8712/ip.h                |  137 --------------------
 drivers/staging/rtl8712/little_endian.h     |   94 --------------
 drivers/staging/rtl8712/osdep_service.h     |    2 -
 drivers/staging/rtl8712/rtl8712_cmd.c       |    1 -
 drivers/staging/rtl8712/rtl8712_recv.c      |    5 +-
 drivers/staging/rtl8712/rtl8712_xmit.c      |    1 -
 drivers/staging/rtl8712/rtl871x_byteorder.h |   32 -----
 drivers/staging/rtl8712/rtl871x_cmd.c       |    1 -
 drivers/staging/rtl8712/rtl871x_recv.c      |    4 +-
 drivers/staging/rtl8712/rtl871x_xmit.c      |    1 -
 drivers/staging/rtl8712/swab.h              |  131 --------------------
 drivers/staging/rtl8712/usb_ops.c           |    1 -
 drivers/staging/rtl8712/wifi.h              |    1 -
 drivers/staging/rtl8712/xmit_linux.c        |    6 +-
 18 files changed, 7 insertions(+), 824 deletions(-)
 delete mode 100644 drivers/staging/rtl8712/big_endian.h
 delete mode 100644 drivers/staging/rtl8712/generic.h
 delete mode 100644 drivers/staging/rtl8712/if_ether.h
 delete mode 100644 drivers/staging/rtl8712/ip.h
 delete mode 100644 drivers/staging/rtl8712/little_endian.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_byteorder.h
 delete mode 100644 drivers/staging/rtl8712/swab.h

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 8 lines · Paul Gortmaker

[Re: [PATCH 0/3] staging: delete duplicated files/functionality in rtl8712] On 10/05/2012 (Thu 09:54) Greg Kroah-Hartman wrote:

[...]

Quoted 4 lines

Can you regenerate these with the full deletion content? There have been some spelling fixes in these files, and your patches do not apply due to them. I can hand-edit the patches if you regenerate it.

Quoted 5 lines
Quoted 2 lines

Or if you rebase on the last linux-next tree, that will pick those changes up and then I can apply these properly.

I've rebased it onto your staging-next of today, so it should be hopefully seamless for you now.

Yes, that was even easier, now pulled and pushed out, thanks.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html