summaryrefslogtreecommitdiff
path: root/drivers/staging/gdm72xx
diff options
context:
space:
mode:
authorYAMANE Toshiaki <yamanetoshi@gmail.com>2012-10-29 20:04:42 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-30 10:33:51 -0700
commit2d8390223a8909dfddb326fd3d912de80022dd10 (patch)
tree13521abaae0826d550fc85d874ecbf5eae23ee85 /drivers/staging/gdm72xx
parentf57cee11374a0e3056313e0818e3ff2ebd0f496d (diff)
staging/gdm72xx: Use netdev_ or pr_ printks in gdm_qos.c
fixed below checkpatch warnings. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... - WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... and add pr_fmt. Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm72xx')
-rw-r--r--drivers/staging/gdm72xx/gdm_qos.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/staging/gdm72xx/gdm_qos.c b/drivers/staging/gdm72xx/gdm_qos.c
index e26c6a8b2627..1e6303123722 100644
--- a/drivers/staging/gdm72xx/gdm_qos.c
+++ b/drivers/staging/gdm72xx/gdm_qos.c
@@ -11,6 +11,8 @@
* GNU General Public License for more details.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/etherdevice.h>
#include <asm/byteorder.h>
@@ -24,15 +26,6 @@
#define B2H(x) __be16_to_cpu(x)
-#undef dprintk
-#define dprintk(fmt, args ...) printk(KERN_DEBUG "[QoS] " fmt, ## args)
-#undef wprintk
-#define wprintk(fmt, args ...) \
- printk(KERN_WARNING "[QoS WARNING] " fmt, ## args)
-#undef eprintk
-#define eprintk(fmt, args ...) printk(KERN_ERR "[QoS ERROR] " fmt, ## args)
-
-
#define MAX_FREE_LIST_CNT 32
static struct {
struct list_head head;
@@ -95,7 +88,7 @@ static void free_qos_entry_list(struct list_head *free_list)
total_free++;
}
- dprintk("%s: total_free_cnt=%d\n", __func__, total_free);
+ pr_debug("%s: total_free_cnt=%d\n", __func__, total_free);
}
void gdm_qos_init(void *nic_ptr)
@@ -240,7 +233,9 @@ static u32 extract_qos_list(struct nic *nic, struct list_head *head)
qcb->csr[i].qos_buf_count++;
if (!list_empty(&qcb->qos_list[i]))
- wprintk("QoS Index(%d) is piled!!\n", i);
+ netdev_warn(nic->netdev,
+ "Index(%d) is piled!!\n",
+ i);
}
}
}
@@ -280,7 +275,8 @@ int gdm_qos_send_hci_pkt(struct sk_buff *skb, struct net_device *dev)
entry = alloc_qos_entry();
entry->skb = skb;
entry->dev = dev;
- dprintk("qcb->qos_list_cnt=%d\n", qcb->qos_list_cnt);
+ netdev_dbg(dev, "qcb->qos_list_cnt=%d\n",
+ qcb->qos_list_cnt);
}
spin_lock_irqsave(&qcb->qos_lock, flags);
@@ -362,7 +358,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)
index = get_csr(qcb, SFID, 0);
if (index == -1) {
spin_unlock_irqrestore(&qcb->qos_lock, flags);
- eprintk("QoS ERROR: No SF\n");
+ netdev_err(nic->netdev, "QoS ERROR: No SF\n");
return;
}
qcb->csr[index].qos_buf_count = buf[(i*5)+10];
@@ -383,11 +379,12 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)
index = get_csr(qcb, SFID, 1);
if (index == -1) {
- eprintk("QoS ERROR: csr Update Error\n");
+ netdev_err(nic->netdev, "QoS ERROR: csr Update Error\n");
return;
}
- dprintk("QOS_ADD SFID = 0x%x, index=%d\n", SFID, index);
+ netdev_dbg(nic->netdev, "QOS_ADD SFID = 0x%x, index=%d\n",
+ SFID, index);
spin_lock_irqsave(&qcb->qos_lock, flags);
qcb->csr[index].SFID = SFID;
@@ -435,11 +432,13 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)
SFID += (buf[pos++]);
index = get_csr(qcb, SFID, 1);
if (index == -1) {
- eprintk("QoS ERROR: Wrong index(%d)\n", index);
+ netdev_err(nic->netdev, "QoS ERROR: Wrong index(%d)\n",
+ index);
return;
}
- dprintk("QOS_CHANGE_DEL SFID = 0x%x, index=%d\n", SFID, index);
+ netdev_dbg(nic->netdev, "QOS_CHANGE_DEL SFID = 0x%x, index=%d\n",
+ SFID, index);
INIT_LIST_HEAD(&free_list);