Re: [PATCH] net: broadcom: fix a mistake about ioremap resource

From: Jonathan Richardson
Date: Tue May 05 2020 - 13:45:11 EST


On Tue, May 5, 2020 at 12:20 AM Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>
> > Commit d7a5502b0bb8b ("net: broadcom: convert to
> > devm_platform_ioremap_resource_byname()") will broke this driver.
> > idm_base and nicpm_base were optional, after this change, they are
> > mandatory. it will probe fails with -22 when the dtb doesn't have them
> > defined. so revert part of this commit and make idm_base and nicpm_base
> > as optional.
>
> I hope that other contributors can convince you to improve also this
> commit message considerably.
> Would you like to fix the spelling besides other wording weaknesses?

How about this wording:

Commit d7a5502b0bb8b ("net: broadcom: convert to
devm_platform_ioremap_resource_byname()")
inadvertently made idm_base and nicpm_base mandatory. These are
optional properties.
probe will fail when they're not defined. The commit is partially
reverted so that they are
obtained by platform_get_resource_byname() as before. amac_base can
still be obtained
by devm_platform_ioremap_resource_byname().