public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_conn: Remove redundant memset after kzalloc
@ 2024-08-10 14:14 Kuan-Wei Chiu
  2024-08-20 17:00 ` patchwork-bot+bluetooth
  0 siblings, 1 reply; 2+ messages in thread
From: Kuan-Wei Chiu @ 2024-08-10 14:14 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz
  Cc: jserv, linux-bluetooth, linux-kernel, Kuan-Wei Chiu

Since kzalloc already zeroes the allocated memory, the subsequent
memset call is unnecessary. This patch removes the redundant memset to
clean up the code and enhance efficiency.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
Note: Build test only.

 net/bluetooth/hci_conn.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 8e48ccd2af30..8f0c9322eadb 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -778,7 +778,6 @@ static int hci_le_big_terminate(struct hci_dev *hdev, u8 big, struct hci_conn *c
 	if (!d)
 		return -ENOMEM;
 
-	memset(d, 0, sizeof(*d));
 	d->big = big;
 	d->sync_handle = conn->sync_handle;
 
-- 
2.34.1


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

* Re: [PATCH] Bluetooth: hci_conn: Remove redundant memset after kzalloc
  2024-08-10 14:14 [PATCH] Bluetooth: hci_conn: Remove redundant memset after kzalloc Kuan-Wei Chiu
@ 2024-08-20 17:00 ` patchwork-bot+bluetooth
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2024-08-20 17:00 UTC (permalink / raw)
  To: Kuan-Wei Chiu
  Cc: marcel, johan.hedberg, luiz.dentz, jserv, linux-bluetooth,
	linux-kernel

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Sat, 10 Aug 2024 22:14:15 +0800 you wrote:
> Since kzalloc already zeroes the allocated memory, the subsequent
> memset call is unnecessary. This patch removes the redundant memset to
> clean up the code and enhance efficiency.
> 
> Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
> ---
> Note: Build test only.
> 
> [...]

Here is the summary with links:
  - Bluetooth: hci_conn: Remove redundant memset after kzalloc
    https://git.kernel.org/bluetooth/bluetooth-next/c/7a6abe8d0fdb

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-08-20 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 14:14 [PATCH] Bluetooth: hci_conn: Remove redundant memset after kzalloc Kuan-Wei Chiu
2024-08-20 17:00 ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox