* [PATCH] spi: atcspi200: Remove redundant assignment to .owner
@ 2026-02-20 2:44 xiaopeitux
2026-02-23 2:24 ` CL Wang
2026-02-25 19:07 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: xiaopeitux @ 2026-02-20 2:44 UTC (permalink / raw)
To: cl634, broonie, linux-spi, linux-kernel; +Cc: Pei Xiao
From: Pei Xiao <xiaopei01@kylinos.cn>
The coccicheck tool reports the following warning for this driver:
./spi-atcspi200.c:670:3-8: No need to set .owner here. The core will do it.
The manual assignment of .owner = THIS_MODULE; in the platform_driver
struct is redundant. The platform_driver_register() function, which is
called to register the driver, is a macro that 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>
---
drivers/spi/spi-atcspi200.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spi/spi-atcspi200.c b/drivers/spi/spi-atcspi200.c
index 60a37ff5c6f5..2075058387f3 100644
--- a/drivers/spi/spi-atcspi200.c
+++ b/drivers/spi/spi-atcspi200.c
@@ -667,7 +667,6 @@ static struct platform_driver atcspi_driver = {
.probe = atcspi_probe,
.driver = {
.name = "atcspi200",
- .owner = THIS_MODULE,
.of_match_table = atcspi_of_match,
.pm = pm_sleep_ptr(&atcspi_pm_ops)
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: atcspi200: Remove redundant assignment to .owner
2026-02-20 2:44 [PATCH] spi: atcspi200: Remove redundant assignment to .owner xiaopeitux
@ 2026-02-23 2:24 ` CL Wang
2026-02-25 19:07 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: CL Wang @ 2026-02-23 2:24 UTC (permalink / raw)
To: xiaopeitux; +Cc: broonie, linux-spi, linux-kernel, Pei Xiao, cl634
Hi Pei,
Thanks for the patch. It looks good to me.
Acked-by: CL Wang <cl634@andestech.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: atcspi200: Remove redundant assignment to .owner
2026-02-20 2:44 [PATCH] spi: atcspi200: Remove redundant assignment to .owner xiaopeitux
2026-02-23 2:24 ` CL Wang
@ 2026-02-25 19:07 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-02-25 19:07 UTC (permalink / raw)
To: cl634, linux-spi, linux-kernel, xiaopeitux; +Cc: Pei Xiao
On Fri, 20 Feb 2026 10:44:25 +0800, xiaopeitux@foxmail.com wrote:
> The coccicheck tool reports the following warning for this driver:
>
> ./spi-atcspi200.c:670:3-8: No need to set .owner here. The core will do it.
>
> The manual assignment of .owner = THIS_MODULE; in the platform_driver
> struct is redundant. The platform_driver_register() function, which is
> called to register the driver, is a macro that automatically sets the
> driver's owner to THIS_MODULE.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: atcspi200: Remove redundant assignment to .owner
commit: fed6e5084894373d76270cad4a32eb6479ad8247
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-25 19:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 2:44 [PATCH] spi: atcspi200: Remove redundant assignment to .owner xiaopeitux
2026-02-23 2:24 ` CL Wang
2026-02-25 19:07 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox