mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] misc: acpi-test: bump down debug message on remove
@ 2021-10-30 17:54 Ahmad Fatoum
  2021-10-30 17:54 ` [PATCH 2/4] usb: dwc3: remove unneeded EPROBE_DEFER check Ahmad Fatoum
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2021-10-30 17:54 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The ACPI test driver is meant to serve as template for adding more
useful drivers. Printing a message in remove isn't a pattern that should
be copied, so bump the level down.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/misc/acpi-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/acpi-test.c b/drivers/misc/acpi-test.c
index 1d6814ebcf27..784c80cc5b8b 100644
--- a/drivers/misc/acpi-test.c
+++ b/drivers/misc/acpi-test.c
@@ -47,7 +47,7 @@ static int acpi_test_probe(struct device_d *dev)
 
 static void acpi_test_remove(struct device_d *dev)
 {
-	dev_info(dev, "FADT driver removed\n");
+	dev_dbg(dev, "FADT driver removed\n");
 }
 
 static struct acpi_driver acpi_test_driver = {
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* [PATCH 2/4] usb: dwc3: remove unneeded EPROBE_DEFER check
  2021-10-30 17:54 [PATCH 1/4] misc: acpi-test: bump down debug message on remove Ahmad Fatoum
@ 2021-10-30 17:54 ` Ahmad Fatoum
  2021-10-30 17:54 ` [PATCH 3/4] serial: atmel: abort probe on atmel_serial_init_port failure Ahmad Fatoum
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2021-10-30 17:54 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We early exit on all errors, so no need to single out EPROBE_DEFER.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/usb/dwc3/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index f618435cb660..fb3cae4de923 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1115,8 +1115,6 @@ static int dwc3_probe(struct device_d *dev)
 
 		if (of_find_property(dev->device_node, "clocks", NULL)) {
 			ret = clk_bulk_get(dev, dwc->num_clks, dwc->clks);
-			if (ret == -EPROBE_DEFER)
-				return ret;
 			if (ret)
 				return ret;
 		}
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* [PATCH 3/4] serial: atmel: abort probe on atmel_serial_init_port failure
  2021-10-30 17:54 [PATCH 1/4] misc: acpi-test: bump down debug message on remove Ahmad Fatoum
  2021-10-30 17:54 ` [PATCH 2/4] usb: dwc3: remove unneeded EPROBE_DEFER check Ahmad Fatoum
@ 2021-10-30 17:54 ` Ahmad Fatoum
  2021-10-30 17:54 ` [PATCH 4/4] spi: zynq_qspi: don't check clk_get return value for NULLness Ahmad Fatoum
  2021-11-01 10:28 ` [PATCH 1/4] misc: acpi-test: bump down debug message on remove Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2021-10-30 17:54 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The port initialization fails if the memory region couldn't be requested
or if the clock couldn't be gotten. Both print an error message, so
users running into this would've noticed. Do the sane thing and abort
the probe in such error cases.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/serial/atmel.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c
index 8394273f9f42..612265692f64 100644
--- a/drivers/serial/atmel.c
+++ b/drivers/serial/atmel.c
@@ -427,6 +427,7 @@ static int atmel_serial_probe(struct device_d *dev)
 {
 	struct atmel_uart_port *uart;
 	struct console_device *cdev;
+	int ret;
 
 	uart = xzalloc(sizeof(struct atmel_uart_port));
 	cdev = &uart->uart;
@@ -438,7 +439,9 @@ static int atmel_serial_probe(struct device_d *dev)
 	cdev->set_mode = atmel_serial_set_mode;
 	cdev->linux_console_name = "ttyAT";
 
-	atmel_serial_init_port(cdev);
+	ret = atmel_serial_init_port(cdev);
+	if (ret)
+		return ret;
 
 	/* Enable UART */
 
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* [PATCH 4/4] spi: zynq_qspi: don't check clk_get return value for NULLness
  2021-10-30 17:54 [PATCH 1/4] misc: acpi-test: bump down debug message on remove Ahmad Fatoum
  2021-10-30 17:54 ` [PATCH 2/4] usb: dwc3: remove unneeded EPROBE_DEFER check Ahmad Fatoum
  2021-10-30 17:54 ` [PATCH 3/4] serial: atmel: abort probe on atmel_serial_init_port failure Ahmad Fatoum
@ 2021-10-30 17:54 ` Ahmad Fatoum
  2021-11-01 10:28 ` [PATCH 1/4] misc: acpi-test: bump down debug message on remove Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2021-10-30 17:54 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

clk_get never returns NULL, so no point in checking for it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/spi/zynq_qspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index d01e4a8e6c65..bd3418a3fb3e 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -559,13 +559,13 @@ static int zynq_qspi_probe(struct device_d *dev)
 	xqspi->regs = IOMEM(iores->start);
 
 	xqspi->pclk = clk_get(dev, "pclk");
-	if (IS_ERR_OR_NULL(xqspi->pclk)) {
+	if (IS_ERR(xqspi->pclk)) {
 		dev_err(dev, "pclk clock not found.\n");
 		return PTR_ERR(xqspi->pclk);
 	}
 
 	xqspi->refclk = clk_get(dev, "ref_clk");
-	if (IS_ERR_OR_NULL(xqspi->refclk)) {
+	if (IS_ERR(xqspi->refclk)) {
 		dev_err(dev, "ref_clk clock not found.\n");
 		return PTR_ERR(xqspi->refclk);
 	}
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* Re: [PATCH 1/4] misc: acpi-test: bump down debug message on remove
  2021-10-30 17:54 [PATCH 1/4] misc: acpi-test: bump down debug message on remove Ahmad Fatoum
                   ` (2 preceding siblings ...)
  2021-10-30 17:54 ` [PATCH 4/4] spi: zynq_qspi: don't check clk_get return value for NULLness Ahmad Fatoum
@ 2021-11-01 10:28 ` Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2021-11-01 10:28 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Sat, Oct 30, 2021 at 07:54:43PM +0200, Ahmad Fatoum wrote:
> The ACPI test driver is meant to serve as template for adding more
> useful drivers. Printing a message in remove isn't a pattern that should
> be copied, so bump the level down.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/misc/acpi-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/misc/acpi-test.c b/drivers/misc/acpi-test.c
> index 1d6814ebcf27..784c80cc5b8b 100644
> --- a/drivers/misc/acpi-test.c
> +++ b/drivers/misc/acpi-test.c
> @@ -47,7 +47,7 @@ static int acpi_test_probe(struct device_d *dev)
>  
>  static void acpi_test_remove(struct device_d *dev)
>  {
> -	dev_info(dev, "FADT driver removed\n");
> +	dev_dbg(dev, "FADT driver removed\n");
>  }
>  
>  static struct acpi_driver acpi_test_driver = {
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

end of thread, other threads:[~2021-11-01 10:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30 17:54 [PATCH 1/4] misc: acpi-test: bump down debug message on remove Ahmad Fatoum
2021-10-30 17:54 ` [PATCH 2/4] usb: dwc3: remove unneeded EPROBE_DEFER check Ahmad Fatoum
2021-10-30 17:54 ` [PATCH 3/4] serial: atmel: abort probe on atmel_serial_init_port failure Ahmad Fatoum
2021-10-30 17:54 ` [PATCH 4/4] spi: zynq_qspi: don't check clk_get return value for NULLness Ahmad Fatoum
2021-11-01 10:28 ` [PATCH 1/4] misc: acpi-test: bump down debug message on remove Sascha Hauer

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git