Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-28 Thread Jeff Garzik

Maciej W. Rozycki wrote:

 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
---
On Thu, 20 Sep 2007, Jeff Garzik wrote:


Remove the "linux-" prefix.


 Hmm, it looks like a bad application of `sed' by myself.  Sorry for the 
noise.


  Maciej


applied


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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-28 Thread Jeff Garzik

Maciej W. Rozycki wrote:

 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki [EMAIL PROTECTED]
---
On Thu, 20 Sep 2007, Jeff Garzik wrote:


Remove the linux- prefix.


 Hmm, it looks like a bad application of `sed' by myself.  Sorry for the 
noise.


  Maciej


applied


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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-20 Thread Maciej W. Rozycki
 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
---
On Thu, 20 Sep 2007, Jeff Garzik wrote:

> Remove the "linux-" prefix.

 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.0 +
+++ linux-netdev-2.6.23-rc6-20070920/drivers/net/sb1250-mac.c   2007-09-20 
18:09:18.0 +
@@ -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  dscr_a;
uint64_t  dscr_b;
-} sbdmadscr_t;
-
-typedef unsigned long paddr_t;
+};
 
 /**
  *  DMA Controller structure
  * */
 
-typedef struct sbmacdma_s {
+struct sbmacdma {
 
/*
 * This stuff is used to identify the channel and the registers
 * associated with it.
 */
-
-   struct sbmac_softc *sbdma_eth;  /* back pointer to associated MAC */
-   int  sbdma_channel; /* channel number */
-   int  sbdma_txdir;   /* direction (1=transmit) */
-   int  sbdma_maxdescr;/* total # of descriptors in ring */
+   struct sbmac_softc  *sbdma_eth; /* back pointer to associated
+  MAC */
+   int sbdma_channel;  /* channel number */
+   int sbdma_txdir;/* direction (1=transmit) */
+   int sbdma_maxdescr; /* total # of descriptors
+  in ring */
 #ifdef CONFIG_SBMAC_COALESCE
-   int  sbdma_int_pktcnt;  /* # descriptors rx/tx before 
interrupt*/
-   int  sbdma_int_timeout; /* # usec rx/tx interrupt */
+   int sbdma_int_pktcnt;
+   /* # descriptors rx/tx
+  before interrupt */
+   int sbdma_int_timeout;
+   /* # usec rx/tx interrupt */
 #endif
-
-   volatile void __iomem *sbdma_config0;   /* DMA config register 0 */
-   volatile void __iomem *sbdma_config1;   /* DMA config register 1 */
-   volatile void __iomem *sbdma_dscrbase;  /* Descriptor base address */
-   volatile void __iomem *sbdma_dscrcnt;   /* Descriptor count register */
-   volatile void __iomem *sbdma_curdscr;   /* current descriptor address */
-   volatile void __iomem *sbdma_oodpktlost;/* pkt drop (rx only) */
-
+   void __iomem*sbdma_config0; /* DMA config register 0 */
+   void __iomem*sbdma_config1; /* DMA config register 1 */
+   void __iomem*sbdma_dscrbase;
+   /* descriptor base address */
+   void __iomem*sbdma_dscrcnt; /* descriptor count register */
+   void __iomem*sbdma_curdscr; /* current descriptor
+  address */
+   void __iomem*sbdma_oodpktlost;
+   /* pkt drop (rx only) */
 
/*
 * This stuff is for maintenance of the ring
 

Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-20 Thread Jeff Garzik

Maciej W. Rozycki wrote:

On Thu, 20 Sep 2007, Jeff Garzik wrote:


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. ;-)

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)


 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.


Remove the "linux-" prefix.

Jeff



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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-20 Thread Maciej W. Rozycki
On Thu, 20 Sep 2007, Jeff Garzik wrote:

> > 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. ;-)
> 
> 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)

 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-20 Thread Maciej W. Rozycki
On Thu, 20 Sep 2007, Jeff Garzik wrote:

  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. ;-)
 
 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)

 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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-20 Thread Jeff Garzik

Maciej W. Rozycki wrote:

On Thu, 20 Sep 2007, Jeff Garzik wrote:


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. ;-)

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)


 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.


Remove the linux- prefix.

Jeff



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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-20 Thread Maciej W. Rozycki
 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki [EMAIL PROTECTED]
---
On Thu, 20 Sep 2007, Jeff Garzik wrote:

 Remove the linux- prefix.

 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.0 +
+++ linux-netdev-2.6.23-rc6-20070920/drivers/net/sb1250-mac.c   2007-09-20 
18:09:18.0 +
@@ -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  dscr_a;
uint64_t  dscr_b;
-} sbdmadscr_t;
-
-typedef unsigned long paddr_t;
+};
 
 /**
  *  DMA Controller structure
  * */
 
-typedef struct sbmacdma_s {
+struct sbmacdma {
 
/*
 * This stuff is used to identify the channel and the registers
 * associated with it.
 */
-
-   struct sbmac_softc *sbdma_eth;  /* back pointer to associated MAC */
-   int  sbdma_channel; /* channel number */
-   int  sbdma_txdir;   /* direction (1=transmit) */
-   int  sbdma_maxdescr;/* total # of descriptors in ring */
+   struct sbmac_softc  *sbdma_eth; /* back pointer to associated
+  MAC */
+   int sbdma_channel;  /* channel number */
+   int sbdma_txdir;/* direction (1=transmit) */
+   int sbdma_maxdescr; /* total # of descriptors
+  in ring */
 #ifdef CONFIG_SBMAC_COALESCE
-   int  sbdma_int_pktcnt;  /* # descriptors rx/tx before 
interrupt*/
-   int  sbdma_int_timeout; /* # usec rx/tx interrupt */
+   int sbdma_int_pktcnt;
+   /* # descriptors rx/tx
+  before interrupt */
+   int sbdma_int_timeout;
+   /* # usec rx/tx interrupt */
 #endif
-
-   volatile void __iomem *sbdma_config0;   /* DMA config register 0 */
-   volatile void __iomem *sbdma_config1;   /* DMA config register 1 */
-   volatile void __iomem *sbdma_dscrbase;  /* Descriptor base address */
-   volatile void __iomem *sbdma_dscrcnt;   /* Descriptor count register */
-   volatile void __iomem *sbdma_curdscr;   /* current descriptor address */
-   volatile void __iomem *sbdma_oodpktlost;/* pkt drop (rx only) */
-
+   void __iomem*sbdma_config0; /* DMA config register 0 */
+   void __iomem*sbdma_config1; /* DMA config register 1 */
+   void __iomem*sbdma_dscrbase;
+   /* descriptor base address */
+   void __iomem*sbdma_dscrcnt; /* descriptor count register */
+   void __iomem*sbdma_curdscr; /* current descriptor
+  address */
+   void __iomem*sbdma_oodpktlost;
+   /* pkt drop (rx only) */
 
/*
 * This stuff is for maintenance of the ring
 */
-
-  

Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-19 Thread Jeff Garzik

Maciej W. Rozycki wrote:

 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
---
On Thu, 13 Sep 2007, Jeff Garzik wrote:


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.


 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. ;-)


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

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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-19 Thread Jeff Garzik

Maciej W. Rozycki wrote:

 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki [EMAIL PROTECTED]
---
On Thu, 13 Sep 2007, Jeff Garzik wrote:


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.


 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. ;-)


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

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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-14 Thread Maciej W. Rozycki
 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
---
On Thu, 13 Sep 2007, Jeff Garzik wrote:

> 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.

 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.0 +
+++ linux-netdev-2.6.23-rc6-20070913/drivers/net/sb1250-mac.c   2007-09-13 
23:44:45.0 +
@@ -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  dscr_a;
uint64_t  dscr_b;
-} sbdmadscr_t;
-
-typedef unsigned long paddr_t;
+};
 
 /**
  *  DMA Controller structure
  * */
 
