aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2012-01-13 20:26:25 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-01-16 03:46:31 -0500
commit7c9c684160bc2c6668abbd2701b440e18bb9ef35 (patch)
treefa6e51cecf7a6661de6352ce4f3c28b96f660f14 /drivers/scsi
parentc6b21c93c1794113c68f3d43f321968191d87b1b (diff)
[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: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/fcoe/fcoe.c34
-rw-r--r--drivers/scsi/fcoe/fcoe.h4
2 files changed, 20 insertions, 18 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 507504b77880..e9599600aa23 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -58,7 +58,11 @@ module_param_named(ddp_min, fcoe_ddp_min, uint, S_IRUGO | S_IWUSR);
58MODULE_PARM_DESC(ddp_min, "Minimum I/O size in bytes for " \ 58MODULE_PARM_DESC(ddp_min, "Minimum I/O size in bytes for " \
59 "Direct Data Placement (DDP)."); 59 "Direct Data Placement (DDP).");
60 60
61DEFINE_MUTEX(fcoe_config_mutex); 61unsigned int fcoe_debug_logging;
62module_param_named(debug_logging, fcoe_debug_logging, int, S_IRUGO|S_IWUSR);
63MODULE_PARM_DESC(debug_logging, "a bit mask of logging levels");
64
65static DEFINE_MUTEX(fcoe_config_mutex);
62 66
63static struct workqueue_struct *fcoe_wq; 67static struct workqueue_struct *fcoe_wq;
64 68
@@ -67,8 +71,8 @@ static DECLARE_COMPLETION(fcoe_flush_completion);
67 71
68/* fcoe host list */ 72/* fcoe host list */
69/* must only by accessed under the RTNL mutex */ 73/* must only by accessed under the RTNL mutex */
70LIST_HEAD(fcoe_hostlist); 74static LIST_HEAD(fcoe_hostlist);
71DEFINE_PER_CPU(struct fcoe_percpu_s, fcoe_percpu); 75static DEFINE_PER_CPU(struct fcoe_percpu_s, fcoe_percpu);
72 76
73/* Function Prototypes */ 77/* Function Prototypes */
74static int fcoe_reset(struct Scsi_Host *); 78static int fcoe_reset(struct Scsi_Host *);
@@ -157,7 +161,7 @@ static struct libfc_function_template fcoe_libfc_fcn_templ = {
157 .lport_set_port_id = fcoe_set_port_id, 161 .lport_set_port_id = fcoe_set_port_id,
158}; 162};
159 163
160struct fc_function_template fcoe_nport_fc_functions = { 164static struct fc_function_template fcoe_nport_fc_functions = {
161 .show_host_node_name = 1, 165 .show_host_node_name = 1,
162 .show_host_port_name = 1, 166 .show_host_port_name = 1,
163 .show_host_supported_classes = 1, 167 .show_host_supported_classes = 1,
@@ -197,7 +201,7 @@ struct fc_function_template fcoe_nport_fc_functions = {
197 .bsg_request = fc_lport_bsg_request, 201 .bsg_request = fc_lport_bsg_request,
198}; 202};
199 203
200struct fc_function_template fcoe_vport_fc_functions = { 204static struct fc_function_template fcoe_vport_fc_functions = {
201 .show_host_node_name = 1, 205 .show_host_node_name = 1,
202 .show_host_port_name = 1, 206 .show_host_port_name = 1,
203 .show_host_supported_classes = 1, 207 .show_host_supported_classes = 1,
@@ -433,7 +437,7 @@ static inline void fcoe_interface_put(struct fcoe_interface *fcoe)
433 * 437 *
434 * Caller must be holding the RTNL mutex 438 * Caller must be holding the RTNL mutex
435 */ 439 */
436void fcoe_interface_cleanup(struct fcoe_interface *fcoe) 440static void fcoe_interface_cleanup(struct fcoe_interface *fcoe)
437{ 441{
438 struct net_device *netdev = fcoe->netdev; 442 struct net_device *netdev = fcoe->netdev;
439 struct fcoe_ctlr *fip = &fcoe->ctlr; 443 struct fcoe_ctlr *fip = &fcoe->ctlr;
@@ -748,7 +752,7 @@ static int fcoe_shost_config(struct fc_lport *lport, struct device *dev)
748 * 752 *
749 * Returns: True for read types I/O, otherwise returns false. 753 * Returns: True for read types I/O, otherwise returns false.
750 */ 754 */
751bool fcoe_oem_match(struct fc_frame *fp) 755static bool fcoe_oem_match(struct fc_frame *fp)
752{ 756{
753 struct fc_frame_header *fh = fc_frame_header_get(fp); 757 struct fc_frame_header *fh = fc_frame_header_get(fp);
754 struct fcp_cmnd *fcp; 758 struct fcp_cmnd *fcp;
@@ -1107,7 +1111,7 @@ static int __init fcoe_if_init(void)
1107 * 1111 *
1108 * Returns: 0 on success 1112 * Returns: 0 on success
1109 */ 1113 */
1110int __exit fcoe_if_exit(void) 1114static int __exit fcoe_if_exit(void)
1111{ 1115{
1112 fc_release_transport(fcoe_nport_scsi_transport); 1116 fc_release_transport(fcoe_nport_scsi_transport);
1113 fc_release_transport(fcoe_vport_scsi_transport); 1117 fc_release_transport(fcoe_vport_scsi_transport);
@@ -1296,7 +1300,7 @@ static inline unsigned int fcoe_select_cpu(void)
1296 * 1300 *
1297 * Returns: 0 for success 1301 * Returns: 0 for success
1298 */ 1302 */
1299int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, 1303static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
1300 struct packet_type *ptype, struct net_device *olddev) 1304 struct packet_type *ptype, struct net_device *olddev)
1301{ 1305{
1302 struct fc_lport *lport; 1306 struct fc_lport *lport;
@@ -1452,7 +1456,7 @@ static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen)
1452 * 1456 *
1453 * Return: 0 for success 1457 * Return: 0 for success
1454 */ 1458 */
1455int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) 1459static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
1456{ 1460{
1457 int wlen; 1461 int wlen;
1458 u32 crc; 1462 u32 crc;
@@ -1728,7 +1732,7 @@ drop:
1728 * 1732 *
1729 * Return: 0 for success 1733 * Return: 0 for success
1730 */ 1734 */
1731int fcoe_percpu_receive_thread(void *arg) 1735static int fcoe_percpu_receive_thread(void *arg)
1732{ 1736{
1733 struct fcoe_percpu_s *p = arg; 1737 struct fcoe_percpu_s *p = arg;
1734 struct sk_buff *skb; 1738 struct sk_buff *skb;
@@ -2146,7 +2150,7 @@ out_nortnl:
2146 * Returns: 0 if the ethtool query was successful 2150 * Returns: 0 if the ethtool query was successful
2147 * -1 if the ethtool query failed 2151 * -1 if the ethtool query failed
2148 */ 2152 */
2149int fcoe_link_speed_update(struct fc_lport *lport) 2153static int fcoe_link_speed_update(struct fc_lport *lport)
2150{ 2154{
2151 struct net_device *netdev = fcoe_netdev(lport); 2155 struct net_device *netdev = fcoe_netdev(lport);
2152 struct ethtool_cmd ecmd; 2156 struct ethtool_cmd ecmd;
@@ -2180,7 +2184,7 @@ int fcoe_link_speed_update(struct fc_lport *lport)
2180 * Returns: 0 if link is UP and OK, -1 if not 2184 * Returns: 0 if link is UP and OK, -1 if not
2181 * 2185 *
2182 */ 2186 */
2183int fcoe_link_ok(struct fc_lport *lport) 2187static int fcoe_link_ok(struct fc_lport *lport)
2184{ 2188{
2185 struct net_device *netdev = fcoe_netdev(lport); 2189 struct net_device *netdev = fcoe_netdev(lport);
2186 2190
@@ -2200,7 +2204,7 @@ int fcoe_link_ok(struct fc_lport *lport)
2200 * there no packets that will be handled by the lport, but also that any 2204 * there no packets that will be handled by the lport, but also that any
2201 * threads already handling packet have returned. 2205 * threads already handling packet have returned.
2202 */ 2206 */
2203void fcoe_percpu_clean(struct fc_lport *lport) 2207static void fcoe_percpu_clean(struct fc_lport *lport)
2204{ 2208{
2205 struct fcoe_percpu_s *pp; 2209 struct fcoe_percpu_s *pp;
2206 struct fcoe_rcv_info *fr; 2210 struct fcoe_rcv_info *fr;
@@ -2251,7 +2255,7 @@ void fcoe_percpu_clean(struct fc_lport *lport)
2251 * 2255 *
2252 * Returns: Always 0 (return value required by FC transport template) 2256 * Returns: Always 0 (return value required by FC transport template)
2253 */ 2257 */
2254int fcoe_reset(struct Scsi_Host *shost) 2258static int fcoe_reset(struct Scsi_Host *shost)
2255{ 2259{
2256 struct fc_lport *lport = shost_priv(shost); 2260 struct fc_lport *lport = shost_priv(shost);
2257 struct fcoe_port *port = lport_priv(lport); 2261 struct fcoe_port *port = lport_priv(lport);
diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h
index 6c6884bcf840..bcc89e639495 100644
--- a/drivers/scsi/fcoe/fcoe.h
+++ b/drivers/scsi/fcoe/fcoe.h
@@ -40,9 +40,7 @@
40#define FCOE_MIN_XID 0x0000 /* the min xid supported by fcoe_sw */ 40#define FCOE_MIN_XID 0x0000 /* the min xid supported by fcoe_sw */
41#define FCOE_MAX_XID 0x0FFF /* the max xid supported by fcoe_sw */ 41#define FCOE_MAX_XID 0x0FFF /* the max xid supported by fcoe_sw */
42 42
43unsigned int fcoe_debug_logging; 43extern unsigned int fcoe_debug_logging;
44module_param_named(debug_logging, fcoe_debug_logging, int, S_IRUGO|S_IWUSR);
45MODULE_PARM_DESC(debug_logging, "a bit mask of logging levels");
46 44
47#define FCOE_LOGGING 0x01 /* General logging, not categorized */ 45#define FCOE_LOGGING 0x01 /* General logging, not categorized */
48#define FCOE_NETDEV_LOGGING 0x02 /* Netdevice logging */ 46#define FCOE_NETDEV_LOGGING 0x02 /* Netdevice logging */