mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regulator: Remove unnecessary memset
@ 2025-08-07 12:39 Liao Yuanhong
  2025-08-12 11:05 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Liao Yuanhong @ 2025-08-07 12:39 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown,
	open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK
  Cc: Liao Yuanhong

devm_kzalloc() has already been initialized to full 0 space, there is no
need to use memset() to initialize again.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
 drivers/regulator/tps6524x-regulator.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c
index 3fee7e38c68b..6beb51293e8e 100644
--- a/drivers/regulator/tps6524x-regulator.c
+++ b/drivers/regulator/tps6524x-regulator.c
@@ -598,7 +598,6 @@ static int pmic_probe(struct spi_device *spi)
 
 	spi_set_drvdata(spi, hw);
 
-	memset(hw, 0, sizeof(struct tps6524x));
 	hw->dev = dev;
 	hw->spi = spi;
 	mutex_init(&hw->lock);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: Remove unnecessary memset
  2025-08-07 12:39 [PATCH] regulator: Remove unnecessary memset Liao Yuanhong
@ 2025-08-12 11:05 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-08-12 11:05 UTC (permalink / raw)
  To: Liam Girdwood, linux-kernel, Liao Yuanhong

On Thu, 07 Aug 2025 20:39:49 +0800, Liao Yuanhong wrote:
> devm_kzalloc() has already been initialized to full 0 space, there is no
> need to use memset() to initialize again.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: Remove unnecessary memset
      commit: f6cc4140e161831e5796f099f5abc3af953ae2b8

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] 2+ messages in thread

end of thread, other threads:[~2025-08-12 11:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-07 12:39 [PATCH] regulator: Remove unnecessary memset Liao Yuanhong
2025-08-12 11:05 ` Mark Brown

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®