* [2.6 patch] SCSI aacraid: make some code static
@ 2004-11-15 1:49 Adrian Bunk
2004-11-15 14:26 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2004-11-15 1:49 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, linux-kernel
The patch below makes some needlessly global code static.
It also removes the completely unused global function
aac_consumer_avail.
diffstat output:
drivers/scsi/aacraid/aachba.c | 10 +++++-----
drivers/scsi/aacraid/aacraid.h | 2 --
drivers/scsi/aacraid/commctrl.c | 4 ++--
drivers/scsi/aacraid/comminit.c | 2 +-
drivers/scsi/aacraid/commsup.c | 8 +-------
drivers/scsi/aacraid/linit.c | 2 +-
drivers/scsi/aacraid/sa.c | 6 +++---
7 files changed, 13 insertions(+), 21 deletions(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/aacraid.h.old 2004-11-13 16:35:24.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/aacraid.h 2004-11-13 16:39:15.000000000 +0100
@@ -1564,11 +1564,9 @@
void fib_map_free(struct aac_dev *dev);
void fib_free(struct fib * context);
void fib_init(struct fib * context);
-void fib_dealloc(struct fib * context);
void aac_printf(struct aac_dev *dev, u32 val);
int fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int reply, fib_callback callback, void *ctxt);
int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry);
-int aac_consumer_avail(struct aac_dev * dev, struct aac_queue * q);
void aac_consumer_free(struct aac_dev * dev, struct aac_queue * q, u32 qnum);
int fib_complete(struct fib * context);
#define fib_data(fibctx) ((void *)(fibctx)->hw_fib->data)
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/aachba.c.old 2004-11-13 16:35:30.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/aachba.c 2004-11-13 16:36:39.000000000 +0100
@@ -560,10 +560,10 @@
inqstrcpy ("V1.0", str->prl);
}
-void set_sense(u8 *sense_buf, u8 sense_key, u8 sense_code,
- u8 a_sense_code, u8 incorrect_length,
- u8 bit_pointer, u16 field_pointer,
- u32 residue)
+static void set_sense(u8 *sense_buf, u8 sense_key, u8 sense_code,
+ u8 a_sense_code, u8 incorrect_length,
+ u8 bit_pointer, u16 field_pointer,
+ u32 residue)
{
sense_buf[0] = 0xF0; /* Sense data valid, err code 70h (current error) */
sense_buf[1] = 0; /* Segment number, always zero */
@@ -785,7 +785,7 @@
aac_io_done(scsicmd);
}
-int aac_read(struct scsi_cmnd * scsicmd, int cid)
+static int aac_read(struct scsi_cmnd * scsicmd, int cid)
{
u32 lba;
u32 count;
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/commctrl.c.old 2004-11-13 16:37:30.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/commctrl.c 2004-11-13 16:37:54.000000000 +0100
@@ -403,7 +403,7 @@
*
*/
-int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
+static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
{
struct fib* srbfib;
int status;
@@ -621,7 +621,7 @@
};
-int aac_get_pci_info(struct aac_dev* dev, void __user *arg)
+static int aac_get_pci_info(struct aac_dev* dev, void __user *arg)
{
struct aac_pci_info pci_info;
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/comminit.c.old 2004-11-13 16:38:09.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/comminit.c 2004-11-13 16:38:18.000000000 +0100
@@ -204,7 +204,7 @@
* 0 - If there were errors initing. This is a fatal error.
*/
-int aac_comm_init(struct aac_dev * dev)
+static int aac_comm_init(struct aac_dev * dev)
{
unsigned long hdrsize = (sizeof(u32) * NUMBER_OF_COMM_QUEUES) * 2;
unsigned long queuesize = sizeof(struct aac_entry) * TOTAL_QUEUE_ENTRIES;
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/commsup.c.old 2004-11-13 16:38:49.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/commsup.c 2004-11-13 16:39:30.000000000 +0100
@@ -210,7 +210,7 @@
* caller.
*/
-void fib_dealloc(struct fib * fibptr)
+static void fib_dealloc(struct fib * fibptr)
{
struct hw_fib *hw_fib = fibptr->hw_fib;
if(hw_fib->header.StructType != FIB_MAGIC)
@@ -566,12 +566,6 @@
return(status);
}
-int aac_consumer_avail(struct aac_dev *dev, struct aac_queue * q)
-{
- return (le32_to_cpu(*q->headers.producer) != le32_to_cpu(*q->headers.consumer));
-}
-
-
/**
* aac_consumer_free - free consumer entry
* @dev: Adapter
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/linit.c.old 2004-11-13 16:39:44.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/linit.c 2004-11-13 16:40:16.000000000 +0100
@@ -228,7 +228,7 @@
* Returns a static string describing the device in question
*/
-const char *aac_info(struct Scsi_Host *shost)
+static const char *aac_info(struct Scsi_Host *shost)
{
struct aac_dev *dev = (struct aac_dev *)shost->hostdata;
return aac_drivers[dev->cardtype].name;
--- linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/sa.c.old 2004-11-13 16:40:32.000000000 +0100
+++ linux-2.6.10-rc1-mm5-full/drivers/scsi/aacraid/sa.c 2004-11-13 16:41:08.000000000 +0100
@@ -90,7 +90,7 @@
* the host.
*/
-void aac_sa_enable_interrupt(struct aac_dev *dev, u32 event)
+static void aac_sa_enable_interrupt(struct aac_dev *dev, u32 event)
{
switch (event) {
@@ -121,7 +121,7 @@
* the host.
*/
-void aac_sa_disable_interrupt (struct aac_dev *dev, u32 event)
+static void aac_sa_disable_interrupt (struct aac_dev *dev, u32 event)
{
switch (event) {
@@ -151,7 +151,7 @@
* Notify the adapter of an event
*/
-void aac_sa_notify_adapter(struct aac_dev *dev, u32 event)
+static void aac_sa_notify_adapter(struct aac_dev *dev, u32 event)
{
switch (event) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.6 patch] SCSI aacraid: make some code static
2004-11-15 1:49 [2.6 patch] SCSI aacraid: make some code static Adrian Bunk
@ 2004-11-15 14:26 ` Alan Cox
2004-11-15 17:31 ` Adrian Bunk
0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2004-11-15 14:26 UTC (permalink / raw)
To: Adrian Bunk; +Cc: James Bottomley, linux-scsi, Linux Kernel Mailing List
On Llu, 2004-11-15 at 01:49, Adrian Bunk wrote:
> The patch below makes some needlessly global code static.
>
> It also removes the completely unused global function
> aac_consumer_avail.
Looks good to me but make sure you send a copy on to the maintainer
<mark_salyzyn@adaptec.com> as he'll want it for the development drivers
(and we want that because there are a pile of new cards 8))
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [2.6 patch] SCSI aacraid: make some code static
@ 2004-11-15 16:53 Salyzyn, Mark
0 siblings, 0 replies; 4+ messages in thread
From: Salyzyn, Mark @ 2004-11-15 16:53 UTC (permalink / raw)
To: Alan Cox, Adrian Bunk
Cc: James Bottomley, linux-scsi, Linux Kernel Mailing List
I've already incorporated the changes :-) I probably should have chimed
in with my support for this patch.
Sincerely -- Mark Salyzyn
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Alan Cox
Sent: Monday, November 15, 2004 9:27 AM
To: Adrian Bunk
Cc: James Bottomley; linux-scsi@vger.kernel.org; Linux Kernel Mailing
List
Subject: Re: [2.6 patch] SCSI aacraid: make some code static
On Llu, 2004-11-15 at 01:49, Adrian Bunk wrote:
> The patch below makes some needlessly global code static.
>
> It also removes the completely unused global function
> aac_consumer_avail.
Looks good to me but make sure you send a copy on to the maintainer
<mark_salyzyn@adaptec.com> as he'll want it for the development drivers
(and we want that because there are a pile of new cards 8))
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.6 patch] SCSI aacraid: make some code static
2004-11-15 14:26 ` Alan Cox
@ 2004-11-15 17:31 ` Adrian Bunk
0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-11-15 17:31 UTC (permalink / raw)
To: Alan Cox, Salyzyn, Mark
Cc: James Bottomley, linux-scsi, Linux Kernel Mailing List
On Mon, Nov 15, 2004 at 02:26:31PM +0000, Alan Cox wrote:
> On Llu, 2004-11-15 at 01:49, Adrian Bunk wrote:
> > The patch below makes some needlessly global code static.
> >
> > It also removes the completely unused global function
> > aac_consumer_avail.
>
> Looks good to me but make sure you send a copy on to the maintainer
> <mark_salyzyn@adaptec.com> as he'll want it for the development drivers
> (and we want that because there are a pile of new cards 8))
If Mark wants an explicit Cc on aacraid patches, he should add his email
address to the entry in MAINTAINERS.
cu
Adrian
BTW: I've seen Mark has already incorporated my patch.
--
"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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-15 17:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-15 1:49 [2.6 patch] SCSI aacraid: make some code static Adrian Bunk
2004-11-15 14:26 ` Alan Cox
2004-11-15 17:31 ` Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2004-11-15 16:53 Salyzyn, Mark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).