2022-03-21 22:39:46

by Lizhe

[permalink] [raw]
Subject: [PATCH] drivers/bus/brcmstb_gisb.c : Remove the suppress_bind_attrs attribute of the driver

Even if platform_driver does not set suppress_bind_attrs attribute,
when registering with platform_driver_probe, the value of
suppress_bind_attrs is still true, see __platform_driver_probe()

Signed-off-by: lizhe <[email protected]>
---
drivers/bus/brcmstb_gisb.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c
index 183d5cc37d42..b0c3704777e9 100644
--- a/drivers/bus/brcmstb_gisb.c
+++ b/drivers/bus/brcmstb_gisb.c
@@ -536,7 +536,6 @@ static struct platform_driver brcmstb_gisb_arb_driver = {
.name = "brcm-gisb-arb",
.of_match_table = brcmstb_gisb_arb_of_match,
.pm = &brcmstb_gisb_arb_pm_ops,
- .suppress_bind_attrs = true,
},
};

--
2.25.1


2022-03-22 19:13:28

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH] drivers/bus/brcmstb_gisb.c : Remove the suppress_bind_attrs attribute of the driver

On Tue, Mar 22, 2022 at 4:52 PM Andy Shevchenko
<[email protected]> wrote:
> On Tue, Mar 22, 2022 at 12:41 AM lizhe <[email protected]> wrote:
> >
> > Even if platform_driver does not set suppress_bind_attrs attribute,
> > when registering with platform_driver_probe, the value of
> > suppress_bind_attrs is still true, see __platform_driver_probe()
>
> Any reasons it can't be switched to builtin_platform_driver() macro
> and hence constification of the driver structure?

Ah, the patch that brought that assignment actually allows to built
the driver as a module, so, the correct patch would be to switch to
module_platform_driver() I suppose.

--
With Best Regards,
Andy Shevchenko

2022-03-22 23:27:26

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH] drivers/bus/brcmstb_gisb.c : Remove the suppress_bind_attrs attribute of the driver

On Tue, Mar 22, 2022 at 12:41 AM lizhe <[email protected]> wrote:
>
> Even if platform_driver does not set suppress_bind_attrs attribute,
> when registering with platform_driver_probe, the value of
> suppress_bind_attrs is still true, see __platform_driver_probe()

Any reasons it can't be switched to builtin_platform_driver() macro
and hence constification the driver structure?

--
With Best Regards,
Andy Shevchenko

2022-03-23 23:44:50

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH] drivers/bus/brcmstb_gisb.c : Remove the suppress_bind_attrs attribute of the driver



On 3/22/2022 8:47 PM, lizhe wrote:
> HI Andy Shevchenko
> Even if it is loaded as a module, its execution flow is still executed
> through do_one_initcall(),
> __platform_driver_probe() still invoked.
>      So, this suppress_bind_attrs = true is redundant
>
> https://github.com/torvalds/linux/commit/707a4cdf86e5d6a2c4fad51fb98a6ff3425f820e
> <https://github.com/torvalds/linux/commit/707a4cdf86e5d6a2c4fad51fb98a6ff3425f820e>
>
>
>     The author has simply added some descriptions here. Nothing
> substantial has changed.

No HTML please, and yes I have seen your patch, and yes I plan on
applying it. No need to fuss about it however.
--
Florian

2022-04-20 15:04:10

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH] drivers/bus/brcmstb_gisb.c : Remove the suppress_bind_attrs attribute of the driver



On 3/19/2022 11:45 PM, lizhe wrote:
> Even if platform_driver does not set suppress_bind_attrs attribute,
> when registering with platform_driver_probe, the value of
> suppress_bind_attrs is still true, see __platform_driver_probe()
>
> Signed-off-by: lizhe <[email protected]>

Applied with a revised subject, thanks!
--
Florian