* [PATCH v2 0/1] siox: Introduce dev_err_probe helper @ 2021-06-16 6:17 Thorsten Scherer 2021-06-16 6:17 ` [PATCH v2 1/1] siox: Simplify error handling via dev_err_probe() Thorsten Scherer 0 siblings, 1 reply; 4+ messages in thread From: Thorsten Scherer @ 2021-06-16 6:17 UTC (permalink / raw) To: u.kleine-koenig, gregkh; +Cc: linux-kernel, kernel, t.scherer This patch introduces dev_err_probe helper in siox-bus-gpio.c Changes from v1: - fix commit message according to checkpatch.pl - remove company footer - fix whitespace issues Thorsten Scherer (1): siox: Simplify error handling via dev_err_probe() drivers/siox/siox-bus-gpio.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) base-commit: 009c9aa5be652675a06d5211e1640e02bbb1c33d -- 2.29.2 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/1] siox: Simplify error handling via dev_err_probe() 2021-06-16 6:17 [PATCH v2 0/1] siox: Introduce dev_err_probe helper Thorsten Scherer @ 2021-06-16 6:17 ` Thorsten Scherer 2021-06-16 6:44 ` Uwe Kleine-König 0 siblings, 1 reply; 4+ messages in thread From: Thorsten Scherer @ 2021-06-16 6:17 UTC (permalink / raw) To: u.kleine-koenig, gregkh; +Cc: linux-kernel, kernel, t.scherer commit a787e5400a1c ("driver core: add device probe log helper") introduced a helper for a common error checking pattern. Use it. Signed-off-by: Thorsten Scherer <t.scherer@eckelmann.de> --- drivers/siox/siox-bus-gpio.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/siox/siox-bus-gpio.c b/drivers/siox/siox-bus-gpio.c index 46b4cda36bac..aeefeb725524 100644 --- a/drivers/siox/siox-bus-gpio.c +++ b/drivers/siox/siox-bus-gpio.c @@ -102,29 +102,29 @@ static int siox_gpio_probe(struct platform_device *pdev) ddata->din = devm_gpiod_get(dev, "din", GPIOD_IN); if (IS_ERR(ddata->din)) { - ret = PTR_ERR(ddata->din); - dev_err(dev, "Failed to get %s GPIO: %d\n", "din", ret); + ret = dev_err_probe(dev, PTR_ERR(ddata->din), + "Failed to get din GPIO\n"); goto err; } ddata->dout = devm_gpiod_get(dev, "dout", GPIOD_OUT_LOW); if (IS_ERR(ddata->dout)) { - ret = PTR_ERR(ddata->dout); - dev_err(dev, "Failed to get %s GPIO: %d\n", "dout", ret); + ret = dev_err_probe(dev, PTR_ERR(ddata->dout), + "Failed to get dout GPIO\n"); goto err; } ddata->dclk = devm_gpiod_get(dev, "dclk", GPIOD_OUT_LOW); if (IS_ERR(ddata->dclk)) { - ret = PTR_ERR(ddata->dclk); - dev_err(dev, "Failed to get %s GPIO: %d\n", "dclk", ret); + ret = dev_err_probe(dev, PTR_ERR(ddata->dclk), + "Failed to get dclk GPIO\n"); goto err; } ddata->dld = devm_gpiod_get(dev, "dld", GPIOD_OUT_LOW); if (IS_ERR(ddata->dld)) { - ret = PTR_ERR(ddata->dld); - dev_err(dev, "Failed to get %s GPIO: %d\n", "dld", ret); + ret = dev_err_probe(dev, PTR_ERR(ddata->dld), + "Failed to get dld GPIO\n"); goto err; } @@ -134,7 +134,8 @@ static int siox_gpio_probe(struct platform_device *pdev) ret = siox_master_register(smaster); if (ret) { - dev_err(dev, "Failed to register siox master: %d\n", ret); + dev_err_probe(dev, ret, + "Failed to register siox master\n"); err: siox_master_put(smaster); } -- 2.29.2 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/1] siox: Simplify error handling via dev_err_probe() 2021-06-16 6:17 ` [PATCH v2 1/1] siox: Simplify error handling via dev_err_probe() Thorsten Scherer @ 2021-06-16 6:44 ` Uwe Kleine-König 2021-06-16 6:52 ` Greg KH 0 siblings, 1 reply; 4+ messages in thread From: Uwe Kleine-König @ 2021-06-16 6:44 UTC (permalink / raw) To: Thorsten Scherer; +Cc: gregkh, linux-kernel, kernel [-- Attachment #1: Type: text/plain, Size: 609 bytes --] Hello, On Wed, Jun 16, 2021 at 08:17:36AM +0200, Thorsten Scherer wrote: > commit a787e5400a1c ("driver core: add device probe log helper") > introduced a helper for a common error checking pattern. Use it. > > Signed-off-by: Thorsten Scherer <t.scherer@eckelmann.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> @gregkh: You used to take siox patches, can you please do that for this patch, too? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ | [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/1] siox: Simplify error handling via dev_err_probe() 2021-06-16 6:44 ` Uwe Kleine-König @ 2021-06-16 6:52 ` Greg KH 0 siblings, 0 replies; 4+ messages in thread From: Greg KH @ 2021-06-16 6:52 UTC (permalink / raw) To: Uwe Kleine-König; +Cc: Thorsten Scherer, linux-kernel, kernel On Wed, Jun 16, 2021 at 08:44:46AM +0200, Uwe Kleine-König wrote: > Hello, > > On Wed, Jun 16, 2021 at 08:17:36AM +0200, Thorsten Scherer wrote: > > commit a787e5400a1c ("driver core: add device probe log helper") > > introduced a helper for a common error checking pattern. Use it. > > > > Signed-off-by: Thorsten Scherer <t.scherer@eckelmann.de> > > Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > @gregkh: You used to take siox patches, can you please do that for this > patch, too? Sure, will be glad to take this, thanks. greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-16 6:52 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-06-16 6:17 [PATCH v2 0/1] siox: Introduce dev_err_probe helper Thorsten Scherer 2021-06-16 6:17 ` [PATCH v2 1/1] siox: Simplify error handling via dev_err_probe() Thorsten Scherer 2021-06-16 6:44 ` Uwe Kleine-König 2021-06-16 6:52 ` Greg KH
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.