-typedef struct sbmacdma_s {
+struct sbmacdma {
 
/*
 * This stuff is used to identify the channel and the registers
 * associated with it.
 */
-
-   struct sbmac_softc *sbdma_eth;  /* back pointer to associated MAC */
-   int  sbdma_channel; /* channel number */
-   int  sbdma_txdir;   /* direction (1=transmit) */
-   int  sbdma_maxdescr;/* total # of descriptors in ring */
+   struct sbmac_softc  *sbdma_eth; /* back pointer to associated
+  MAC */
+   int sbdma_channel;  /* channel number */
+   int sbdma_txdir;/* direction (1=transmit) */
+   int sbdma_maxdescr; /* total # of descriptors
+  in ring */
 #ifdef CONFIG_SBMAC_COALESCE
-   int  sbdma_int_pktcnt;  /* # descriptors rx/tx before 
interrupt*/
-   int  sbdma_int_timeout; /* # usec rx/tx interrupt */
-#endif
-
-   volatile void __iomem *sbdma_config0;   /* DMA config register 0 */
-   volatile void __iomem *sbdma_config1;   /* DMA config register 1 */
-   volatile void __iomem *sbdma_dscrbase;  /* Descriptor base address */
-   volatile void __iomem *sbdma_dscrcnt;   /* Descriptor count register */
-   volatile void __iomem *sbdma_curdscr;   /* current descriptor address */
-   volatile void __iomem *sbdma_oodpktlost;/* pkt drop (rx only) */
-
+   int sbdma_int_pktcnt;
+   /* # descriptors rx/tx
+  before interrupt */
+   int sbdma_int_timeout;
+   /* # usec rx/tx interrupt */
+#endif
+   void __iomem*sbdma_config0; /* DMA config register 0 */
+   void __iomem  

Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-14 Thread Maciej W. Rozycki
 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki [EMAIL PROTECTED]
---
On Thu, 13 Sep 2007, Jeff Garzik wrote:

 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.

 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.0 +
+++ linux-netdev-2.6.23-rc6-20070913/drivers/net/sb1250-mac.c   2007-09-13 
23:44:45.0 +
@@ -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  dscr_a;
uint64_t  dscr_b;
-} sbdmadscr_t;
-
-typedef unsigned long paddr_t;
+};
 
 /**
  *  DMA Controller structure
  * */
 
