diff mbox series

[net-next] bcm63xx_enet: Remove redundant initialization owner

Message ID 20230808014702.2712699-1-lizetao1@huawei.com (mailing list archive)
State Accepted
Commit 09c80167dbec3c742ed0d0218eef13be648b47ed
Delegated to: Netdev Maintainers
Headers show
Series [net-next] bcm63xx_enet: Remove redundant initialization owner | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers warning 3 maintainers not CCed: petrm@nvidia.com mw@semihalf.com f.fainelli@gmail.com
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 21 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

lizetao Aug. 8, 2023, 1:47 a.m. UTC
The platform_register_drivers() will set "THIS_MODULE" to driver.owner when
register a platform_driver driver, so it is redundant initialization to set
driver.owner in the statement. Remove it for clean code.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
---
 drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Simon Horman Aug. 9, 2023, 12:33 p.m. UTC | #1
On Tue, Aug 08, 2023 at 09:47:02AM +0800, Li Zetao wrote:
> The platform_register_drivers() will set "THIS_MODULE" to driver.owner when
> register a platform_driver driver, so it is redundant initialization to set
> driver.owner in the statement. Remove it for clean code.
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>

Reviewed-by: Simon Horman <horms@kernel.org>
Kalesh Anakkur Purayil Aug. 9, 2023, 1 p.m. UTC | #2
On Wed, Aug 9, 2023 at 6:04 PM Simon Horman <horms@kernel.org> wrote:

> On Tue, Aug 08, 2023 at 09:47:02AM +0800, Li Zetao wrote:
> > The platform_register_drivers() will set "THIS_MODULE" to driver.owner
> when
> > register a platform_driver driver, so it is redundant initialization to
> set
> > driver.owner in the statement. Remove it for clean code.
> >
> > Signed-off-by: Li Zetao <lizetao1@huawei.com>
>
> Reviewed-by: Simon Horman <horms@kernel.org>
>
Looks good to me,
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
patchwork-bot+netdevbpf@kernel.org Aug. 9, 2023, 8:10 p.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 8 Aug 2023 09:47:02 +0800 you wrote:
> The platform_register_drivers() will set "THIS_MODULE" to driver.owner when
> register a platform_driver driver, so it is redundant initialization to set
> driver.owner in the statement. Remove it for clean code.
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>
> ---
>  drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ---
>  1 file changed, 3 deletions(-)

Here is the summary with links:
  - [net-next] bcm63xx_enet: Remove redundant initialization owner
    https://git.kernel.org/netdev/net-next/c/09c80167dbec

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index 2cf96892e565..a741070f1f9a 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1940,7 +1940,6 @@  static struct platform_driver bcm63xx_enet_driver = {
 	.remove	= bcm_enet_remove,
 	.driver	= {
 		.name	= "bcm63xx_enet",
-		.owner  = THIS_MODULE,
 	},
 };
 
@@ -2761,7 +2760,6 @@  static struct platform_driver bcm63xx_enetsw_driver = {
 	.remove	= bcm_enetsw_remove,
 	.driver	= {
 		.name	= "bcm63xx_enetsw",
-		.owner  = THIS_MODULE,
 	},
 };
 
@@ -2791,7 +2789,6 @@  struct platform_driver bcm63xx_enet_shared_driver = {
 	.probe	= bcm_enet_shared_probe,
 	.driver	= {
 		.name	= "bcm63xx_enet_shared",
-		.owner  = THIS_MODULE,
 	},
 };