net: mvneta: Convert netdev_xxx to dev_xxx
netdev_xxx evaluates to printf in U-Boot, so there is no extra info
printed. mvneta is one of two drivers which use these functions in U-Boot.
Convert these functions to dev_xxx where possible (and to log_xxx where
not).
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 2c93fe4..83f99e5 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -625,9 +625,9 @@
count = 0;
do {
if (count++ >= MVNETA_RX_DISABLE_TIMEOUT_MSEC) {
- netdev_warn(pp->dev,
- "TIMEOUT for RX stopped ! rx_queue_cmd: 0x08%x\n",
- val);
+ dev_warn(pp->phydev->dev,
+ "TIMEOUT for RX stopped ! rx_queue_cmd: 0x08%x\n",
+ val);
break;
}
mdelay(1);
@@ -648,9 +648,9 @@
count = 0;
do {
if (count++ >= MVNETA_TX_DISABLE_TIMEOUT_MSEC) {
- netdev_warn(pp->dev,
- "TIMEOUT for TX stopped status=0x%08x\n",
- val);
+ dev_warn(pp->phydev->dev,
+ "TIMEOUT for TX stopped status=0x%08x\n",
+ val);
break;
}
mdelay(1);
@@ -664,9 +664,9 @@
count = 0;
do {
if (count++ >= MVNETA_TX_FIFO_EMPTY_TIMEOUT) {
- netdev_warn(pp->dev,
- "TX FIFO empty timeout status=0x08%x\n",
- val);
+ dev_warn(pp->phydev->dev,
+ "TX FIFO empty timeout status=0x08%x\n",
+ val);
break;
}
mdelay(1);
@@ -949,28 +949,32 @@
u32 status = rx_desc->status;
if (!mvneta_rxq_desc_is_first_last(status)) {
- netdev_err(pp->dev,
- "bad rx status %08x (buffer oversize), size=%d\n",
- status, rx_desc->data_size);
+ dev_err(pp->phydev->dev,
+ "bad rx status %08x (buffer oversize), size=%d\n",
+ status, rx_desc->data_size);
return;
}
switch (status & MVNETA_RXD_ERR_CODE_MASK) {
case MVNETA_RXD_ERR_CRC:
- netdev_err(pp->dev, "bad rx status %08x (crc error), size=%d\n",
- status, rx_desc->data_size);
+ dev_err(pp->phydev->dev,
+ "bad rx status %08x (crc error), size=%d\n", status,
+ rx_desc->data_size);
break;
case MVNETA_RXD_ERR_OVERRUN:
- netdev_err(pp->dev, "bad rx status %08x (overrun error), size=%d\n",
- status, rx_desc->data_size);
+ dev_err(pp->phydev->dev,
+ "bad rx status %08x (overrun error), size=%d\n", status,
+ rx_desc->data_size);
break;
case MVNETA_RXD_ERR_LEN:
- netdev_err(pp->dev, "bad rx status %08x (max frame length error), size=%d\n",
- status, rx_desc->data_size);
+ dev_err(pp->phydev->dev,
+ "bad rx status %08x (max frame length error), size=%d\n",
+ status, rx_desc->data_size);
break;
case MVNETA_RXD_ERR_RESOURCE:
- netdev_err(pp->dev, "bad rx status %08x (resource error), size=%d\n",
- status, rx_desc->data_size);
+ dev_err(pp->phydev->dev,
+ "bad rx status %08x (resource error), size=%d\n",
+ status, rx_desc->data_size);
break;
}
}
@@ -1127,8 +1131,8 @@
for (queue = 0; queue < rxq_number; queue++) {
int err = mvneta_rxq_init(pp, &pp->rxqs[queue]);
if (err) {
- netdev_err(pp->dev, "%s: can't create rxq=%d\n",
- __func__, queue);
+ dev_err(pp->phydev->dev, "%s: can't create rxq=%d\n",
+ __func__, queue);
mvneta_cleanup_rxqs(pp);
return err;
}
@@ -1145,8 +1149,8 @@
for (queue = 0; queue < txq_number; queue++) {
int err = mvneta_txq_init(pp, &pp->txqs[queue]);
if (err) {
- netdev_err(pp->dev, "%s: can't create txq=%d\n",
- __func__, queue);
+ dev_err(pp->phydev->dev, "%s: can't create txq=%d\n",
+ __func__, queue);
mvneta_cleanup_txqs(pp);
return err;
}