* [PATCH] gpu: drm: bridge: No need to set device_driver owner
@ 2023-05-13 10:12 Anup Sharma
2023-05-16 7:28 ` Neil Armstrong
2023-05-16 8:25 ` Neil Armstrong
0 siblings, 2 replies; 3+ messages in thread
From: Anup Sharma @ 2023-05-13 10:12 UTC (permalink / raw)
To: Inki Dae, Jagan Teki, Marek Szyprowski, Andrzej Hajda,
Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel,
linux-kernel
Cc: anupnewsmail
There is no need to exclusively set the .owner member of the struct
device_driver when defining the platform_driver struct. The Linux core
takes care of setting the .owner member as part of the call to
module_platform_driver() helper function.
Issue identified using the platform_no_drv_owner.cocci Coccinelle
semantic patch as:
drivers/gpu/drm/bridge/samsung-dsim.c:1957:6-11: No need to set .owner here.
The core will do it.
No functional changes are intended.
Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
---
drivers/gpu/drm/bridge/samsung-dsim.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
index e0a402a85787..10dc3315e69e 100644
--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -1954,7 +1954,6 @@ static struct platform_driver samsung_dsim_driver = {
.remove = samsung_dsim_remove,
.driver = {
.name = "samsung-dsim",
- .owner = THIS_MODULE,
.pm = &samsung_dsim_pm_ops,
.of_match_table = samsung_dsim_of_match,
},
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpu: drm: bridge: No need to set device_driver owner
2023-05-13 10:12 [PATCH] gpu: drm: bridge: No need to set device_driver owner Anup Sharma
@ 2023-05-16 7:28 ` Neil Armstrong
2023-05-16 8:25 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2023-05-16 7:28 UTC (permalink / raw)
To: Anup Sharma, Inki Dae, Jagan Teki, Marek Szyprowski,
Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel,
linux-kernel
On 13/05/2023 12:12, Anup Sharma wrote:
> There is no need to exclusively set the .owner member of the struct
> device_driver when defining the platform_driver struct. The Linux core
> takes care of setting the .owner member as part of the call to
> module_platform_driver() helper function.
>
> Issue identified using the platform_no_drv_owner.cocci Coccinelle
> semantic patch as:
> drivers/gpu/drm/bridge/samsung-dsim.c:1957:6-11: No need to set .owner here.
> The core will do it.
>
> No functional changes are intended.
>
> Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
> ---
> drivers/gpu/drm/bridge/samsung-dsim.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
> index e0a402a85787..10dc3315e69e 100644
> --- a/drivers/gpu/drm/bridge/samsung-dsim.c
> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
> @@ -1954,7 +1954,6 @@ static struct platform_driver samsung_dsim_driver = {
> .remove = samsung_dsim_remove,
> .driver = {
> .name = "samsung-dsim",
> - .owner = THIS_MODULE,
> .pm = &samsung_dsim_pm_ops,
> .of_match_table = samsung_dsim_of_match,
> },
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpu: drm: bridge: No need to set device_driver owner
2023-05-13 10:12 [PATCH] gpu: drm: bridge: No need to set device_driver owner Anup Sharma
2023-05-16 7:28 ` Neil Armstrong
@ 2023-05-16 8:25 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2023-05-16 8:25 UTC (permalink / raw)
To: Inki Dae, Jagan Teki, Marek Szyprowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
David Airlie, Daniel Vetter, dri-devel, linux-kernel, Anup Sharma
Hi,
On Sat, 13 May 2023 15:42:17 +0530, Anup Sharma wrote:
> There is no need to exclusively set the .owner member of the struct
> device_driver when defining the platform_driver struct. The Linux core
> takes care of setting the .owner member as part of the call to
> module_platform_driver() helper function.
>
> Issue identified using the platform_no_drv_owner.cocci Coccinelle
> semantic patch as:
> drivers/gpu/drm/bridge/samsung-dsim.c:1957:6-11: No need to set .owner here.
> The core will do it.
>
> [...]
Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)
[1/1] gpu: drm: bridge: No need to set device_driver owner
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=728cb3f061e2b3a002fd76d91c2449b1497b6640
--
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-16 8:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-13 10:12 [PATCH] gpu: drm: bridge: No need to set device_driver owner Anup Sharma
2023-05-16 7:28 ` Neil Armstrong
2023-05-16 8:25 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox