drm/bridge: of-display-mode-bridge: Fix missing static const for the bridge funcs
Subsystems (3)
PATCH 1/1 drm/bridge: of-display-mode-bridge: Fix missing static const for the bridge funcs
Add static qualifier for of_display_mode_bridge_funcs to resolve the sparse warning:
drivers/gpu/drm/bridge/of-display-mode-bridge.c:54:25: sparse: sparse:
symbol 'of_display_mode_bridge_funcs' was not declared. Should it be static?
Also mark the structure const as required by devm_drm_bridge_alloc() parameter type constraints.
--- drivers/gpu/drm/bridge/of-display-mode-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/of-display-mode-bridge.c +1 -1
@@ -51,7 +51,7 @@ static int of_display_mode_bridge_get_modes(struct drm_bridge *bridge,return 0 ; } -struct drm_bridge_funcs of_display_mode_bridge_funcs = { +static const struct drm_bridge_funcs of_display_mode_bridge_funcs = { .attach = of_display_mode_bridge_attach, .get_modes = of_display_mode_bridge_get_modes, };
Signature · 1 line
2.34.1
Quoted 7 lines · Damon Ding
Add static qualifier for
of_display_mode_bridge_funcsto resolve the sparse warning:
drivers/gpu/drm/bridge/of-display-mode-bridge.c:54:25: sparse: sparse:
symbol 'of_display_mode_bridge_funcs' was not declared. Should it be static?
Quoted 7 lines
Also mark the structure const as required by
devm_drm_bridge_alloc()parameter type constraints.Fixes ba2db93cf3d5 ("drm/bridge: Move legacy bridge driver out of imx directory for multi-platform use")Reported-by kernel test robot <[email protected]>Signed-off-by Damon Ding <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/bridge/of-display-mode-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/of-display-mode-bridge.c +1
-1@@ -51,7 +51,7 @@ static int of_display_mode_bridge_get_modes(struct drm_bridge *bridge,return 0 ; } -struct drm_bridge_funcs of_display_mode_bridge_funcs = { +static const struct drm_bridge_funcs of_display_mode_bridge_funcs = { .attach = of_display_mode_bridge_attach, .get_modes = of_display_mode_bridge_get_modes, };
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 1 line · Damon Ding
drm/bridge: of-display-mode-bridge: Fix missing static const for the bridge funcs
Signature · 3 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 8 lines · Damon Ding
Add static qualifier for
of_display_mode_bridge_funcsto resolve the sparse warning:
drivers/gpu/drm/bridge/of-display-mode-bridge.c:54:25: sparse: sparse:
symbol 'of_display_mode_bridge_funcs' was not declared. Should it be static?[...]
Applied, thanks!
[1/1] drm/bridge: of-display-mode-bridge: Fix missing static const for the bridge funcs
commit: 6648301c5bb2ef23f0fb15bcb01d21ff66f36799
Best regards,
Signature · 3 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com