drm/exynos: remove redundant of_match_ptr
Subsystems (3)
PATCH 1/1 drm/exynos: remove redundant of_match_ptr
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr here.
Even for drivers that do not depend on CONFIG_OF, it's almost always better to leave out the of_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with and without it. Hence we remove of_match_ptr.
--- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_gsc.c +1 -1
@@ -1426,6 +1426,6 @@ struct platform_driver gsc_driver = { .name = "exynos-drm-gsc", .owner = THIS_MODULE, .pm = &gsc_pm_ops, - .of_match_table = of_match_ptr(exynos_drm_gsc_of_match), + .of_match_table = exynos_drm_gsc_of_match, }, };
Signature · 1 line
2.17.1
Quoted 9 lines · Zhu Wang
The driver depends on
CONFIG_OF, so it is not necessary to useof_match_ptrhere.Even for drivers that do not depend on
CONFIG_OF, it's almost always better to leave out theof_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with and without it. Hence we removeof_match_ptr.Signed-off-by Zhu Wang <[email protected]>
Best regards,
Krzysztof
2023년 7월 31일 (월) 오후 10:09, Krzysztof Kozlowski <
[email protected]>님이 작성:
Quoted 9 lines · Zhu Wang
Quoted 8 lines
The driver depends on
CONFIG_OF, so it is not necessary to useof_match_ptrhere.Even for drivers that do not depend on
CONFIG_OF, it's almost always better to leave out theof_match_ptr(), since the only thing it can possibly do is to save a few bytes of .text if a driver can be used both with and without it. Hence we removeof_match_ptr.
Quoted 5 lines
Quoted 1 line
Signed-off-by Zhu Wang <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>
Merged.
Thanks,
Inki Dae
Quoted 4 lines
Best regards,
Krzysztof