ucc_geth: Convert ugeth_<level> to pr_<level>
Remove unnecessary macros that duplicate generic kernel functions. When a struct net_device is available: Convert printks to netdev_<level> Convert netif_msg_<foo> and ugeth_<level> to netif_<level> Add pr_fmt. Standardize on newlines at end of format. Remove some duplicated newlines from output. Coalesce formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
375d6a1b42
commit
c84d8055e0
File diff suppressed because it is too large
Load Diff
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#include "ucc_geth.h"
|
#include "ucc_geth.h"
|
||||||
|
|
||||||
static char hw_stat_gstrings[][ETH_GSTRING_LEN] = {
|
static const char hw_stat_gstrings[][ETH_GSTRING_LEN] = {
|
||||||
"tx-64-frames",
|
"tx-64-frames",
|
||||||
"tx-65-127-frames",
|
"tx-65-127-frames",
|
||||||
"tx-128-255-frames",
|
"tx-128-255-frames",
|
||||||
@ -59,7 +59,7 @@ static char hw_stat_gstrings[][ETH_GSTRING_LEN] = {
|
|||||||
"rx-dropped-frames",
|
"rx-dropped-frames",
|
||||||
};
|
};
|
||||||
|
|
||||||
static char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
|
static const char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
|
||||||
"tx-single-collision",
|
"tx-single-collision",
|
||||||
"tx-multiple-collision",
|
"tx-multiple-collision",
|
||||||
"tx-late-collsion",
|
"tx-late-collsion",
|
||||||
@ -74,7 +74,7 @@ static char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
|
|||||||
"tx-jumbo-frames",
|
"tx-jumbo-frames",
|
||||||
};
|
};
|
||||||
|
|
||||||
static char rx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
|
static const char rx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
|
||||||
"rx-crc-errors",
|
"rx-crc-errors",
|
||||||
"rx-alignment-errors",
|
"rx-alignment-errors",
|
||||||
"rx-in-range-length-errors",
|
"rx-in-range-length-errors",
|
||||||
@ -160,8 +160,7 @@ uec_set_pauseparam(struct net_device *netdev,
|
|||||||
if (ugeth->phydev->autoneg) {
|
if (ugeth->phydev->autoneg) {
|
||||||
if (netif_running(netdev)) {
|
if (netif_running(netdev)) {
|
||||||
/* FIXME: automatically restart */
|
/* FIXME: automatically restart */
|
||||||
printk(KERN_INFO
|
netdev_info(netdev, "Please re-open the interface\n");
|
||||||
"Please re-open the interface.\n");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
struct ucc_geth_info *ug_info = ugeth->ug_info;
|
struct ucc_geth_info *ug_info = ugeth->ug_info;
|
||||||
@ -240,18 +239,18 @@ uec_set_ringparam(struct net_device *netdev,
|
|||||||
int queue = 0, ret = 0;
|
int queue = 0, ret = 0;
|
||||||
|
|
||||||
if (ring->rx_pending < UCC_GETH_RX_BD_RING_SIZE_MIN) {
|
if (ring->rx_pending < UCC_GETH_RX_BD_RING_SIZE_MIN) {
|
||||||
printk("%s: RxBD ring size must be no smaller than %d.\n",
|
netdev_info(netdev, "RxBD ring size must be no smaller than %d\n",
|
||||||
netdev->name, UCC_GETH_RX_BD_RING_SIZE_MIN);
|
UCC_GETH_RX_BD_RING_SIZE_MIN);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
if (ring->rx_pending % UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT) {
|
if (ring->rx_pending % UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT) {
|
||||||
printk("%s: RxBD ring size must be multiple of %d.\n",
|
netdev_info(netdev, "RxBD ring size must be multiple of %d\n",
|
||||||
netdev->name, UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT);
|
UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
if (ring->tx_pending < UCC_GETH_TX_BD_RING_SIZE_MIN) {
|
if (ring->tx_pending < UCC_GETH_TX_BD_RING_SIZE_MIN) {
|
||||||
printk("%s: TxBD ring size must be no smaller than %d.\n",
|
netdev_info(netdev, "TxBD ring size must be no smaller than %d\n",
|
||||||
netdev->name, UCC_GETH_TX_BD_RING_SIZE_MIN);
|
UCC_GETH_TX_BD_RING_SIZE_MIN);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,8 +259,7 @@ uec_set_ringparam(struct net_device *netdev,
|
|||||||
|
|
||||||
if (netif_running(netdev)) {
|
if (netif_running(netdev)) {
|
||||||
/* FIXME: restart automatically */
|
/* FIXME: restart automatically */
|
||||||
printk(KERN_INFO
|
netdev_info(netdev, "Please re-open the interface\n");
|
||||||
"Please re-open the interface.\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user