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 |
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>
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>
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 --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, }, };
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(-)