Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: fsl-quadspi: Print the error value
@ 2015-02-09 12:07 Fabio Estevam
  2015-02-11  4:07 ` Han Xu
  2015-03-31  1:05 ` Brian Norris
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2015-02-09 12:07 UTC (permalink / raw)
  To: computersforpeace; +Cc: Fabio Estevam, linux-mtd, han.xu

When displaying dev_err() messages it is useful to print the error value.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/mtd/spi-nor/fsl-quadspi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 1c7308c..78b1b33 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -830,27 +830,27 @@ static int fsl_qspi_probe(struct platform_device *pdev)
 
 	ret = clk_prepare_enable(q->clk_en);
 	if (ret) {
-		dev_err(dev, "can not enable the qspi_en clock\n");
+		dev_err(dev, "can not enable the qspi_en clock: %d\n", ret);
 		return ret;
 	}
 
 	ret = clk_prepare_enable(q->clk);
 	if (ret) {
-		dev_err(dev, "can not enable the qspi clock\n");
+		dev_err(dev, "can not enable the qspi clock: %d\n", ret);
 		goto clk_failed;
 	}
 
 	/* find the irq */
 	ret = platform_get_irq(pdev, 0);
 	if (ret < 0) {
-		dev_err(dev, "failed to get the irq\n");
+		dev_err(dev, "failed to get the irq: %d\n", ret);
 		goto irq_failed;
 	}
 
 	ret = devm_request_irq(dev, ret,
 			fsl_qspi_irq_handler, 0, pdev->name, q);
 	if (ret) {
-		dev_err(dev, "failed to request irq.\n");
+		dev_err(dev, "failed to request irq: %d\n", ret);
 		goto irq_failed;
 	}
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: fsl-quadspi: Print the error value
  2015-02-09 12:07 [PATCH] mtd: fsl-quadspi: Print the error value Fabio Estevam
@ 2015-02-11  4:07 ` Han Xu
  2015-03-31  1:05 ` Brian Norris
  1 sibling, 0 replies; 3+ messages in thread
From: Han Xu @ 2015-02-11  4:07 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Brian Norris, linux-mtd@lists.infradead.org, han.xu@freescale.com

On Mon, Feb 9, 2015 at 6:07 AM, Fabio Estevam
<fabio.estevam@freescale.com> wrote:
> When displaying dev_err() messages it is useful to print the error value.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/mtd/spi-nor/fsl-quadspi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
> index 1c7308c..78b1b33 100644
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> @@ -830,27 +830,27 @@ static int fsl_qspi_probe(struct platform_device *pdev)
>
>         ret = clk_prepare_enable(q->clk_en);
>         if (ret) {
> -               dev_err(dev, "can not enable the qspi_en clock\n");
> +               dev_err(dev, "can not enable the qspi_en clock: %d\n", ret);
>                 return ret;
>         }
>
>         ret = clk_prepare_enable(q->clk);
>         if (ret) {
> -               dev_err(dev, "can not enable the qspi clock\n");
> +               dev_err(dev, "can not enable the qspi clock: %d\n", ret);
>                 goto clk_failed;
>         }
>
>         /* find the irq */
>         ret = platform_get_irq(pdev, 0);
>         if (ret < 0) {
> -               dev_err(dev, "failed to get the irq\n");
> +               dev_err(dev, "failed to get the irq: %d\n", ret);
>                 goto irq_failed;
>         }
>
>         ret = devm_request_irq(dev, ret,
>                         fsl_qspi_irq_handler, 0, pdev->name, q);
>         if (ret) {
> -               dev_err(dev, "failed to request irq.\n");
> +               dev_err(dev, "failed to request irq: %d\n", ret);
>                 goto irq_failed;
>         }
>
> --
> 1.9.1
>

Acked-by: Han Xu <han.xu@freescale.com>

>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: fsl-quadspi: Print the error value
  2015-02-09 12:07 [PATCH] mtd: fsl-quadspi: Print the error value Fabio Estevam
  2015-02-11  4:07 ` Han Xu
@ 2015-03-31  1:05 ` Brian Norris
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2015-03-31  1:05 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mtd, han.xu

On Mon, Feb 09, 2015 at 10:07:19AM -0200, Fabio Estevam wrote:
> When displaying dev_err() messages it is useful to print the error value.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Pushed to l2-mtd.git, with an additionl language fixup ("can not" ->
"cannot").

Thanks,
Brian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-31  1:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 12:07 [PATCH] mtd: fsl-quadspi: Print the error value Fabio Estevam
2015-02-11  4:07 ` Han Xu
2015-03-31  1:05 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox