All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: ads7846 - Make use of the helper function dev_err_probe()
@ 2021-09-16 15:31 Cai Huoqing
  2021-09-16 19:34 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Cai Huoqing @ 2021-09-16 15:31 UTC (permalink / raw)
  To: caihuoqing; +Cc: Dmitry Torokhov, linux-input, linux-kernel

When possible use dev_err_probe help to properly deal with the
PROBE_DEFER error, the benefit is that DEFER issue will be logged
in the devices_deferred debugfs file.
Using dev_err_probe() can reduce code size, and the error value
gets printed.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/input/touchscreen/ads7846.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index eaa8714ad19d..f5c053940cbf 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1337,11 +1337,8 @@ static int ads7846_probe(struct spi_device *spi)
 	ads7846_setup_spi_msg(ts, pdata);
 
 	ts->reg = devm_regulator_get(dev, "vcc");
-	if (IS_ERR(ts->reg)) {
-		err = PTR_ERR(ts->reg);
-		dev_err(dev, "unable to get regulator: %d\n", err);
-		return err;
-	}
+	if (IS_ERR(ts->reg))
+		return dev_err_probe(dev, PTR_ERR(ts->reg), "unable to get regulator\n");
 
 	err = regulator_enable(ts->reg);
 	if (err) {
-- 
2.25.1


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

* Re: [PATCH] Input: ads7846 - Make use of the helper function dev_err_probe()
  2021-09-16 15:31 [PATCH] Input: ads7846 - Make use of the helper function dev_err_probe() Cai Huoqing
@ 2021-09-16 19:34 ` Krzysztof Kozlowski
  2021-09-17  2:29   ` Cai Huoqing
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-16 19:34 UTC (permalink / raw)
  To: Cai Huoqing; +Cc: Dmitry Torokhov, linux-input, linux-kernel

On 16/09/2021 17:31, Cai Huoqing wrote:
> When possible use dev_err_probe help to properly deal with the
> PROBE_DEFER error, the benefit is that DEFER issue will be logged
> in the devices_deferred debugfs file.
> Using dev_err_probe() can reduce code size, and the error value
> gets printed.
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>  drivers/input/touchscreen/ads7846.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)

You sent 32 independent patches. Do you expect us to copy-paste similar
feedback on each of them? This would not make any sense. Please organize
all your submissions in a series with:

  git format-patch -32
  git send-email ..... 00*

The patches you sent were already sent before:
https://lore.kernel.org/lkml/20200827185829.30096-1-krzk@kernel.org/

Best regards,
Krzysztof

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

* Re: [PATCH] Input: ads7846 - Make use of the helper function dev_err_probe()
  2021-09-16 19:34 ` Krzysztof Kozlowski
@ 2021-09-17  2:29   ` Cai Huoqing
  2021-09-17  8:08     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Cai Huoqing @ 2021-09-17  2:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Dmitry Torokhov, linux-input, linux-kernel

On 16 9月 21 21:34:26, Krzysztof Kozlowski wrote:
> On 16/09/2021 17:31, Cai Huoqing wrote:
> > When possible use dev_err_probe help to properly deal with the
> > PROBE_DEFER error, the benefit is that DEFER issue will be logged
> > in the devices_deferred debugfs file.
> > Using dev_err_probe() can reduce code size, and the error value
> > gets printed.
> > 
> > Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> > ---
> >  drivers/input/touchscreen/ads7846.c | 7 ++-----
> >  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> You sent 32 independent patches. Do you expect us to copy-paste similar
> feedback on each of them? This would not make any sense. Please organize
> all your submissions in a series with:
> 
>   git format-patch -32
>   git send-email ..... 00*
Ok, I'll try. but there are different owners for touchscreen/xxx,
is it ok to send them the whole series?
> 
> The patches you sent were already sent before:
> https://lore.kernel.org/lkml/20200827185829.30096-1-krzk@kernel.org/
> 
> Best regards,
> Krzysztof

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

* Re: [PATCH] Input: ads7846 - Make use of the helper function dev_err_probe()
  2021-09-17  2:29   ` Cai Huoqing
@ 2021-09-17  8:08     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-17  8:08 UTC (permalink / raw)
  To: Cai Huoqing; +Cc: Dmitry Torokhov, linux-input, linux-kernel

On 17/09/2021 04:29, Cai Huoqing wrote:
> On 16 9月 21 21:34:26, Krzysztof Kozlowski wrote:
>> On 16/09/2021 17:31, Cai Huoqing wrote:
>>> When possible use dev_err_probe help to properly deal with the
>>> PROBE_DEFER error, the benefit is that DEFER issue will be logged
>>> in the devices_deferred debugfs file.
>>> Using dev_err_probe() can reduce code size, and the error value
>>> gets printed.
>>>
>>> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
>>> ---
>>>  drivers/input/touchscreen/ads7846.c | 7 ++-----
>>>  1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> You sent 32 independent patches. Do you expect us to copy-paste similar
>> feedback on each of them? This would not make any sense. Please organize
>> all your submissions in a series with:
>>
>>   git format-patch -32
>>   git send-email ..... 00*
> Ok, I'll try. but there are different owners for touchscreen/xxx,
> is it ok to send them the whole series?

I see the same maintainers:
Dmitry Torokhov + linux-input

HWMON also appears because of usage of hwmon API inside, which might
happen anyway for few other input drivers

Best regards,
Krzysztof

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

end of thread, other threads:[~2021-09-17  8:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 15:31 [PATCH] Input: ads7846 - Make use of the helper function dev_err_probe() Cai Huoqing
2021-09-16 19:34 ` Krzysztof Kozlowski
2021-09-17  2:29   ` Cai Huoqing
2021-09-17  8:08     ` Krzysztof Kozlowski

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.