2006-01-05 22:40:01

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] scsi_transport_spi.c: make print_nego() static

This patch makes a needlessly global function static.


Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.15-mm1-full/drivers/scsi/scsi_transport_spi.c.old 2006-01-05 22:52:19.000000000 +0100
+++ linux-2.6.15-mm1-full/drivers/scsi/scsi_transport_spi.c 2006-01-05 22:52:28.000000000 +0100
@@ -1075,7 +1075,7 @@
/* 0x04 */ "Parallel Protocol Request"
};

-void print_nego(const unsigned char *msg, int per, int off, int width)
+static void print_nego(const unsigned char *msg, int per, int off, int width)
{
if (per) {
char buf[20];


2006-01-05 22:44:56

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [2.6 patch] scsi_transport_spi.c: make print_nego() static

On Thu, Jan 05, 2006 at 11:39:18PM +0100, Adrian Bunk wrote:
> This patch makes a needlessly global function static.

Sure, makes sense. Thanks.

2006-01-07 01:26:35

by Diego Calleja

[permalink] [raw]
Subject: Re: [2.6 patch] scsi_transport_spi.c: make print_nego() static

El Thu, 5 Jan 2006 23:39:18 +0100,
Adrian Bunk <[email protected]> escribi?:

> This patch makes a needlessly global function static.


Ok, so this is probably a stupid question and it may have been already
discussed but.....

Isn't possible that GCC would/will add an extension (a useful one) similar
to the visibility thing that c++ got in GCC 4.x? It somewhat weird
that we need to mark things static, instead of the contrary (marking
as global the things you want to make global, would be much nicer since
the functions made global would be the "API")