diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2016-03-07 21:09:30 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-11 22:09:09 -0800 |
commit | 04309886935f7ab64d72d0624bbc7f766ea40713 (patch) | |
tree | 4c9f236a9a5327663f407cbe198238f3385cd0b4 /drivers/staging/netlogic | |
parent | 62e259ed5474a18b377e38dbf694ab1adbbdd8d3 (diff) | |
download | talos-obmc-linux-04309886935f7ab64d72d0624bbc7f766ea40713.tar.gz talos-obmc-linux-04309886935f7ab64d72d0624bbc7f766ea40713.zip |
staging: netlogic: Replace pr_* with netdev_*
Replace generic pr_info and pr_err with netdev_info and netdev_err
respectively for net devices.
Found using Coccinelle. The semantic patch used to find this is as
follows:
//<smpl>
@@
expression e;
identifier f,i;
position p;
@@
f(...,struct net_device *i,...) {
...
(
- pr_debug@p (e)
+ netdev_dbg(i, e)
|
- pr_err@p (e)
+ netdev_err(i, e)
|
- pr_info@p (e)
+ netdev_info(i, e)
)
...
}
@@
expression e;
identifier f,i;
position p;
@@
f(...) {
...
struct net_device *n;
...
(
- pr_debug@p (e)
+ netdev_dbg(n, e)
|
- pr_err@p (e)
+ netdev_err(n, e)
|
- pr_info@p (e)
+ netdev_info(n, e)
)
...
}
@a@
identifier s,x;
@@
struct s {
...
struct net_device *x;
...
};
@b depends on a@
expression e;
identifier f,i,a.s,a.x;
position p;
@@
f ( ..., struct s *i, ...) {
...
(
- pr_debug@p (e)
+ netdev_dbg(i->x, e)
|
- pr_err@p (e)
+ netdev_err(i->x, e)
|
- pr_info@p (e)
+ netdev_info(i->x, e)
)
...
}
@c depends on a@
expression e;
identifier f,i,a.s,a.x;
position p;
@@
f (...) {
...
struct s *i = ...;
...
(
- pr_debug@p (e)
+ netdev_dbg(i->x, e)
|
- pr_err@p (e)
+ netdev_err(i->x, e)
|
- pr_info@p (e)
+ netdev_info(i->x, e)
)
...
}
//</smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/netlogic')
-rw-r--r-- | drivers/staging/netlogic/xlr_net.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 59deeee191db..b0877a88b24c 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -99,7 +99,7 @@ static int send_to_rfr_fifo(struct xlr_net_priv *priv, void *addr) return 0; } while (++num_try < 10000); - pr_err("Send to RFR failed in RX path\n"); + netdev_err(priv->ndev, "Send to RFR failed in RX path\n"); return ret; } @@ -209,12 +209,12 @@ static int xlr_net_fill_rx_ring(struct net_device *ndev) for (i = 0; i < MAX_FRIN_SPILL / 4; i++) { skb_data = xlr_alloc_skb(); if (!skb_data) { - pr_err("SKB allocation failed\n"); + netdev_err(ndev, "SKB allocation failed\n"); return -ENOMEM; } send_to_rfr_fifo(priv, skb_data); } - pr_info("Rx ring setup done\n"); + netdev_info(ndev, "Rx ring setup done\n"); return 0; } |