提交 7c9c6841 编写于 作者: B Bart Van Assche 提交者: James Bottomley

[SCSI] fcoe: Move fcoe_debug_logging from fcoe.h to fcoe.c

Move the definition of the global variable fcoe_debug_logging
from fcoe.h to fcoe.c. Avoid that sparse complains about missing
declarations for local functions or variables by declaring these
static.
Signed-off-by: NBart Van Assche <bvanassche@acm.org>
Reviewed-by: NYi Zou <yi.zou@intel.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 c6b21c93
...@@ -58,7 +58,11 @@ module_param_named(ddp_min, fcoe_ddp_min, uint, S_IRUGO | S_IWUSR); ...@@ -58,7 +58,11 @@ module_param_named(ddp_min, fcoe_ddp_min, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(ddp_min, "Minimum I/O size in bytes for " \ MODULE_PARM_DESC(ddp_min, "Minimum I/O size in bytes for " \
"Direct Data Placement (DDP)."); "Direct Data Placement (DDP).");
DEFINE_MUTEX(fcoe_config_mutex); unsigned int fcoe_debug_logging;
module_param_named(debug_logging, fcoe_debug_logging, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(debug_logging, "a bit mask of logging levels");
static DEFINE_MUTEX(fcoe_config_mutex);
static struct workqueue_struct *fcoe_wq; static struct workqueue_struct *fcoe_wq;
...@@ -67,8 +71,8 @@ static DECLARE_COMPLETION(fcoe_flush_completion); ...@@ -67,8 +71,8 @@ static DECLARE_COMPLETION(fcoe_flush_completion);
/* fcoe host list */ /* fcoe host list */
/* must only by accessed under the RTNL mutex */ /* must only by accessed under the RTNL mutex */
LIST_HEAD(fcoe_hostlist); static LIST_HEAD(fcoe_hostlist);
DEFINE_PER_CPU(struct fcoe_percpu_s, fcoe_percpu); static DEFINE_PER_CPU(struct fcoe_percpu_s, fcoe_percpu);
/* Function Prototypes */ /* Function Prototypes */
static int fcoe_reset(struct Scsi_Host *); static int fcoe_reset(struct Scsi_Host *);
...@@ -157,7 +161,7 @@ static struct libfc_function_template fcoe_libfc_fcn_templ = { ...@@ -157,7 +161,7 @@ static struct libfc_function_template fcoe_libfc_fcn_templ = {
.lport_set_port_id = fcoe_set_port_id, .lport_set_port_id = fcoe_set_port_id,
}; };
struct fc_function_template fcoe_nport_fc_functions = { static struct fc_function_template fcoe_nport_fc_functions = {
.show_host_node_name = 1, .show_host_node_name = 1,
.show_host_port_name = 1, .show_host_port_name = 1,
.show_host_supported_classes = 1, .show_host_supported_classes = 1,
...@@ -197,7 +201,7 @@ struct fc_function_template fcoe_nport_fc_functions = { ...@@ -197,7 +201,7 @@ struct fc_function_template fcoe_nport_fc_functions = {
.bsg_request = fc_lport_bsg_request, .bsg_request = fc_lport_bsg_request,
}; };
struct fc_function_template fcoe_vport_fc_functions = { static struct fc_function_template fcoe_vport_fc_functions = {
.show_host_node_name = 1, .show_host_node_name = 1,
.show_host_port_name = 1, .show_host_port_name = 1,
.show_host_supported_classes = 1, .show_host_supported_classes = 1,
...@@ -433,7 +437,7 @@ static inline void fcoe_interface_put(struct fcoe_interface *fcoe) ...@@ -433,7 +437,7 @@ static inline void fcoe_interface_put(struct fcoe_interface *fcoe)
* *
* Caller must be holding the RTNL mutex * Caller must be holding the RTNL mutex
*/ */
void fcoe_interface_cleanup(struct fcoe_interface *fcoe) static void fcoe_interface_cleanup(struct fcoe_interface *fcoe)
{ {
struct net_device *netdev = fcoe->netdev; struct net_device *netdev = fcoe->netdev;
struct fcoe_ctlr *fip = &fcoe->ctlr; struct fcoe_ctlr *fip = &fcoe->ctlr;
...@@ -748,7 +752,7 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev) ...@@ -748,7 +752,7 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev)
* *
* Returns: True for read types I/O, otherwise returns false. * Returns: True for read types I/O, otherwise returns false.
*/ */
bool fcoe_oem_match(struct fc_frame *fp) static bool fcoe_oem_match(struct fc_frame *fp)
{ {
struct fc_frame_header *fh = fc_frame_header_get(fp); struct fc_frame_header *fh = fc_frame_header_get(fp);
struct fcp_cmnd *fcp; struct fcp_cmnd *fcp;
...@@ -1107,7 +1111,7 @@ static int __init fcoe_if_init(void) ...@@ -1107,7 +1111,7 @@ static int __init fcoe_if_init(void)
* *
* Returns: 0 on success * Returns: 0 on success
*/ */
int __exit fcoe_if_exit(void) static int __exit fcoe_if_exit(void)
{ {
fc_release_transport(fcoe_nport_scsi_transport); fc_release_transport(fcoe_nport_scsi_transport);
fc_release_transport(fcoe_vport_scsi_transport); fc_release_transport(fcoe_vport_scsi_transport);
...@@ -1296,7 +1300,7 @@ static inline unsigned int fcoe_select_cpu(void) ...@@ -1296,7 +1300,7 @@ static inline unsigned int fcoe_select_cpu(void)
* *
* Returns: 0 for success * Returns: 0 for success
*/ */
int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
struct packet_type *ptype, struct net_device *olddev) struct packet_type *ptype, struct net_device *olddev)
{ {
struct fc_lport *lport; struct fc_lport *lport;
...@@ -1452,7 +1456,7 @@ static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen) ...@@ -1452,7 +1456,7 @@ static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen)
* *
* Return: 0 for success * Return: 0 for success
*/ */
int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
{ {
int wlen; int wlen;
u32 crc; u32 crc;
...@@ -1728,7 +1732,7 @@ static void fcoe_recv_frame(struct sk_buff *skb) ...@@ -1728,7 +1732,7 @@ static void fcoe_recv_frame(struct sk_buff *skb)
* *
* Return: 0 for success * Return: 0 for success
*/ */
int fcoe_percpu_receive_thread(void *arg) static int fcoe_percpu_receive_thread(void *arg)
{ {
struct fcoe_percpu_s *p = arg; struct fcoe_percpu_s *p = arg;
struct sk_buff *skb; struct sk_buff *skb;
...@@ -2146,7 +2150,7 @@ static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode) ...@@ -2146,7 +2150,7 @@ static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode)
* Returns: 0 if the ethtool query was successful * Returns: 0 if the ethtool query was successful
* -1 if the ethtool query failed * -1 if the ethtool query failed
*/ */
int fcoe_link_speed_update(struct fc_lport *lport) static int fcoe_link_speed_update(struct fc_lport *lport)
{ {
struct net_device *netdev = fcoe_netdev(lport); struct net_device *netdev = fcoe_netdev(lport);
struct ethtool_cmd ecmd; struct ethtool_cmd ecmd;
...@@ -2180,7 +2184,7 @@ int fcoe_link_speed_update(struct fc_lport *lport) ...@@ -2180,7 +2184,7 @@ int fcoe_link_speed_update(struct fc_lport *lport)
* Returns: 0 if link is UP and OK, -1 if not * Returns: 0 if link is UP and OK, -1 if not
* *
*/ */
int fcoe_link_ok(struct fc_lport *lport) static int fcoe_link_ok(struct fc_lport *lport)
{ {
struct net_device *netdev = fcoe_netdev(lport); struct net_device *netdev = fcoe_netdev(lport);
...@@ -2200,7 +2204,7 @@ int fcoe_link_ok(struct fc_lport *lport) ...@@ -2200,7 +2204,7 @@ int fcoe_link_ok(struct fc_lport *lport)
* there no packets that will be handled by the lport, but also that any * there no packets that will be handled by the lport, but also that any
* threads already handling packet have returned. * threads already handling packet have returned.
*/ */
void fcoe_percpu_clean(struct fc_lport *lport) static void fcoe_percpu_clean(struct fc_lport *lport)
{ {
struct fcoe_percpu_s *pp; struct fcoe_percpu_s *pp;
struct fcoe_rcv_info *fr; struct fcoe_rcv_info *fr;
...@@ -2251,7 +2255,7 @@ void fcoe_percpu_clean(struct fc_lport *lport) ...@@ -2251,7 +2255,7 @@ void fcoe_percpu_clean(struct fc_lport *lport)
* *
* Returns: Always 0 (return value required by FC transport template) * Returns: Always 0 (return value required by FC transport template)
*/ */
int fcoe_reset(struct Scsi_Host *shost) static int fcoe_reset(struct Scsi_Host *shost)
{ {
struct fc_lport *lport = shost_priv(shost); struct fc_lport *lport = shost_priv(shost);
struct fcoe_port *port = lport_priv(lport); struct fcoe_port *port = lport_priv(lport);
......
...@@ -40,9 +40,7 @@ ...@@ -40,9 +40,7 @@
#define FCOE_MIN_XID 0x0000 /* the min xid supported by fcoe_sw */ #define FCOE_MIN_XID 0x0000 /* the min xid supported by fcoe_sw */
#define FCOE_MAX_XID 0x0FFF /* the max xid supported by fcoe_sw */ #define FCOE_MAX_XID 0x0FFF /* the max xid supported by fcoe_sw */
unsigned int fcoe_debug_logging; extern unsigned int fcoe_debug_logging;
module_param_named(debug_logging, fcoe_debug_logging, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(debug_logging, "a bit mask of logging levels");
#define FCOE_LOGGING 0x01 /* General logging, not categorized */ #define FCOE_LOGGING 0x01 /* General logging, not categorized */
#define FCOE_NETDEV_LOGGING 0x02 /* Netdevice logging */ #define FCOE_NETDEV_LOGGING 0x02 /* Netdevice logging */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册