SCSI aacraid: make some code static
Subsystems (2)
PATCH 1/1 SCSI aacraid: make some code static
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(-)
drivers/scsi/aacraid/aacraid.h renamed from drivers/scsi/aacraid/aacraid.h.old +0 -2
@@ -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)
drivers/scsi/aacraid/aachba.c renamed from drivers/scsi/aacraid/aachba.c.old +5 -5
@@ -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;
drivers/scsi/aacraid/commctrl.c renamed from drivers/scsi/aacraid/commctrl.c.old +2 -2
@@ -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;
drivers/scsi/aacraid/comminit.c renamed from drivers/scsi/aacraid/comminit.c.old +1 -1
@@ -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 ;
drivers/scsi/aacraid/commsup.c renamed from drivers/scsi/aacraid/commsup.c.old +1 -7
@@ -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
drivers/scsi/aacraid/linit.c renamed from drivers/scsi/aacraid/linit.c.old +1 -1
@@ -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;
drivers/scsi/aacraid/sa.c renamed from drivers/scsi/aacraid/sa.c.old +3 -3
@@ -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) {
Quoted 4 lines · Adrian Bunk
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 <[email protected]> as he'll want it for the development drivers (and we want that because there are a pile of new cards 8))
Quoted 9 lines · Alan Cox
Quoted 4 lines · Adrian Bunk
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 <[email protected]> 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.
Signature · 4 lines
"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