-typedef struct sbmacdma_s {
+struct sbmacdma {
 
/*
 * This stuff is used to identify the channel and the registers
 * associated with it.
 */
-
-   struct sbmac_softc *sbdma_eth;  /* back pointer to associated MAC */
-   int  sbdma_channel; /* channel number */
-   int  sbdma_txdir;   /* direction (1=transmit) */
-   int  sbdma_maxdescr;/* total # of descriptors in ring */
+   struct sbmac_softc  *sbdma_eth; /* back pointer to associated
+  MAC */
+   int sbdma_channel;  /* channel number */
+   int sbdma_txdir;/* direction (1=transmit) */
+   int sbdma_maxdescr; /* total # of descriptors
+  in ring */
 #ifdef CONFIG_SBMAC_COALESCE
-   int  sbdma_int_pktcnt;  /* # descriptors rx/tx before 
interrupt*/
-   int  sbdma_int_timeout; /* # usec rx/tx interrupt */
-#endif
-
-   volatile void __iomem *sbdma_config0;   /* DMA config register 0 */
-   volatile void __iomem *sbdma_config1;   /* DMA config register 1 */
-   volatile void __iomem *sbdma_dscrbase;  /* Descriptor base address */
-   volatile void __iomem *sbdma_dscrcnt;   /* Descriptor count register */
-   volatile void __iomem *sbdma_curdscr;   /* current descriptor address */
-   volatile void __iomem *sbdma_oodpktlost;/* pkt drop (rx only) */
-
+   int sbdma_int_pktcnt;
+   /* # descriptors rx/tx
+  before interrupt */
+   int sbdma_int_timeout;
+   /* # usec rx/tx interrupt */
+#endif
+   void __iomem*sbdma_config0; /* DMA config register 0 */
+   void __iomem   

Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-13 Thread Jeff Garzik

Ralf Baechle wrote:

On Thu, Sep 13, 2007 at 03:13:06PM +0100, Maciej W. Rozycki wrote:

 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...


Hmm...  HEAD du jour has no differences for the sb1250-mac between lmo
and kernel.org.


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



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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-13 Thread Ralf Baechle
On Thu, Sep 13, 2007 at 03:13:06PM +0100, Maciej W. Rozycki wrote:

>  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...

Hmm...  HEAD du jour has no differences for the sb1250-mac between lmo
and kernel.org.

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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-13 Thread Maciej W. Rozycki
On Wed, 12 Sep 2007, Jeff Garzik wrote:

> > Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
> > kcalloc().  Also reformat the surrounding clutter.
> > 
> > Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
> > ---
> 
> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-13 Thread Maciej W. Rozycki
On Wed, 12 Sep 2007, Jeff Garzik wrote:

  Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
  kcalloc().  Also reformat the surrounding clutter.
  
  Signed-off-by: Maciej W. Rozycki [EMAIL PROTECTED]
  ---
 
 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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-13 Thread Ralf Baechle
On Thu, Sep 13, 2007 at 03:13:06PM +0100, Maciej W. Rozycki wrote:

  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...

Hmm...  HEAD du jour has no differences for the sb1250-mac between lmo
and kernel.org.

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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-13 Thread Jeff Garzik

Ralf Baechle wrote:

On Thu, Sep 13, 2007 at 03:13:06PM +0100, Maciej W. Rozycki wrote:

 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...


Hmm...  HEAD du jour has no differences for the sb1250-mac between lmo
and kernel.org.


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



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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-12 Thread Jeff Garzik

Maciej W. Rozycki wrote:

 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
---
 Per your request, Andrew, a while ago.  It builds, runs, passes 
checkpatch.pl and sparse.  No semantic changes.


 Please apply,

  Maciej


ACK, but patch does not apply cleanly to netdev-2.6.git#upstream (nor -mm)


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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-12 Thread Jeff Garzik

Maciej W. Rozycki wrote:

 Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
kcalloc().  Also reformat the surrounding clutter.

Signed-off-by: Maciej W. Rozycki [EMAIL PROTECTED]
---
 Per your request, Andrew, a while ago.  It builds, runs, passes 
checkpatch.pl and sparse.  No semantic changes.


 Please apply,

  Maciej


ACK, but patch does not apply cleanly to netdev-2.6.git#upstream (nor -mm)


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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-10 Thread Ralf Baechle
On Mon, Sep 10, 2007 at 01:20:38PM +0100, Maciej W. Rozycki wrote:

>  Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
> kcalloc().  Also reformat the surrounding clutter.
> 
> Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
> ---
>  Per your request, Andrew, a while ago.  It builds, runs, passes 
> checkpatch.pl and sparse.  No semantic changes.

One step closer to sanity for this driver.  So it's got my ACK.

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


Re: [PATCH] sb1250-mac.c: De-typedef, de-volatile, de-etc...

2007-09-10 Thread Ralf Baechle
On Mon, Sep 10, 2007 at 01:20:38PM +0100, Maciej W. Rozycki wrote:

  Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
 kcalloc().  Also reformat the surrounding clutter.
 
 Signed-off-by: Maciej W. Rozycki [EMAIL PROTECTED]
 ---
  Per your request, Andrew, a while ago.  It builds, runs, passes 
 checkpatch.pl and sparse.  No semantic changes.

One step closer to sanity for this driver.  So it's got my ACK.

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