Message ID | 20230808021238.2975585-1-lizetao1@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 215c44fa69d7a873e058b2e1c451c12025d94bee |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: mhi: Remove redundant initialization owner in mhi_net_driver | expand |
On Tue, Aug 08, 2023 at 10:12:38AM +0800, Li Zetao wrote: > The module_mhi_driver() will set "THIS_MODULE" to driver.owner when > register a mhi_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>
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Tue, 8 Aug 2023 10:12:38 +0800 you wrote: > The module_mhi_driver() will set "THIS_MODULE" to driver.owner when > register a mhi_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/mhi_net.c | 1 - > 1 file changed, 1 deletion(-) Here is the summary with links: - [net-next] net: mhi: Remove redundant initialization owner in mhi_net_driver https://git.kernel.org/netdev/net-next/c/215c44fa69d7 You are awesome, thank you!
diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index 3d322ac4f6a5..ae169929a9d8 100644 --- a/drivers/net/mhi_net.c +++ b/drivers/net/mhi_net.c @@ -403,7 +403,6 @@ static struct mhi_driver mhi_net_driver = { .id_table = mhi_net_id_table, .driver = { .name = "mhi_net", - .owner = THIS_MODULE, }, };
The module_mhi_driver() will set "THIS_MODULE" to driver.owner when register a mhi_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/mhi_net.c | 1 - 1 file changed, 1 deletion(-)