mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: xiaopeitux@foxmail.com
To: oder_chiou@realtek.com, lgirdwood@gmail.com, broonie@kernel.org,
	perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Pei Xiao <xiaopei01@kylinos.cn>
Subject: [PATCH] ASoC: rt5575: Remove redundant assignment to .owner
Date: Fri, 20 Feb 2026 10:56:40 +0800	[thread overview]
Message-ID: <tencent_D7DDB8B646B471AF50B541DA7AC99FBCCD0A@qq.com> (raw)

From: Pei Xiao <xiaopei01@kylinos.cn>

The coccicheck tool reports the following warning for this driver:
./rt5575.c:342:3-8: No need to set .owner here. The core will do it.

The manual assignment of .owner = THIS_MODULE; in the rt5575_i2c_driver
struct is redundant. The i2c_add_driver() function, which is called to
register the driver, automatically sets the driver's owner to THIS_MODULE.

The driver core handles this assignment internally, making the explicit
initialization in the struct definition unnecessary. Remove the
unnecessary line.

Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
 sound/soc/codecs/rt5575.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/codecs/rt5575.c b/sound/soc/codecs/rt5575.c
index c5525ad195ee..24e41af29689 100644
--- a/sound/soc/codecs/rt5575.c
+++ b/sound/soc/codecs/rt5575.c
@@ -339,7 +339,6 @@ MODULE_DEVICE_TABLE(of, rt5575_of_match);
 static struct i2c_driver rt5575_i2c_driver = {
 	.driver = {
 		.name = "rt5575",
-		.owner = THIS_MODULE,
 		.of_match_table = rt5575_of_match,
 	},
 	.probe = rt5575_i2c_probe,
-- 
2.25.1


             reply	other threads:[~2026-02-20  2:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20  2:56 xiaopeitux [this message]
2026-02-25 19:06 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_D7DDB8B646B471AF50B541DA7AC99FBCCD0A@qq.com \
    --to=xiaopeitux@foxmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=xiaopei01@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®