2024-02-23 12:47:12

by Quentin Schulz

[permalink] [raw]
Subject: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive

From: Quentin Schulz <[email protected]>

devm_reset_control_get_optional_exclusive does what this driver is
trying to do in its probe function, therefore let's switch over to that
subsystem function.

Cc: Quentin Schulz <[email protected]>
Signed-off-by: Quentin Schulz <[email protected]>
---
drivers/iio/adc/rockchip_saradc.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c
index 1c0042fbbb54..bbe954a738c7 100644
--- a/drivers/iio/adc/rockchip_saradc.c
+++ b/drivers/iio/adc/rockchip_saradc.c
@@ -450,16 +450,11 @@ static int rockchip_saradc_probe(struct platform_device *pdev)
* The reset should be an optional property, as it should work
* with old devicetrees as well
*/
- info->reset = devm_reset_control_get_exclusive(&pdev->dev,
- "saradc-apb");
+ info->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
+ "saradc-apb");
if (IS_ERR(info->reset)) {
ret = PTR_ERR(info->reset);
- if (ret != -ENOENT)
- return dev_err_probe(&pdev->dev, ret,
- "failed to get saradc-apb\n");
-
- dev_dbg(&pdev->dev, "no reset control found\n");
- info->reset = NULL;
+ return dev_err_probe(&pdev->dev, ret, "failed to get saradc-apb\n");
}

init_completion(&info->completion);

--
2.43.2



2024-02-23 13:00:53

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive

On Fri, Feb 23, 2024 at 2:46 PM Quentin Schulz <[email protected]> wrote:
>
> From: Quentin Schulz <[email protected]>
>
> devm_reset_control_get_optional_exclusive does what this driver is

devm_reset_control_get_optional_exclusive()

> trying to do in its probe function, therefore let's switch over to that

do it in

> subsystem function.

> Cc: Quentin Schulz <[email protected]>

You may use the --cc option to `git send-email` instead of polluting
commit messages, or move this after the '---' cutter line.

--
With Best Regards,
Andy Shevchenko

2024-02-23 13:10:34

by Quentin Schulz

[permalink] [raw]
Subject: Re: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive

Hi Andy,

Thanks for the prompt feedback on the whole series.

On 2/23/24 14:00, Andy Shevchenko wrote:
> On Fri, Feb 23, 2024 at 2:46 PM Quentin Schulz <[email protected]> wrote:
>>
>> From: Quentin Schulz <[email protected]>
>>
>> devm_reset_control_get_optional_exclusive does what this driver is
>
> devm_reset_control_get_optional_exclusive()
>
>> trying to do in its probe function, therefore let's switch over to that
>
> do it in
>
>> subsystem function.
>
>> Cc: Quentin Schulz <[email protected]>
>
> You may use the --cc option to `git send-email` instead of polluting
> commit messages, or move this after the '---' cutter line.
>

