[2.6 patch] drivers/net/wan/: possible cleanups

2005-09-01 Thread Adrian Bunk
This patch contains possible cleanups including the following:
- make needlessly global code static
- #if 0 the following unused global function:
  - sdladrv.c: sdla_intde
- remove the following unused global variable:
  - lmc_media.c: lmc_t1_cables
- remove the following unneeded EXPORT_SYMBOL's:
  - cycx_drv.c: cycx_inten
  - sdladrv.c: sdla_inten
  - sdladrv.c: sdla_intde
  - sdladrv.c: sdla_intack
  - sdladrv.c: sdla_intr
  - syncppp.c: sppp_input
  - syncppp.c: sppp_change_mtu

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

This patch was already sent on:
- 31 May 2005
- 18 Apr 2005

 drivers/net/wan/cycx_drv.c  |7 +-
 drivers/net/wan/cycx_main.c |2 
 drivers/net/wan/dscc4.c |   14 ++---
 drivers/net/wan/farsync.c   |   24 
 drivers/net/wan/hdlc_fr.c   |2 
 drivers/net/wan/lmc/lmc_debug.c |   10 +--
 drivers/net/wan/lmc/lmc_media.c |8 --
 drivers/net/wan/pc300.h |   16 -
 drivers/net/wan/pc300_drv.c |   87 
 drivers/net/wan/pc300_tty.c |   18 +++---
 drivers/net/wan/sdla.c  |   20 +++
 drivers/net/wan/sdladrv.c   |   16 ++---
 drivers/net/wan/syncppp.c   |   10 +--
 include/linux/cycx_drv.h|1 
 include/linux/sdladrv.h |4 -
 include/net/syncppp.h   |1 
 16 files changed, 101 insertions(+), 139 deletions(-)

--- linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h.old  2005-02-16 
19:14:39.0 +0100
+++ linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h  2005-02-16 
19:14:46.0 +0100
@@ -60,6 +60,5 @@
 extern int cycx_poke(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
 extern int cycx_exec(void __iomem *addr);
 
-extern void cycx_inten(struct cycx_hw *hw);
 extern void cycx_intr(struct cycx_hw *hw);
 #endif /* _CYCX_DRV_H */
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c.old2005-02-16 
19:14:55.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c2005-02-16 
19:15:35.0 +0100
@@ -110,7 +110,7 @@
  * < 0 error.
  * Context:process */
 
-int __init cycx_drv_init(void)
+static int __init cycx_drv_init(void)
 {
printk(KERN_INFO "%s v%u.%u %s\n", fullname, MOD_VERSION, MOD_RELEASE,
 copyright);
@@ -120,7 +120,7 @@
 
 /* Module 'remove' entry point.
  * o release all remaining system resources */
-void cycx_drv_cleanup(void)
+static void cycx_drv_cleanup(void)
 {
 }
 
@@ -185,8 +185,7 @@
 }
 
 /* Enable interrupt generation.  */
-EXPORT_SYMBOL(cycx_inten);
-void cycx_inten(struct cycx_hw *hw)
+static void cycx_inten(struct cycx_hw *hw)
 {
writeb(0, hw->dpmbase);
 }
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c.old   2005-02-16 
19:46:47.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c   2005-02-16 
19:47:00.0 +0100
@@ -103,7 +103,7 @@
  * < 0 error.
  * Context:process
  */
-int __init cycx_init(void)
+static int __init cycx_init(void)
 {
int cnt, err = -ENOMEM;
 
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c.old 2005-02-16 
23:57:37.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c 2005-02-17 
00:00:26.0 +0100
@@ -74,11 +74,11 @@
 /*
  * Modules parameters and associated varaibles
  */
-int fst_txq_low = FST_LOW_WATER_MARK;
-int fst_txq_high = FST_HIGH_WATER_MARK;
-int fst_max_reads = 7;
-int fst_excluded_cards = 0;
-int fst_excluded_list[FST_MAX_CARDS];
+static int fst_txq_low = FST_LOW_WATER_MARK;
+static int fst_txq_high = FST_HIGH_WATER_MARK;
+static int fst_max_reads = 7;
+static int fst_excluded_cards = 0;
+static int fst_excluded_list[FST_MAX_CARDS];
 
 module_param(fst_txq_low, int, 0);
 module_param(fst_txq_high, int, 0);
@@ -572,13 +572,13 @@
 static void fst_process_tx_work_q(unsigned long work_q);
 static void fst_process_int_work_q(unsigned long work_q);
 
-DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
-DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
+static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
+static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
 
-struct fst_card_info *fst_card_array[FST_MAX_CARDS];
-spinlock_t fst_work_q_lock;
-u64 fst_work_txq;
-u64 fst_work_intq;
+static struct fst_card_info *fst_card_array[FST_MAX_CARDS];
+static spinlock_t fst_work_q_lock;
+static u64 fst_work_txq;
+static u64 fst_work_intq;
 
 static void
 fst_q_work_item(u64 * queue, int card_index)
@@ -1498,7 +1498,7 @@
  *  The interrupt service routine
  *  Dev_id is our fst_card_info pointer
  */
-irqreturn_t
+static irqreturn_t
 fst_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
struct fst_card_info *card;
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/hdlc_fr.c.old 2005-02-17 
00:00:38.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/hdlc_fr.c 2005-02-17 
00:00:46.0 +0100
@@ -347,7 +347,7 @@
 
 
 
-int pvc_ioctl(st

[2.6 patch] drivers/net/wan/: possible cleanups

2005-04-18 Thread Adrian Bunk
On Mon, Apr 18, 2005 at 01:55:06PM +0100, Alan Cox wrote:
> On Llu, 2005-04-18 at 00:47, Adrian Bunk wrote:
> > Are there any external drivers using these exports, and if there are, 
> > why aren't they in the kernel?
> 
> Its a standard API
> 
> > If there aren't and someone will at some time in the future need them, 
> > re-adding the exports will be trivial.
> 
> Really, you will spotaneously magically make them appear in old kernels
> that end users have just like that ?
> 
> Your argument doesn't hold water. Its an API for drivers so that people
> can add 85x30 card drivers using DMA in this fashion. Its an API so they
> can add them to *EXISTING* kernels without users being forced to
> recompile/wait for the vendor to update their tree/upgrade to a new
> release.

OK, updated patch below.

> Alan

cu
Adrian


<--  snip  -->


This patch contains possible cleanups including the following:
- make needlessly global code static
- #if 0 the following unused global function:
  - sdladrv.c: sdla_intde
- remove the following unused global variable:
  - lmc_media.c: lmc_t1_cables
- remove the following unneeded EXPORT_SYMBOL's:
  - cycx_drv.c: cycx_inten
  - sdladrv.c: sdla_inten
  - sdladrv.c: sdla_intde
  - sdladrv.c: sdla_intack
  - sdladrv.c: sdla_intr
  - syncppp.c: sppp_input
  - syncppp.c: sppp_change_mtu

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

 drivers/net/wan/cycx_drv.c  |7 +-
 drivers/net/wan/cycx_main.c |2 
 drivers/net/wan/dscc4.c |   14 ++---
 drivers/net/wan/farsync.c   |   24 
 drivers/net/wan/hdlc_fr.c   |2 
 drivers/net/wan/lmc/lmc_debug.c |   10 +--
 drivers/net/wan/lmc/lmc_media.c |8 --
 drivers/net/wan/pc300.h |   16 -
 drivers/net/wan/pc300_drv.c |   87 
 drivers/net/wan/pc300_tty.c |   18 +++---
 drivers/net/wan/sdla.c  |   20 +++
 drivers/net/wan/sdladrv.c   |   16 ++---
 drivers/net/wan/syncppp.c   |   10 +--
 include/linux/cycx_drv.h|1 
 include/linux/sdladrv.h |4 -
 include/net/syncppp.h   |1 
 16 files changed, 101 insertions(+), 139 deletions(-)

--- linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h.old  2005-02-16 
19:14:39.0 +0100
+++ linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h  2005-02-16 
19:14:46.0 +0100
@@ -60,6 +60,5 @@
 extern int cycx_poke(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
 extern int cycx_exec(void __iomem *addr);
 
-extern void cycx_inten(struct cycx_hw *hw);
 extern void cycx_intr(struct cycx_hw *hw);
 #endif /* _CYCX_DRV_H */
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c.old2005-02-16 
19:14:55.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c2005-02-16 
19:15:35.0 +0100
@@ -110,7 +110,7 @@
  * < 0 error.
  * Context:process */
 
-int __init cycx_drv_init(void)
+static int __init cycx_drv_init(void)
 {
printk(KERN_INFO "%s v%u.%u %s\n", fullname, MOD_VERSION, MOD_RELEASE,
 copyright);
@@ -120,7 +120,7 @@
 
 /* Module 'remove' entry point.
  * o release all remaining system resources */
-void cycx_drv_cleanup(void)
+static void cycx_drv_cleanup(void)
 {
 }
 
@@ -185,8 +185,7 @@
 }
 
 /* Enable interrupt generation.  */
-EXPORT_SYMBOL(cycx_inten);
-void cycx_inten(struct cycx_hw *hw)
+static void cycx_inten(struct cycx_hw *hw)
 {
writeb(0, hw->dpmbase);
 }
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c.old   2005-02-16 
19:46:47.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c   2005-02-16 
19:47:00.0 +0100
@@ -103,7 +103,7 @@
  * < 0 error.
  * Context:process
  */
-int __init cycx_init(void)
+static int __init cycx_init(void)
 {
int cnt, err = -ENOMEM;
 
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c.old 2005-02-16 
23:57:37.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c 2005-02-17 
00:00:26.0 +0100
@@ -74,11 +74,11 @@
 /*
  * Modules parameters and associated varaibles
  */
-int fst_txq_low = FST_LOW_WATER_MARK;
-int fst_txq_high = FST_HIGH_WATER_MARK;
-int fst_max_reads = 7;
-int fst_excluded_cards = 0;
-int fst_excluded_list[FST_MAX_CARDS];
+static int fst_txq_low = FST_LOW_WATER_MARK;
+static int fst_txq_high = FST_HIGH_WATER_MARK;
+static int fst_max_reads = 7;
+static int fst_excluded_cards = 0;
+static int fst_excluded_list[FST_MAX_CARDS];
 
 module_param(fst_txq_low, int, 0);
 module_param(fst_txq_high, int, 0);
@@ -572,13 +572,13 @@
 static void fst_process_tx_work_q(unsigned long work_q);
 static void fst_process_int_work_q(unsigned long work_q);
 
-DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
-DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
+static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
+static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
 
-struct fst_card_info *fs

Re: [2.6 patch] drivers/net/wan/: possible cleanups

2005-04-18 Thread Alan Cox
On Llu, 2005-04-18 at 00:47, Adrian Bunk wrote:
> Are there any external drivers using these exports, and if there are, 
> why aren't they in the kernel?

Its a standard API

> If there aren't and someone will at some time in the future need them, 
> re-adding the exports will be trivial.

Really, you will spotaneously magically make them appear in old kernels
that end users have just like that ?

Your argument doesn't hold water. Its an API for drivers so that people
can add 85x30 card drivers using DMA in this fashion. Its an API so they
can add them to *EXISTING* kernels without users being forced to
recompile/wait for the vendor to update their tree/upgrade to a new
release.

Alan

-
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: [2.6 patch] drivers/net/wan/: possible cleanups

2005-04-17 Thread Adrian Bunk
On Fri, Apr 15, 2005 at 06:49:56PM +0100, Alan Cox wrote:
> On Gwe, 2005-04-15 at 00:20, Adrian Bunk wrote:
> > On Sun, Mar 27, 2005 at 05:38:38PM +0100, Alan Cox wrote:
> > > On Sul, 2005-03-27 at 15:34, Adrian Bunk wrote:
> > > >   - syncppp.c: sppp_input
> > > >   - syncppp.c: sppp_change_mtu
> > > >   - z85230.c: z8530_dma_sync
> > > >   - z85230.c: z8530_txdma_sync
> > > 
> > > Please leave the z85230 ones at least. They are an intentional part of
> > > the external API for writing other 85230 card drivers.
> > 
> > If they are part of an API, why aren't the prototypes for them in any 
> > header file?
> 
> They were once. I guess that got "tided" at some point, possibly long
> ago even before submission.
>...

Are there any external drivers using these exports, and if there are, 
why aren't they in the kernel?

If there aren't and someone will at some time in the future need them, 
re-adding the exports will be trivial.

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-
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: [2.6 patch] drivers/net/wan/: possible cleanups

2005-04-15 Thread Alan Cox
On Gwe, 2005-04-15 at 00:20, Adrian Bunk wrote:
> On Sun, Mar 27, 2005 at 05:38:38PM +0100, Alan Cox wrote:
> > On Sul, 2005-03-27 at 15:34, Adrian Bunk wrote:
> > >   - syncppp.c: sppp_input
> > >   - syncppp.c: sppp_change_mtu
> > >   - z85230.c: z8530_dma_sync
> > >   - z85230.c: z8530_txdma_sync
> > 
> > Please leave the z85230 ones at least. They are an intentional part of
> > the external API for writing other 85230 card drivers.
> 
> If they are part of an API, why aren't the prototypes for them in any 
> header file?

They were once. I guess that got "tided" at some point, possibly long
ago even before submission.

z8530_dma_sync and txdma_sync set up the device in DMA mode, or in DMA
one direction only mode. 

-
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: [2.6 patch] drivers/net/wan/: possible cleanups

2005-04-14 Thread Adrian Bunk
On Sun, Mar 27, 2005 at 05:38:38PM +0100, Alan Cox wrote:
> On Sul, 2005-03-27 at 15:34, Adrian Bunk wrote:
> >   - syncppp.c: sppp_input
> >   - syncppp.c: sppp_change_mtu
> >   - z85230.c: z8530_dma_sync
> >   - z85230.c: z8530_txdma_sync
> 
> Please leave the z85230 ones at least. They are an intentional part of
> the external API for writing other 85230 card drivers.

If they are part of an API, why aren't the prototypes for them in any 
header file?

> Alan

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-
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: [2.6 patch] drivers/net/wan/: possible cleanups

2005-03-27 Thread Alan Cox
On Sul, 2005-03-27 at 15:34, Adrian Bunk wrote:
>   - syncppp.c: sppp_input
>   - syncppp.c: sppp_change_mtu
>   - z85230.c: z8530_dma_sync
>   - z85230.c: z8530_txdma_sync

Please leave the z85230 ones at least. They are an intentional part of
the external API for writing other 85230 card drivers.

Alan

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


[2.6 patch] drivers/net/wan/: possible cleanups

2005-03-27 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
  - sdladrv.c: sdla_intde
- remove the following unused global variable:
  - lmc_media.c: lmc_t1_cables
- remove the following unneeded EXPORT_SYMBOL's:
  - cycx_drv.c: cycx_inten
  - sdladrv.c: sdla_inten
  - sdladrv.c: sdla_intde
  - sdladrv.c: sdla_intack
  - sdladrv.c: sdla_intr
  - syncppp.c: sppp_input
  - syncppp.c: sppp_change_mtu
  - z85230.c: z8530_dma_sync
  - z85230.c: z8530_txdma_sync

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

This patch was already sent on:
- 11 Mar 2005
- 19 Feb 2005

 drivers/net/wan/cycx_drv.c  |7 +-
 drivers/net/wan/cycx_main.c |2 
 drivers/net/wan/farsync.c   |   24 
 drivers/net/wan/hdlc_fr.c   |2 
 drivers/net/wan/lmc/lmc_media.c |8 --
 drivers/net/wan/pc300.h |   16 -
 drivers/net/wan/pc300_drv.c |   87 
 drivers/net/wan/sdla.c  |   20 +++
 drivers/net/wan/sdladrv.c   |   16 ++---
 drivers/net/wan/syncppp.c   |   10 +--
 drivers/net/wan/z85230.c|8 --
 include/linux/cycx_drv.h|1 
 include/linux/sdladrv.h |4 -
 include/net/syncppp.h   |1 

--- linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h.old  2005-02-16 
19:14:39.0 +0100
+++ linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h  2005-02-16 
19:14:46.0 +0100
@@ -60,6 +60,5 @@
 extern int cycx_poke(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
 extern int cycx_exec(void __iomem *addr);
 
-extern void cycx_inten(struct cycx_hw *hw);
 extern void cycx_intr(struct cycx_hw *hw);
 #endif /* _CYCX_DRV_H */
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c.old2005-02-16 
19:14:55.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c2005-02-16 
19:15:35.0 +0100
@@ -110,7 +110,7 @@
  * < 0 error.
  * Context:process */
 
-int __init cycx_drv_init(void)
+static int __init cycx_drv_init(void)
 {
printk(KERN_INFO "%s v%u.%u %s\n", fullname, MOD_VERSION, MOD_RELEASE,
 copyright);
@@ -120,7 +120,7 @@
 
 /* Module 'remove' entry point.
  * o release all remaining system resources */
-void cycx_drv_cleanup(void)
+static void cycx_drv_cleanup(void)
 {
 }
 
@@ -185,8 +185,7 @@
 }
 
 /* Enable interrupt generation.  */
-EXPORT_SYMBOL(cycx_inten);
-void cycx_inten(struct cycx_hw *hw)
+static void cycx_inten(struct cycx_hw *hw)
 {
writeb(0, hw->dpmbase);
 }
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c.old   2005-02-16 
19:46:47.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c   2005-02-16 
19:47:00.0 +0100
@@ -103,7 +103,7 @@
  * < 0 error.
  * Context:process
  */
-int __init cycx_init(void)
+static int __init cycx_init(void)
 {
int cnt, err = -ENOMEM;
 
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c.old 2005-02-16 
23:57:37.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c 2005-02-17 
00:00:26.0 +0100
@@ -74,11 +74,11 @@
 /*
  * Modules parameters and associated varaibles
  */
-int fst_txq_low = FST_LOW_WATER_MARK;
-int fst_txq_high = FST_HIGH_WATER_MARK;
-int fst_max_reads = 7;
-int fst_excluded_cards = 0;
-int fst_excluded_list[FST_MAX_CARDS];
+static int fst_txq_low = FST_LOW_WATER_MARK;
+static int fst_txq_high = FST_HIGH_WATER_MARK;
+static int fst_max_reads = 7;
+static int fst_excluded_cards = 0;
+static int fst_excluded_list[FST_MAX_CARDS];
 
 module_param(fst_txq_low, int, 0);
 module_param(fst_txq_high, int, 0);
@@ -572,13 +572,13 @@
 static void fst_process_tx_work_q(unsigned long work_q);
 static void fst_process_int_work_q(unsigned long work_q);
 
-DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
-DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
+static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
+static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
 
-struct fst_card_info *fst_card_array[FST_MAX_CARDS];
-spinlock_t fst_work_q_lock;
-u64 fst_work_txq;
-u64 fst_work_intq;
+static struct fst_card_info *fst_card_array[FST_MAX_CARDS];
+static spinlock_t fst_work_q_lock;
+static u64 fst_work_txq;
+static u64 fst_work_intq;
 
 static void
 fst_q_work_item(u64 * queue, int card_index)
@@ -1498,7 +1498,7 @@
  *  The interrupt service routine
  *  Dev_id is our fst_card_info pointer
  */
-irqreturn_t
+static irqreturn_t
 fst_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
struct fst_card_info *card;
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/hdlc_fr.c.old 2005-02-17 
00:00:38.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/hdlc_fr.c 2005-02-17 
00:00:46.0 +0100
@@ -347,7 +347,7 @@
 
 
 
-int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+static int pvc_ioctl(struct net_device *dev, str

Re: [2.6 patch] drivers/net/wan/: possible cleanups

2005-03-22 Thread Jeff Garzik
BTW, please send to netdev@oss.sgi.com not linux-net.
-
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/


[2.6 patch] drivers/net/wan/: possible cleanups

2005-03-11 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
  - sdladrv.c: sdla_intde
- remove the following unused global variable:
  - lmc_media.c: lmc_t1_cables
- remove the following unneeded EXPORT_SYMBOL's:
  - cycx_drv.c: cycx_inten
  - sdladrv.c: sdla_inten
  - sdladrv.c: sdla_intde
  - sdladrv.c: sdla_intack
  - sdladrv.c: sdla_intr
  - syncppp.c: sppp_input
  - syncppp.c: sppp_change_mtu
  - z85230.c: z8530_dma_sync
  - z85230.c: z8530_txdma_sync

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

This patch was already sent on:
- 19 Feb 2005

 drivers/net/wan/cycx_drv.c  |7 +-
 drivers/net/wan/cycx_main.c |2 
 drivers/net/wan/farsync.c   |   24 
 drivers/net/wan/hdlc_fr.c   |2 
 drivers/net/wan/lmc/lmc_media.c |8 --
 drivers/net/wan/pc300.h |   16 -
 drivers/net/wan/pc300_drv.c |   87 
 drivers/net/wan/sdla.c  |   20 +++
 drivers/net/wan/sdladrv.c   |   16 ++---
 drivers/net/wan/syncppp.c   |   10 +--
 drivers/net/wan/z85230.c|8 --
 include/linux/cycx_drv.h|1 
 include/linux/sdladrv.h |4 -
 include/net/syncppp.h   |1 

--- linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h.old  2005-02-16 
19:14:39.0 +0100
+++ linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h  2005-02-16 
19:14:46.0 +0100
@@ -60,6 +60,5 @@
 extern int cycx_poke(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
 extern int cycx_exec(void __iomem *addr);
 
-extern void cycx_inten(struct cycx_hw *hw);
 extern void cycx_intr(struct cycx_hw *hw);
 #endif /* _CYCX_DRV_H */
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c.old2005-02-16 
19:14:55.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c2005-02-16 
19:15:35.0 +0100
@@ -110,7 +110,7 @@
  * < 0 error.
  * Context:process */
 
-int __init cycx_drv_init(void)
+static int __init cycx_drv_init(void)
 {
printk(KERN_INFO "%s v%u.%u %s\n", fullname, MOD_VERSION, MOD_RELEASE,
 copyright);
@@ -120,7 +120,7 @@
 
 /* Module 'remove' entry point.
  * o release all remaining system resources */
-void cycx_drv_cleanup(void)
+static void cycx_drv_cleanup(void)
 {
 }
 
@@ -185,8 +185,7 @@
 }
 
 /* Enable interrupt generation.  */
-EXPORT_SYMBOL(cycx_inten);
-void cycx_inten(struct cycx_hw *hw)
+static void cycx_inten(struct cycx_hw *hw)
 {
writeb(0, hw->dpmbase);
 }
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c.old   2005-02-16 
19:46:47.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c   2005-02-16 
19:47:00.0 +0100
@@ -103,7 +103,7 @@
  * < 0 error.
  * Context:process
  */
-int __init cycx_init(void)
+static int __init cycx_init(void)
 {
int cnt, err = -ENOMEM;
 
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c.old 2005-02-16 
23:57:37.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c 2005-02-17 
00:00:26.0 +0100
@@ -74,11 +74,11 @@
 /*
  * Modules parameters and associated varaibles
  */
-int fst_txq_low = FST_LOW_WATER_MARK;
-int fst_txq_high = FST_HIGH_WATER_MARK;
-int fst_max_reads = 7;
-int fst_excluded_cards = 0;
-int fst_excluded_list[FST_MAX_CARDS];
+static int fst_txq_low = FST_LOW_WATER_MARK;
+static int fst_txq_high = FST_HIGH_WATER_MARK;
+static int fst_max_reads = 7;
+static int fst_excluded_cards = 0;
+static int fst_excluded_list[FST_MAX_CARDS];
 
 module_param(fst_txq_low, int, 0);
 module_param(fst_txq_high, int, 0);
@@ -572,13 +572,13 @@
 static void fst_process_tx_work_q(unsigned long work_q);
 static void fst_process_int_work_q(unsigned long work_q);
 
-DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
-DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
+static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
+static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
 
-struct fst_card_info *fst_card_array[FST_MAX_CARDS];
-spinlock_t fst_work_q_lock;
-u64 fst_work_txq;
-u64 fst_work_intq;
+static struct fst_card_info *fst_card_array[FST_MAX_CARDS];
+static spinlock_t fst_work_q_lock;
+static u64 fst_work_txq;
+static u64 fst_work_intq;
 
 static void
 fst_q_work_item(u64 * queue, int card_index)
@@ -1498,7 +1498,7 @@
  *  The interrupt service routine
  *  Dev_id is our fst_card_info pointer
  */
-irqreturn_t
+static irqreturn_t
 fst_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
struct fst_card_info *card;
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/hdlc_fr.c.old 2005-02-17 
00:00:38.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/hdlc_fr.c 2005-02-17 
00:00:46.0 +0100
@@ -347,7 +347,7 @@
 
 
 
-int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+static int pvc_ioctl(struct net_device *dev, struct ifreq *ifr

[2.6 patch] drivers/net/wan/: possible cleanups

2005-02-19 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
  - sdladrv.c: sdla_intde
- remove the following unused global variable:
  - lmc_media.c: lmc_t1_cables
- remove the following unneeded EXPORT_SYMBOL's:
  - cycx_drv.c: cycx_inten
  - sdladrv.c: sdla_inten
  - sdladrv.c: sdla_intde
  - sdladrv.c: sdla_intack
  - sdladrv.c: sdla_intr
  - syncppp.c: sppp_input
  - syncppp.c: sppp_change_mtu
  - z85230.c: z8530_dma_sync
  - z85230.c: z8530_txdma_sync

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

 drivers/net/wan/cycx_drv.c  |7 +-
 drivers/net/wan/cycx_main.c |2 
 drivers/net/wan/farsync.c   |   24 
 drivers/net/wan/hdlc_fr.c   |2 
 drivers/net/wan/lmc/lmc_media.c |8 --
 drivers/net/wan/pc300.h |   16 -
 drivers/net/wan/pc300_drv.c |   87 
 drivers/net/wan/sdla.c  |   20 +++
 drivers/net/wan/sdladrv.c   |   16 ++---
 drivers/net/wan/syncppp.c   |   10 +--
 drivers/net/wan/z85230.c|8 --
 include/linux/cycx_drv.h|1 
 include/linux/sdladrv.h |4 -
 include/net/syncppp.h   |1 

--- linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h.old  2005-02-16 
19:14:39.0 +0100
+++ linux-2.6.11-rc3-mm2-full/include/linux/cycx_drv.h  2005-02-16 
19:14:46.0 +0100
@@ -60,6 +60,5 @@
 extern int cycx_poke(struct cycx_hw *hw, u32 addr, void *buf, u32 len);
 extern int cycx_exec(void __iomem *addr);
 
-extern void cycx_inten(struct cycx_hw *hw);
 extern void cycx_intr(struct cycx_hw *hw);
 #endif /* _CYCX_DRV_H */
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c.old2005-02-16 
19:14:55.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_drv.c2005-02-16 
19:15:35.0 +0100
@@ -110,7 +110,7 @@
  * < 0 error.
  * Context:process */
 
-int __init cycx_drv_init(void)
+static int __init cycx_drv_init(void)
 {
printk(KERN_INFO "%s v%u.%u %s\n", fullname, MOD_VERSION, MOD_RELEASE,
 copyright);
@@ -120,7 +120,7 @@
 
 /* Module 'remove' entry point.
  * o release all remaining system resources */
-void cycx_drv_cleanup(void)
+static void cycx_drv_cleanup(void)
 {
 }
 
@@ -185,8 +185,7 @@
 }
 
 /* Enable interrupt generation.  */
-EXPORT_SYMBOL(cycx_inten);
-void cycx_inten(struct cycx_hw *hw)
+static void cycx_inten(struct cycx_hw *hw)
 {
writeb(0, hw->dpmbase);
 }
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c.old   2005-02-16 
19:46:47.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/cycx_main.c   2005-02-16 
19:47:00.0 +0100
@@ -103,7 +103,7 @@
  * < 0 error.
  * Context:process
  */
-int __init cycx_init(void)
+static int __init cycx_init(void)
 {
int cnt, err = -ENOMEM;
 
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c.old 2005-02-16 
23:57:37.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/farsync.c 2005-02-17 
00:00:26.0 +0100
@@ -74,11 +74,11 @@
 /*
  * Modules parameters and associated varaibles
  */
-int fst_txq_low = FST_LOW_WATER_MARK;
-int fst_txq_high = FST_HIGH_WATER_MARK;
-int fst_max_reads = 7;
-int fst_excluded_cards = 0;
-int fst_excluded_list[FST_MAX_CARDS];
+static int fst_txq_low = FST_LOW_WATER_MARK;
+static int fst_txq_high = FST_HIGH_WATER_MARK;
+static int fst_max_reads = 7;
+static int fst_excluded_cards = 0;
+static int fst_excluded_list[FST_MAX_CARDS];
 
 module_param(fst_txq_low, int, 0);
 module_param(fst_txq_high, int, 0);
@@ -572,13 +572,13 @@
 static void fst_process_tx_work_q(unsigned long work_q);
 static void fst_process_int_work_q(unsigned long work_q);
 
-DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
-DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
+static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
+static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
 
-struct fst_card_info *fst_card_array[FST_MAX_CARDS];
-spinlock_t fst_work_q_lock;
-u64 fst_work_txq;
-u64 fst_work_intq;
+static struct fst_card_info *fst_card_array[FST_MAX_CARDS];
+static spinlock_t fst_work_q_lock;
+static u64 fst_work_txq;
+static u64 fst_work_intq;
 
 static void
 fst_q_work_item(u64 * queue, int card_index)
@@ -1498,7 +1498,7 @@
  *  The interrupt service routine
  *  Dev_id is our fst_card_info pointer
  */
-irqreturn_t
+static irqreturn_t
 fst_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
struct fst_card_info *card;
--- linux-2.6.11-rc3-mm2-full/drivers/net/wan/hdlc_fr.c.old 2005-02-17 
00:00:38.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/wan/hdlc_fr.c 2005-02-17 
00:00:46.0 +0100
@@ -347,7 +347,7 @@
 
 
 
-int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+static int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
pvc_device *pvc = dev_to_