Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[2.6 patch] drivers/net/lp486e.c: make some code static

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


bunk at stusta

Feb 17, 2005, 12:54 PM

Post #1 of 3 (406 views)
Permalink
[2.6 patch] drivers/net/lp486e.c: make some code static

This patch makes some needlessly global code static.

Signed-off-by: Adrian Bunk <bunk [at] stusta>

---

drivers/net/lp486e.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

--- linux-2.6.11-rc3-mm2-full/drivers/net/lp486e.c.old 2005-02-16 16:08:34.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/lp486e.c 2005-02-16 16:15:33.000000000 +0100
@@ -112,8 +112,10 @@
CmdDiagnose = 7
};

-char *CUcmdnames[8] = { "NOP", "IASetup", "Configure", "MulticastList",
- "Tx", "TDR", "Dump", "Diagnose" };
+#if 0
+static char *CUcmdnames[8] = { "NOP", "IASetup", "Configure", "MulticastList",
+ "Tx", "TDR", "Dump", "Diagnose" };
+#endif

/* Status word bits */
#define STAT_CX 0x8000 /* The CU finished executing a command
@@ -960,7 +962,7 @@
(unsigned char) add[12], (unsigned char) add[13]);
}

-int __init lp486e_probe(struct net_device *dev) {
+static int __init lp486e_probe(struct net_device *dev) {
struct i596_private *lp;
unsigned char eth_addr[6] = { 0, 0xaa, 0, 0, 0, 0 };
unsigned char *bios;

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


jgarzik at pobox

Feb 20, 2005, 5:47 PM

Post #2 of 3 (384 views)
Permalink
Re: [2.6 patch] drivers/net/lp486e.c: make some code static [In reply to]

Adrian Bunk wrote:
> This patch makes some needlessly global code static.
>
> Signed-off-by: Adrian Bunk <bunk [at] stusta>
>
> ---
>
> drivers/net/lp486e.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> --- linux-2.6.11-rc3-mm2-full/drivers/net/lp486e.c.old 2005-02-16 16:08:34.000000000 +0100
> +++ linux-2.6.11-rc3-mm2-full/drivers/net/lp486e.c 2005-02-16 16:15:33.000000000 +0100
> @@ -112,8 +112,10 @@
> CmdDiagnose = 7
> };
>
> -char *CUcmdnames[8] = { "NOP", "IASetup", "Configure", "MulticastList",
> - "Tx", "TDR", "Dump", "Diagnose" };
> +#if 0
> +static char *CUcmdnames[8] = { "NOP", "IASetup", "Configure", "MulticastList",
> + "Tx", "TDR", "Dump", "Diagnose" };
> +#endif

Need const.

Jeff



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


bunk at stusta

Feb 21, 2005, 6:47 AM

Post #3 of 3 (373 views)
Permalink
[2.6 patch] drivers/net/lp486e.c: make some code static [In reply to]

On Sun, Feb 20, 2005 at 08:47:14PM -0500, Jeff Garzik wrote:
>...
> >+#if 0
> >+static char *CUcmdnames[8] = { "NOP", "IASetup", "Configure",
> >"MulticastList",
> >+ "Tx", "TDR", "Dump", "Diagnose" };
> >+#endif
>
> Need const.


Updated patch:


<-- snip -->


This patch makes some needlessly global code static and makes
CUcmdnames const.

Signed-off-by: Adrian Bunk <bunk [at] stusta>

---

drivers/net/lp486e.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

--- linux-2.6.11-rc3-mm2-full/drivers/net/lp486e.c.old 2005-02-16 16:08:34.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/net/lp486e.c 2005-02-16 16:15:33.000000000 +0100
@@ -112,8 +112,10 @@
CmdDiagnose = 7
};

-char *CUcmdnames[8] = { "NOP", "IASetup", "Configure", "MulticastList",
- "Tx", "TDR", "Dump", "Diagnose" };
+#if 0
+static const char *CUcmdnames[8] = { "NOP", "IASetup", "Configure", "MulticastList",
+ "Tx", "TDR", "Dump", "Diagnose" };
+#endif

/* Status word bits */
#define STAT_CX 0x8000 /* The CU finished executing a command
@@ -960,7 +962,7 @@
(unsigned char) add[12], (unsigned char) add[13]);
}

-int __init lp486e_probe(struct net_device *dev) {
+static int __init lp486e_probe(struct net_device *dev) {
struct i596_private *lp;
unsigned char eth_addr[6] = { 0, 0xaa, 0, 0, 0, 0 };
unsigned char *bios;


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

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.