The whole point is that my SoB and authorship is from my professional
mail address which is likely to change over time, the Cc is my personal
one for development. Basically, in the event that I change my employer,
I would still be reachable at that Cc address without having to modify
the .mailmap after the fact (which won't make it to an earlier version
of the kernel for example). Some maintainers don't really like this,
some don't mind, we'll see in which category the IIO maintainer(s) fall
in :) (I don't mind either way just to be clear).

Cheers,
Quentin

2024-02-23 13:45:29

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive

Am Freitag, 23. Februar 2024, 13:45:23 CET schrieb Quentin Schulz:
> From: Quentin Schulz <[email protected]>
>
> devm_reset_control_get_optional_exclusive does what this driver is
> trying to do in its probe function, therefore let's switch over to that
> subsystem function.
>
> Cc: Quentin Schulz <[email protected]>
> Signed-off-by: Quentin Schulz <[email protected]>

Reviewed-by: Heiko Stuebner <[email protected]>



2024-02-23 14:43:00

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive

On Fri, Feb 23, 2024 at 3:10 PM Quentin Schulz
<[email protected]> wrote:
> On 2/23/24 14:00, Andy Shevchenko wrote:
> > On Fri, Feb 23, 2024 at 2:46 PM Quentin Schulz <[email protected]> wrote:

..

> >> Cc: Quentin Schulz <[email protected]>
> >
> > You may use the --cc option to `git send-email` instead of polluting
> > commit messages, or move this after the '---' cutter line.
>
> The whole point is that my SoB and authorship is from my professional
> mail address which is likely to change over time, the Cc is my personal
> one for development. Basically, in the event that I change my employer,
> I would still be reachable at that Cc address without having to modify
> the .mailmap after the fact (which won't make it to an earlier version
> of the kernel for example). Some maintainers don't really like this,
> some don't mind, we'll see in which category the IIO maintainer(s) fall
> in :) (I don't mind either way just to be clear).

My point is that Cc and other similar (non-real-tags) stuff is
polluting commit messages. It means that this will be copied to the
Git index to all kernel git repositories in the world from now and
then, This is at bare minimum makes additional burden on git log (and
parsing and so on) and moreover, wastes resources becoming less
environment friendly (no jokes). Using --cc or moving to the behind
the commit message will keep email copied with cleaner commit
messages. Yet, all email tags are available in lore archive
(lore.kernel.org). Please, really reconsider the commit messages
content in the Linux kernel project and elsewhere, it will help to
make the world more friendly.

--
With Best Regards,
Andy Shevchenko

2024-02-26 20:32:06

by Dragan Simic

[permalink] [raw]
Subject: Re: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive

Hello Andy and Quentin,

On 2024-02-23 15:39, Andy Shevchenko wrote:
> On Fri, Feb 23, 2024 at 3:10 PM Quentin Schulz
> <[email protected]> wrote:
>> On 2/23/24 14:00, Andy Shevchenko wrote:
>> > On Fri, Feb 23, 2024 at 2:46 PM Quentin Schulz <[email protected]> wrote:
>
> ...
>
>> >> Cc: Quentin Schulz <[email protected]>
>> >
>> > You may use the --cc option to `git send-email` instead of polluting
>> > commit messages, or move this after the '---' cutter line.
>>
>> The whole point is that my SoB and authorship is from my professional
>> mail address which is likely to change over time, the Cc is my
>> personal
>> one for development. Basically, in the event that I change my
>> employer,
>> I would still be reachable at that Cc address without having to modify
>> the .mailmap after the fact (which won't make it to an earlier version
>> of the kernel for example). Some maintainers don't really like this,
>> some don't mind, we'll see in which category the IIO maintainer(s)
>> fall
>> in :) (I don't mind either way just to be clear).
>
> My point is that Cc and other similar (non-real-tags) stuff is
> polluting commit messages. It means that this will be copied to the
> Git index to all kernel git repositories in the world from now and
> then, This is at bare minimum makes additional burden on git log (and
> parsing and so on) and moreover, wastes resources becoming less
> environment friendly (no jokes). Using --cc or moving to the behind
> the commit message will keep email copied with cleaner commit
> messages. Yet, all email tags are available in lore archive
> (lore.kernel.org). Please, really reconsider the commit messages
> content in the Linux kernel project and elsewhere, it will help to
> make the world more friendly.

Believe it or not, I'm working on some patches for Git that, I believe,
should help a lot when it comes to handling Cc: addresses. Would you
like to be included in the list of recipients for those Git patches, so
you could, hopefully, provide some feeback?

2024-02-27 12:49:33

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive

On Mon, Feb 26, 2024 at 10:31 PM Dragan Simic <[email protected]> wrote:
> On 2024-02-23 15:39, Andy Shevchenko wrote:
> > On Fri, Feb 23, 2024 at 3:10 PM Quentin Schulz
> > <[email protected]> wrote:
> >> On 2/23/24 14:00, Andy Shevchenko wrote:

..

> >> I would still be reachable at that Cc address without having to modify
> >> the .mailmap after the fact (which won't make it to an earlier version
> >> of the kernel for example). Some maintainers don't really like this,
> >> some don't mind, we'll see in which category the IIO maintainer(s)
> >> fall
> >> in :) (I don't mind either way just to be clear).
> >
> > My point is that Cc and other similar (non-real-tags) stuff is
> > polluting commit messages. It means that this will be copied to the
> > Git index to all kernel git repositories in the world from now and
> > then, This is at bare minimum makes additional burden on git log (and
> > parsing and so on) and moreover, wastes resources becoming less
> > environment friendly (no jokes). Using --cc or moving to the behind
> > the commit message will keep email copied with cleaner commit
> > messages. Yet, all email tags are available in lore archive
> > (lore.kernel.org). Please, really reconsider the commit messages
> > content in the Linux kernel project and elsewhere, it will help to
> > make the world more friendly.
>
> Believe it or not, I'm working on some patches for Git that, I believe,
> should help a lot when it comes to handling Cc: addresses. Would you
> like to be included in the list of recipients for those Git patches, so
> you could, hopefully, provide some feeback?

You may Cc me if you want to, but I can't guarantee I have time or
valuable input to that.

--
With Best Regards,
Andy Shevchenko

2024-02-27 15:27:47

by Dragan Simic

[permalink] [raw]
Subject: Re: [PATCH 3/3] iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive

On 2024-02-27 13:48, Andy Shevchenko wrote:
> On Mon, Feb 26, 2024 at 10:31 PM Dragan Simic <[email protected]>
> wrote:
>> On 2024-02-23 15:39, Andy Shevchenko wrote:
>> > On Fri, Feb 23, 2024 at 3:10 PM Quentin Schulz
>> > <[email protected]> wrote:
>> >> On 2/23/24 14:00, Andy Shevchenko wrote:
>
> ...
>
>> >> I would still be reachable at that Cc address without having to modify
>> >> the .mailmap after the fact (which won't make it to an earlier version
>> >> of the kernel for example). Some maintainers don't really like this,
>> >> some don't mind, we'll see in which category the IIO maintainer(s)
>> >> fall
>> >> in :) (I don't mind either way just to be clear).
>> >
>> > My point is that Cc and other similar (non-real-tags) stuff is
>> > polluting commit messages. It means that this will be copied to the
>> > Git index to all kernel git repositories in the world from now and
>> > then, This is at bare minimum makes additional burden on git log (and
>> > parsing and so on) and moreover, wastes resources becoming less
>> > environment friendly (no jokes). Using --cc or moving to the behind
>> > the commit message will keep email copied with cleaner commit
>> > messages. Yet, all email tags are available in lore archive
>> > (lore.kernel.org). Please, really reconsider the commit messages
>> > content in the Linux kernel project and elsewhere, it will help to
>> > make the world more friendly.
>>
>> Believe it or not, I'm working on some patches for Git that, I
>> believe,
>> should help a lot when it comes to handling Cc: addresses. Would you
>> like to be included in the list of recipients for those Git patches,
>> so
>> you could, hopefully, provide some feeback?
>
> You may Cc me if you want to, but I can't guarantee I have time or
> valuable input to that.

Thanks, I'll be happy to have another set of eyes on those Git patches.