diff mbox series

[-next] tpm: fix platform_no_drv_owner.cocci warning

Message ID 20220701091322.59384-1-yang.lee@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series [-next] tpm: fix platform_no_drv_owner.cocci warning | expand

Commit Message

Yang Li July 1, 2022, 9:13 a.m. UTC
Eliminate the following coccicheck warning:
./drivers/char/tpm/tpm_tis_i2c.c:379:3-8: No need to set .owner here.  The core will do it.

Remove .owner field if calls are used which set it automatically

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/char/tpm/tpm_tis_i2c.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jarkko Sakkinen July 11, 2022, 12:02 a.m. UTC | #1
On Fri, Jul 01, 2022 at 05:13:22PM +0800, Yang Li wrote:
> Eliminate the following coccicheck warning:
> ./drivers/char/tpm/tpm_tis_i2c.c:379:3-8: No need to set .owner here.  The core will do it.
> 
> Remove .owner field if calls are used which set it automatically
> 
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/char/tpm/tpm_tis_i2c.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> index 8e0686fe4eb1..ba0911b1d1ff 100644
> --- a/drivers/char/tpm/tpm_tis_i2c.c
> +++ b/drivers/char/tpm/tpm_tis_i2c.c
> @@ -376,7 +376,6 @@ MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
>  
>  static struct i2c_driver tpm_tis_i2c_driver = {
>  	.driver = {
> -		.owner = THIS_MODULE,
>  		.name = "tpm_tis_i2c",
>  		.pm = &tpm_tis_pm,
>  		.of_match_table = of_match_ptr(of_tis_i2c_match),
> -- 
> 2.20.1.7.g153144c
> 


Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko
diff mbox series

Patch

diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
index 8e0686fe4eb1..ba0911b1d1ff 100644
--- a/drivers/char/tpm/tpm_tis_i2c.c
+++ b/drivers/char/tpm/tpm_tis_i2c.c
@@ -376,7 +376,6 @@  MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
 
 static struct i2c_driver tpm_tis_i2c_driver = {
 	.driver = {
-		.owner = THIS_MODULE,
 		.name = "tpm_tis_i2c",
 		.pm = &tpm_tis_pm,
 		.of_match_table = of_match_ptr(of_tis_i2c_match),