Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc(). Also reformat the surrounding clutter.Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
---
Per your request, Andrew, a while ago. It builds, runs, passes
checkpatch.pl and sparse. No semantic changes.Please apply,
Maciej
patch-mips-2.6.23-rc5-20070904-sb1250-mac-typedef-7
diff -up --recursive --new-file linux-mips-2.6.23-rc5-20070904.macro/drivers/net/sb1250-mac.c linux-mips-2.6.23-rc5-20070904/drivers/net/sb1250-mac.c
--- linux-mips-2.6.23-rc5-20070904.macro/drivers/net/sb1250-mac.c 2007-07-10 04:57:46.000000000 +0000
+++ linux-mips-2.6.23-rc5-20070904/drivers/net/sb1250-mac.c 2007-09-10 01:01:09.000000000 +0000
@@ -140,17 +140,17 @@ MODULE_PARM_DESC(int_timeout_rx, "RX tim
********************************************************************* */-typedef enum { sbmac_speed_auto, sbmac_speed_10,
- sbmac_speed_100, sbmac_speed_1000 } sbmac_speed_t;
+enum sbmac_speed { sbmac_speed_auto, sbmac_speed_10,
+ sbmac_speed_100, sbmac_speed_1000 };-typedef enum { sbmac_duplex_auto, sbmac_duplex_half,
- sbmac_duplex_full } sbmac_duplex_t;
+enum sbmac_duplex { sbmac_duplex_auto, sbmac_duplex_half,
+ sbmac_duplex_full };-typedef enum { sbmac_fc_auto, sbmac_fc_disabled, sbmac_fc_frame,
- sbmac_fc_collision, sbmac_fc_carrier } sbmac_fc_t;
+enum sbmac_fc { sbmac_fc_auto, sbmac_fc_disabled, sbmac_fc_frame,
+ sbmac_fc_collision, sbmac_fc_carrier } sbmac_fc_t;-typedef enum { sbmac_state_uninit, sbmac_state_off, sbmac_state_on,
- sbmac_state_broken } sbmac_state_t;
+enum sbmac_state { sbmac_state_uninit, sbmac_state_off, sbmac_state_on,
+ sbmac_state_broken };/**********************************************************************
@@ -176,55 +176,61 @@ typedef enum { sbmac_state_uninit, sbmac
* DMA Descriptor structure
********************************************************************* */-typedef struct sbdmadscr...
ACK, but patch does not apply cleanly to netdev-2.6.git#upstream (nor -mm)
-
Hmm, works fine with linux-2.6.git#master. I do not recall any recent
activity with this driver -- I wonder what the difference is. Let me
see...Maciej
-
Hmm... HEAD du jour has no differences for the sb1250-mac between lmo
and kernel.org.Ralf
-
Net driver patches should apply on top of netdev-2.6.git#upstream, which
is where changes to net drivers are queued for the next release.The closer we get to the merge window, the greater the diff between
netdev-2.6.git#upstream and linux-2.6.git#master, so
linux-2.6.git#master is not a useful comparison.Jeff
-
Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc(). Also reformat the surrounding clutter.Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
---I can see Andrew has done some changes to the patch and applied it
anyway, but here's a version I generated against your tree. Please feel
free to choose either.You may be pleased (or less so) to hear that the version of sb1250-mac.c
in your tree does not even build (because of
42d53d6be113f974d8152979c88e1061b953bd12) and the patch below does not
address it. I ran out of time in the evening, but I will send you a fix
shortly. To be honest I think even with bulk changes it may be worth
checking whether they do not break stuff. ;-)Maciej
patch-netdev-2.6.23-rc6-20070913-sb1250-mac-typedef-8
diff -up --recursive --new-file linux-netdev-2.6.23-rc6-20070913.macro/drivers/net/sb1250-mac.c linux-netdev-2.6.23-rc6-20070913/drivers/net/sb1250-mac.c
--- linux-netdev-2.6.23-rc6-20070913.macro/drivers/net/sb1250-mac.c 2007-09-13 17:27:52.000000000 +0000
+++ linux-netdev-2.6.23-rc6-20070913/drivers/net/sb1250-mac.c 2007-09-13 23:44:45.000000000 +0000
@@ -140,17 +140,17 @@ MODULE_PARM_DESC(int_timeout_rx, "RX tim
********************************************************************* */-typedef enum { sbmac_speed_auto, sbmac_speed_10,
- sbmac_speed_100, sbmac_speed_1000 } sbmac_speed_t;
+enum sbmac_speed { sbmac_speed_auto, sbmac_speed_10,
+ sbmac_speed_100, sbmac_speed_1000 };-typedef enum { sbmac_duplex_auto, sbmac_duplex_half,
- sbmac_duplex_full } sbmac_duplex_t;
+enum sbmac_duplex { sbmac_duplex_auto, sbmac_duplex_half,
+ sbmac_duplex_full };-typedef enum { sbmac_fc_auto, sbmac_fc_disabled, sbmac_fc_frame,
- sbmac_fc_collision, sbmac_fc_carrier } sbmac_fc_t;
+enum sbmac_fc { sbmac_fc_auto, sbmac_fc_disabled, sbmac_fc_frame,
+ sbmac_fc_collision, sbmac_fc_carrier } sbmac_fc_t;-typedef enum { sbmac_state_uninit, sbmac_state_off, sbmac_...
hrm. I cannot get this to apply on top of linux-2.6.git,
netdev-2.6.git#upstream (prior to net-2.6.24 rebase) or
netdev-2.6.git#upstream (after net-2.6.24 rebase)ACK the changes
-
It applies on top of current -mm. It seems to apply to a copy of
netdev-2.6.git#upstream that I have got, but I am probably missing
something... If I try to clone your repository again I get:$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/linux-netdev-2.6.git linux
Initialized empty Git repository in /home/macro/GIT-other/linux-netdev/linux/.git/
fatal: The remote end hung up unexpectedly
fetch-pack from 'git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/linux-netdev-2.6.git' failed.
$For linux-2.6.git the patch-mips-2.6.23-rc5-20070904-sb1250-mac-typedef-7
version applies as submitted originally; I can resubmit this one if you
like.I am slowly getting lost and I have another big chunk for sb1250-mac.c
waiting to be put on top of these...Maciej
-
Remove the "linux-" prefix.
Jeff
-
Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc(). Also reformat the surrounding clutter.Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
---Hmm, it looks like a bad application of `sed' by myself. Sorry for the
noise.Maciej
patch-netdev-2.6.23-rc6-20070920-sb1250-mac-typedef-9
diff -up --recursive --new-file linux-netdev-2.6.23-rc6-20070920.macro/drivers/net/sb1250-mac.c linux-netdev-2.6.23-rc6-20070920/drivers/net/sb1250-mac.c
--- linux-netdev-2.6.23-rc6-20070920.macro/drivers/net/sb1250-mac.c 2007-09-20 17:55:14.000000000 +0000
+++ linux-netdev-2.6.23-rc6-20070920/drivers/net/sb1250-mac.c 2007-09-20 18:09:18.000000000 +0000
@@ -140,17 +140,17 @@ MODULE_PARM_DESC(int_timeout_rx, "RX tim
********************************************************************* */-typedef enum { sbmac_speed_auto, sbmac_speed_10,
- sbmac_speed_100, sbmac_speed_1000 } sbmac_speed_t;
+enum sbmac_speed { sbmac_speed_auto, sbmac_speed_10,
+ sbmac_speed_100, sbmac_speed_1000 };-typedef enum { sbmac_duplex_auto, sbmac_duplex_half,
- sbmac_duplex_full } sbmac_duplex_t;
+enum sbmac_duplex { sbmac_duplex_auto, sbmac_duplex_half,
+ sbmac_duplex_full };-typedef enum { sbmac_fc_auto, sbmac_fc_disabled, sbmac_fc_frame,
- sbmac_fc_collision, sbmac_fc_carrier } sbmac_fc_t;
+enum sbmac_fc { sbmac_fc_auto, sbmac_fc_disabled, sbmac_fc_frame,
+ sbmac_fc_collision, sbmac_fc_carrier } sbmac_fc_t;-typedef enum { sbmac_state_uninit, sbmac_state_off, sbmac_state_on,
- sbmac_state_broken } sbmac_state_t;
+enum sbmac_state { sbmac_state_uninit, sbmac_state_off, sbmac_state_on,
+ sbmac_state_broken };/**********************************************************************
@@ -176,55 +176,61 @@ typedef enum { sbmac_state_uninit, sbmac
* DMA Descriptor structure
********************************************************************* */-typedef struct sbdmadscr_s {
+struct sbdmadscr {
uint64_t ...
applied
-
One step closer to sanity for this driver. So it's got my ACK.
Ralf
-
| David Miller | Re: Slow DOWN, please!!! |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jan Engelhardt | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
