diff mbox series

[-next,2/2] tsnep: fix platform_no_drv_owner.cocci warning

Message ID 1637721384-70836-2-git-send-email-yang.lee@linux.alibaba.com (mailing list archive)
State Accepted
Delegated to: Netdev Maintainers
Headers show
Series [-next,1/2] tsnep: fix resource_size.cocci warnings | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: gerhard@engleder-embedded.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Yang Li Nov. 24, 2021, 2:36 a.m. UTC
Remove .owner field if calls are used which set it automatically

Eliminate the following coccicheck warning:
./drivers/net/ethernet/engleder/tsnep_main.c:1263:3-8: No need to set
.owner here. The core will do it.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/net/ethernet/engleder/tsnep_main.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Gerhard Engleder Nov. 24, 2021, 8:32 p.m. UTC | #1
>
> Remove .owner field if calls are used which set it automatically
>
> Eliminate the following coccicheck warning:
> ./drivers/net/ethernet/engleder/tsnep_main.c:1263:3-8: No need to set
> .owner here. The core will do it.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/net/ethernet/engleder/tsnep_main.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
> index c48e8ea..3d0408e 100644
> --- a/drivers/net/ethernet/engleder/tsnep_main.c
> +++ b/drivers/net/ethernet/engleder/tsnep_main.c
> @@ -1260,7 +1260,6 @@ static int tsnep_remove(struct platform_device *pdev)
>  static struct platform_driver tsnep_driver = {
>         .driver = {
>                 .name = TSNEP,
> -               .owner = THIS_MODULE,
>                 .of_match_table = of_match_ptr(tsnep_of_match),
>         },
>         .probe = tsnep_probe,
> --
> 1.8.3.1
>

Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Jakub Kicinski Nov. 25, 2021, 2:11 a.m. UTC | #2
On Wed, 24 Nov 2021 21:32:27 +0100 Gerhard Engleder wrote:
> >
> > Remove .owner field if calls are used which set it automatically
> >
> > Eliminate the following coccicheck warning:
> > ./drivers/net/ethernet/engleder/tsnep_main.c:1263:3-8: No need to set
> > .owner here. The core will do it.
> >
> > Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> 
> Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com>

Applied this one and took Gerhard's patch for the resource size thing.
Thanks!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index c48e8ea..3d0408e 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -1260,7 +1260,6 @@  static int tsnep_remove(struct platform_device *pdev)
 static struct platform_driver tsnep_driver = {
 	.driver = {
 		.name = TSNEP,
-		.owner = THIS_MODULE,
 		.of_match_table = of_match_ptr(tsnep_of_match),
 	},
 	.probe = tsnep_probe,