Skip to contentSkip to conversation

drivers/bus/brcmstb_gisb.c : Remove the suppress_bind_attrs attribute of the driver

PATCH In review lizhe 3 participants 5 messages Mar 20, 2022 – Apr 19, 2022 1 message not in the archive Broadcom BCM7XXX Arm architecture

lore
Share & tools
lore

lizhe

author
#0 lore raw

PATCH 1/1 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()

---
 drivers/bus/brcmstb_gisb.c | 1 -
 1 file changed, 1 deletion(-)
drivers/bus/brcmstb_gisb.c +0 -1
index 183d5cc37d42..b0c3704777e9 100644
@@ -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,
 	},
 };
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 4 lines · lizhe

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?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 8 lines · Andy Shevchenko
Quoted 4 lines · lizhe

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 10 lines · lizhe

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.

Signature · 1 line
Florian
#5 lore raw
In reply to lizhe
Quoted 5 lines · lizhe

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()

Applied with a revised subject, thanks!

Signature · 1 line
Florian