Message ID | 1410801177-15872-2-git-send-email-Frank.Li@freescale.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: <Frank.Li@freescale.com> Date: Tue, 16 Sep 2014 01:12:54 +0800 > - dev_err(&pdev->dev, "Invalidate num_tx(=%d), fail back to 1\n", > + dev_warn(&pdev->dev, "Invalid num_tx(=%d), fall back to 1\n", > *num_tx); Any time you change the function name of a multi-line function call, you must be mindful to adjust the indention of the subsequent argument lines, if necessary. > if (*num_rx < 1 || *num_rx > FEC_ENET_MAX_RX_QS) { > - dev_err(&pdev->dev, "Invalidate num_rx(=%d), fail back to 1\n", > + dev_warn(&pdev->dev, "Invalid num_rx(=%d), fall back to 1\n", > *num_rx); Likewise. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 8f8e55e..f958e91 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -2890,22 +2890,22 @@ fec_enet_get_queue_num(struct platform_device *pdev, int *num_tx, int *num_rx) /* parse the num of tx and rx queues */ err = of_property_read_u32(np, "fsl,num-tx-queues", num_tx); - err |= of_property_read_u32(np, "fsl,num-rx-queues", num_rx); - if (err) { + if (err) *num_tx = 1; + + err = of_property_read_u32(np, "fsl,num-rx-queues", num_rx); + if (err) *num_rx = 1; - return; - } if (*num_tx < 1 || *num_tx > FEC_ENET_MAX_TX_QS) { - dev_err(&pdev->dev, "Invalidate num_tx(=%d), fail back to 1\n", + dev_warn(&pdev->dev, "Invalid num_tx(=%d), fall back to 1\n", *num_tx); *num_tx = 1; return; } if (*num_rx < 1 || *num_rx > FEC_ENET_MAX_RX_QS) { - dev_err(&pdev->dev, "Invalidate num_rx(=%d), fail back to 1\n", + dev_warn(&pdev->dev, "Invalid num_rx(=%d), fall back to 1\n", *num_rx); *num_rx = 1; return; @@ -2924,8 +2924,8 @@ fec_probe(struct platform_device *pdev) const struct of_device_id *of_id; static int dev_id; struct device_node *np = pdev->dev.of_node, *phy_node; - int num_tx_qs = 1; - int num_rx_qs = 1; + int num_tx_qs; + int num_rx_qs; of_id = of_match_device(fec_dt_ids, &pdev->dev); if (of_id)