Skip to contentSkip to conversation

MIPS: vpe-cmp: remove module owner pointer from struct class usage.

PATCH In review Greg Kroah-Hartman 2 participants 3 messages Apr 2, 2023 – Apr 3, 2023 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: vpe-cmp: remove module owner pointer from struct class usage.

In commit 6e30a66433af ("driver core: class: remove struct module owner out of struct class"), the module owner pointer was removed from struct class, but this was missed for the mips vpe-cmp code due to lack of build testing (and it being burried under a very unused config settings.) Fix this up by removing the module pointer to resolve the build error.

Note, there are other problems with the driver model usage in this file (static struct device usage, empty device release function, etc.), so it probably could use some good cleaning up, but odds are this driver really isn't used so hopefully it will just be removed entirely someday soon as part of the general "remove unused arches" cleanup that is slowly happening.

Cc Dengcheng Zhu <[email protected]>
Cc John Crispin <[email protected]>
Cc Qais Yousef <[email protected]>
Cc Steven J. Hill <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Yang Yingliang <[email protected]>
Fixes 6e30a66433af ("driver core: class: remove struct module owner out of struct class")
---
 arch/mips/kernel/vpe-cmp.c | 1 -
 1 file changed, 1 deletion(-)
arch/mips/kernel/vpe-cmp.c +0 -1
index 92140edb3ce3..4ef7f49a4c6d 100644
@@ -79,7 +79,6 @@ static void vpe_device_release(struct device *cd)
 
 static struct class vpe_class = {
 	.name = "vpe",
-	.owner = THIS_MODULE,
 	.dev_release = vpe_device_release,
 	.dev_groups = vpe_groups,
 };
Signature · 1 line
2.40.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 43 lines · Greg Kroah-Hartman

In commit 6e30a66433af ("driver core: class: remove struct module owner out of struct class"), the module owner pointer was removed from struct class, but this was missed for the mips vpe-cmp code due to lack of build testing (and it being burried under a very unused config settings.) Fix this up by removing the module pointer to resolve the build error.

Note, there are other problems with the driver model usage in this file (static struct device usage, empty device release function, etc.), so it probably could use some good cleaning up, but odds are this driver really isn't used so hopefully it will just be removed entirely someday soon as part of the general "remove unused arches" cleanup that is slowly happening.

Cc Dengcheng Zhu <[email protected]>
Cc John Crispin <[email protected]>
Cc Qais Yousef <[email protected]>
Cc Steven J. Hill <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Yang Yingliang <[email protected]>
Fixes 6e30a66433af ("driver core: class: remove struct module owner out of struct class")
---
 arch/mips/kernel/vpe-cmp.c | 1 -
 1 file changed, 1 deletion(-)
arch/mips/kernel/vpe-cmp.c +0 -1
index 92140edb3ce3..4ef7f49a4c6d 100644
@@ -79,7 +79,6 @@ static void vpe_device_release(struct device *cd)
 
 static struct class vpe_class = {
 	.name = "vpe",
-	.owner = THIS_MODULE,
 	.dev_release = vpe_device_release,
 	.dev_groups = vpe_groups,
 };
Signature · 1 line
2.40.0

I guess this should go the same way as commit 6e30a66433af, therefore

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#2 lore raw
Quoted 47 lines · Thomas Bogendoerfer
Quoted 43 lines · Greg Kroah-Hartman

In commit 6e30a66433af ("driver core: class: remove struct module owner out of struct class"), the module owner pointer was removed from struct class, but this was missed for the mips vpe-cmp code due to lack of build testing (and it being burried under a very unused config settings.) Fix this up by removing the module pointer to resolve the build error.

Note, there are other problems with the driver model usage in this file (static struct device usage, empty device release function, etc.), so it probably could use some good cleaning up, but odds are this driver really isn't used so hopefully it will just be removed entirely someday soon as part of the general "remove unused arches" cleanup that is slowly happening.

Cc Dengcheng Zhu <[email protected]>
Cc John Crispin <[email protected]>
Cc Qais Yousef <[email protected]>
Cc Steven J. Hill <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Yang Yingliang <[email protected]>
Fixes 6e30a66433af ("driver core: class: remove struct module owner out of struct class")
---
 arch/mips/kernel/vpe-cmp.c | 1 -
 1 file changed, 1 deletion(-)
arch/mips/kernel/vpe-cmp.c +0 -1
index 92140edb3ce3..4ef7f49a4c6d 100644
@@ -79,7 +79,6 @@ static void vpe_device_release(struct device *cd)
 
 static struct class vpe_class = {
 	.name = "vpe",
-	.owner = THIS_MODULE,
 	.dev_release = vpe_device_release,
 	.dev_groups = vpe_groups,
 };
Signature · 1 line
2.40.0

I guess this should go the same way as commit 6e30a66433af, therefore

Quoted 1 line

Thanks, I'll take it through my tree.

greg k-h