All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Aubin Constans <aubin.constans@microchip.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>
Subject: [PATCH v1 5/5] mmc: atmel-mci: Switch to use dev_err_probe()
Date: Wed, 17 Apr 2024 19:55:17 +0300	[thread overview]
Message-ID: <20240417165708.2965612-6-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240417165708.2965612-1-andriy.shevchenko@linux.intel.com>

Switch to use dev_err_probe() to simplify the error path and
unify a message template.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mmc/host/atmel-mci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 3ae17b8584a2..c4502482d967 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -2548,7 +2548,7 @@ static int atmci_probe(struct platform_device *pdev)
 	}
 
 	if (!nr_slots) {
-		dev_err(dev, "init failed: no slot defined\n");
+		dev_err_probe(dev, ret, "init failed: no slot defined\n");
 		goto err_init_slot;
 	}
 
@@ -2557,8 +2557,7 @@ static int atmci_probe(struct platform_device *pdev)
 		                                  &host->buf_phys_addr,
 						  GFP_KERNEL);
 		if (!host->buffer) {
-			ret = -ENOMEM;
-			dev_err(dev, "buffer allocation failed\n");
+			ret = dev_err_probe(dev, -ENOMEM, "buffer allocation failed\n");
 			goto err_dma_alloc;
 		}
 	}
-- 
2.43.0.rc1.1336.g36b5255a03ac


WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Aubin Constans <aubin.constans@microchip.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>
Subject: [PATCH v1 5/5] mmc: atmel-mci: Switch to use dev_err_probe()
Date: Wed, 17 Apr 2024 19:55:17 +0300	[thread overview]
Message-ID: <20240417165708.2965612-6-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240417165708.2965612-1-andriy.shevchenko@linux.intel.com>

Switch to use dev_err_probe() to simplify the error path and
unify a message template.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mmc/host/atmel-mci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 3ae17b8584a2..c4502482d967 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -2548,7 +2548,7 @@ static int atmci_probe(struct platform_device *pdev)
 	}
 
 	if (!nr_slots) {
-		dev_err(dev, "init failed: no slot defined\n");
+		dev_err_probe(dev, ret, "init failed: no slot defined\n");
 		goto err_init_slot;
 	}
 
@@ -2557,8 +2557,7 @@ static int atmci_probe(struct platform_device *pdev)
 		                                  &host->buf_phys_addr,
 						  GFP_KERNEL);
 		if (!host->buffer) {
-			ret = -ENOMEM;
-			dev_err(dev, "buffer allocation failed\n");
+			ret = dev_err_probe(dev, -ENOMEM, "buffer allocation failed\n");
 			goto err_dma_alloc;
 		}
 	}
-- 
2.43.0.rc1.1336.g36b5255a03ac


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-04-17 16:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 16:55 [PATCH v1 0/5] mmc: atmel-mci: Get rid of leftovers and clean up Andy Shevchenko
2024-04-17 16:55 ` Andy Shevchenko
2024-04-17 16:55 ` [PATCH v1 1/5] mmc: atmel-mci: Get rid of platform data leftovers Andy Shevchenko
2024-04-17 16:55   ` Andy Shevchenko
2024-04-17 16:55 ` [PATCH v1 2/5] mmc: atmel-mci: Use temporary variable for struct device Andy Shevchenko
2024-04-17 16:55   ` Andy Shevchenko
2024-04-17 16:55 ` [PATCH v1 3/5] mmc: atmel-mci: Replace platform device pointer by generic one Andy Shevchenko
2024-04-17 16:55   ` Andy Shevchenko
2024-04-17 16:55 ` [PATCH v1 4/5] mmc: atmel-mci: Incapsulate used to be a platform data into host structure Andy Shevchenko
2024-04-17 16:55   ` Andy Shevchenko
2024-04-17 20:42   ` kernel test robot
2024-04-17 20:42     ` kernel test robot
2024-04-18  9:33     ` Andy Shevchenko
2024-04-18  9:33       ` Andy Shevchenko
2024-04-17 16:55 ` Andy Shevchenko [this message]
2024-04-17 16:55   ` [PATCH v1 5/5] mmc: atmel-mci: Switch to use dev_err_probe() Andy Shevchenko
2024-04-25 16:22 ` [PATCH v1 0/5] mmc: atmel-mci: Get rid of leftovers and clean up Ulf Hansson
2024-04-25 16:22   ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240417165708.2965612-6-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aubin.constans@microchip.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.