[SCSI] libfc: fix sparse static and non-ANSI warnings

Fix sparse warning for non-ANSI function declaration.
Declare workqueue structs as static.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc:	Robert Love <robert.w.love@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Randy Dunlap 2011-01-28 16:03:57 -08:00 коммит произвёл James Bottomley
Родитель 52ee832195
Коммит 55204909bb
3 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -38,7 +38,7 @@ u16 fc_cpu_mask; /* cpu mask for possible cpus */
EXPORT_SYMBOL(fc_cpu_mask); EXPORT_SYMBOL(fc_cpu_mask);
static u16 fc_cpu_order; /* 2's power to represent total possible cpus */ static u16 fc_cpu_order; /* 2's power to represent total possible cpus */
static struct kmem_cache *fc_em_cachep; /* cache for exchanges */ static struct kmem_cache *fc_em_cachep; /* cache for exchanges */
struct workqueue_struct *fc_exch_workqueue; static struct workqueue_struct *fc_exch_workqueue;
/* /*
* Structure and function definitions for managing Fibre Channel Exchanges * Structure and function definitions for managing Fibre Channel Exchanges
@ -2357,7 +2357,7 @@ EXPORT_SYMBOL(fc_exch_init);
/** /**
* fc_setup_exch_mgr() - Setup an exchange manager * fc_setup_exch_mgr() - Setup an exchange manager
*/ */
int fc_setup_exch_mgr() int fc_setup_exch_mgr(void)
{ {
fc_em_cachep = kmem_cache_create("libfc_em", sizeof(struct fc_exch), fc_em_cachep = kmem_cache_create("libfc_em", sizeof(struct fc_exch),
0, SLAB_HWCACHE_ALIGN, NULL); 0, SLAB_HWCACHE_ALIGN, NULL);
@ -2395,7 +2395,7 @@ int fc_setup_exch_mgr()
/** /**
* fc_destroy_exch_mgr() - Destroy an exchange manager * fc_destroy_exch_mgr() - Destroy an exchange manager
*/ */
void fc_destroy_exch_mgr() void fc_destroy_exch_mgr(void)
{ {
destroy_workqueue(fc_exch_workqueue); destroy_workqueue(fc_exch_workqueue);
kmem_cache_destroy(fc_em_cachep); kmem_cache_destroy(fc_em_cachep);

Просмотреть файл

@ -42,7 +42,7 @@
#include "fc_libfc.h" #include "fc_libfc.h"
struct kmem_cache *scsi_pkt_cachep; static struct kmem_cache *scsi_pkt_cachep;
/* SRB state definitions */ /* SRB state definitions */
#define FC_SRB_FREE 0 /* cmd is free */ #define FC_SRB_FREE 0 /* cmd is free */
@ -2244,7 +2244,7 @@ void fc_fcp_destroy(struct fc_lport *lport)
} }
EXPORT_SYMBOL(fc_fcp_destroy); EXPORT_SYMBOL(fc_fcp_destroy);
int fc_setup_fcp() int fc_setup_fcp(void)
{ {
int rc = 0; int rc = 0;
@ -2260,7 +2260,7 @@ int fc_setup_fcp()
return rc; return rc;
} }
void fc_destroy_fcp() void fc_destroy_fcp(void)
{ {
if (scsi_pkt_cachep) if (scsi_pkt_cachep)
kmem_cache_destroy(scsi_pkt_cachep); kmem_cache_destroy(scsi_pkt_cachep);

Просмотреть файл

@ -58,7 +58,7 @@
#include "fc_libfc.h" #include "fc_libfc.h"
struct workqueue_struct *rport_event_queue; static struct workqueue_struct *rport_event_queue;
static void fc_rport_enter_flogi(struct fc_rport_priv *); static void fc_rport_enter_flogi(struct fc_rport_priv *);
static void fc_rport_enter_plogi(struct fc_rport_priv *); static void fc_rport_enter_plogi(struct fc_rport_priv *);
@ -1890,7 +1890,7 @@ EXPORT_SYMBOL(fc_rport_init);
/** /**
* fc_setup_rport() - Initialize the rport_event_queue * fc_setup_rport() - Initialize the rport_event_queue
*/ */
int fc_setup_rport() int fc_setup_rport(void)
{ {
rport_event_queue = create_singlethread_workqueue("fc_rport_eq"); rport_event_queue = create_singlethread_workqueue("fc_rport_eq");
if (!rport_event_queue) if (!rport_event_queue)
@ -1901,7 +1901,7 @@ int fc_setup_rport()
/** /**
* fc_destroy_rport() - Destroy the rport_event_queue * fc_destroy_rport() - Destroy the rport_event_queue
*/ */
void fc_destroy_rport() void fc_destroy_rport(void)
{ {
destroy_workqueue(rport_event_queue); destroy_workqueue(rport_event_queue);
} }