[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <775ea7ee-f879-149a-8a60-97635a2cd218@microchip.com>
Date: Tue, 14 May 2019 07:24:02 +0000
From: <Nicolas.Ferre@...rochip.com>
To: <luca@...aceresoli.net>, <netdev@...r.kernel.org>
CC: <davem@...emloft.net>, <linux-kernel@...r.kernel.org>,
<Claudiu.Beznea@...rochip.com>
Subject: Re: [PATCH] net: macb: fix error format in dev_err()
On 14/05/2019 at 09:14, Luca Ceresoli wrote:
> External E-Mail
>
>
> Errors are negative numbers. Using %u shows them as very large positive
> numbers such as 4294967277 that don't make sense. Use the %d format
> instead, and get a much nicer -19.
>
> Signed-off-by: Luca Ceresoli <luca@...aceresoli.net>
Indeed!
Acked-by: Nicolas Ferre <nicolas.ferre@...rochip.com>
> ---
> drivers/net/ethernet/cadence/macb_main.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index c049410bc888..bebd9b1aeb64 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -3343,7 +3343,7 @@ static int macb_clk_init(struct platform_device *pdev, struct clk **pclk,
> if (!err)
> err = -ENODEV;
>
> - dev_err(&pdev->dev, "failed to get macb_clk (%u)\n", err);
> + dev_err(&pdev->dev, "failed to get macb_clk (%d)\n", err);
> return err;
> }
>
> @@ -3352,7 +3352,7 @@ static int macb_clk_init(struct platform_device *pdev, struct clk **pclk,
> if (!err)
> err = -ENODEV;
>
> - dev_err(&pdev->dev, "failed to get hclk (%u)\n", err);
> + dev_err(&pdev->dev, "failed to get hclk (%d)\n", err);
> return err;
> }
>
> @@ -3370,31 +3370,31 @@ static int macb_clk_init(struct platform_device *pdev, struct clk **pclk,
>
> err = clk_prepare_enable(*pclk);
> if (err) {
> - dev_err(&pdev->dev, "failed to enable pclk (%u)\n", err);
> + dev_err(&pdev->dev, "failed to enable pclk (%d)\n", err);
> return err;
> }
>
> err = clk_prepare_enable(*hclk);
> if (err) {
> - dev_err(&pdev->dev, "failed to enable hclk (%u)\n", err);
> + dev_err(&pdev->dev, "failed to enable hclk (%d)\n", err);
> goto err_disable_pclk;
> }
>
> err = clk_prepare_enable(*tx_clk);
> if (err) {
> - dev_err(&pdev->dev, "failed to enable tx_clk (%u)\n", err);
> + dev_err(&pdev->dev, "failed to enable tx_clk (%d)\n", err);
> goto err_disable_hclk;
> }
>
> err = clk_prepare_enable(*rx_clk);
> if (err) {
> - dev_err(&pdev->dev, "failed to enable rx_clk (%u)\n", err);
> + dev_err(&pdev->dev, "failed to enable rx_clk (%d)\n", err);
> goto err_disable_txclk;
> }
>
> err = clk_prepare_enable(*tsu_clk);
> if (err) {
> - dev_err(&pdev->dev, "failed to enable tsu_clk (%u)\n", err);
> + dev_err(&pdev->dev, "failed to enable tsu_clk (%d)\n", err);
> goto err_disable_rxclk;
> }
>
> @@ -3868,7 +3868,7 @@ static int at91ether_clk_init(struct platform_device *pdev, struct clk **pclk,
>
> err = clk_prepare_enable(*pclk);
> if (err) {
> - dev_err(&pdev->dev, "failed to enable pclk (%u)\n", err);
> + dev_err(&pdev->dev, "failed to enable pclk (%d)\n", err);
> return err;
> }
>
>
--
Nicolas Ferre
Powered by blists - more mailing lists