* [PATCH] Bluetooth: MGMT: fix zalloc-simple.cocci warnings
@ 2022-09-20 3:19 Yihao Han
2022-09-20 3:43 ` bluez.test.bot
2022-09-20 21:30 ` [PATCH] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Yihao Han @ 2022-09-20 3:19 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-bluetooth, netdev, linux-kernel
Cc: Yihao Han
Use zeroing allocator rather than allocator followed by memset with 0
Generated by: scripts/coccinelle/api/alloc/zalloc-simple.cocci
Signed-off-by: Yihao Han <hanyihao@vivo.com>
---
net/bluetooth/mgmt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index b9b64030a7b0..a92e7e485feb 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -4397,12 +4397,10 @@ static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev,
/* Enough space for 7 features */
len = sizeof(*rp) + (sizeof(rp->features[0]) * 7);
- rp = kmalloc(len, GFP_KERNEL);
+ rp = kzalloc(len, GFP_KERNEL);
if (!rp)
return -ENOMEM;
- memset(rp, 0, len);
-
#ifdef CONFIG_BT_FEATURE_DEBUG
if (!hdev) {
flags = bt_dbg_get() ? BIT(0) : 0;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: Bluetooth: MGMT: fix zalloc-simple.cocci warnings
2022-09-20 3:19 [PATCH] Bluetooth: MGMT: fix zalloc-simple.cocci warnings Yihao Han
@ 2022-09-20 3:43 ` bluez.test.bot
2022-09-20 21:30 ` [PATCH] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-09-20 3:43 UTC (permalink / raw)
To: linux-bluetooth, hanyihao
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=678455
---Test result---
Test Summary:
CheckPatch PASS 1.86 seconds
GitLint PASS 0.81 seconds
SubjectPrefix PASS 0.61 seconds
BuildKernel PASS 46.58 seconds
BuildKernel32 PASS 40.20 seconds
Incremental Build with patchesPASS 60.07 seconds
TestRunner: Setup PASS 675.12 seconds
TestRunner: l2cap-tester PASS 20.67 seconds
TestRunner: iso-tester PASS 21.07 seconds
TestRunner: bnep-tester PASS 8.17 seconds
TestRunner: mgmt-tester PASS 130.62 seconds
TestRunner: rfcomm-tester PASS 12.84 seconds
TestRunner: sco-tester PASS 11.81 seconds
TestRunner: smp-tester PASS 11.98 seconds
TestRunner: userchan-tester PASS 8.70 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: MGMT: fix zalloc-simple.cocci warnings
2022-09-20 3:19 [PATCH] Bluetooth: MGMT: fix zalloc-simple.cocci warnings Yihao Han
2022-09-20 3:43 ` bluez.test.bot
@ 2022-09-20 21:30 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-09-20 21:30 UTC (permalink / raw)
To: Yihao Han
Cc: marcel, johan.hedberg, luiz.dentz, davem, edumazet, kuba, pabeni,
linux-bluetooth, netdev, linux-kernel
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 19 Sep 2022 20:19:58 -0700 you wrote:
> Use zeroing allocator rather than allocator followed by memset with 0
>
> Generated by: scripts/coccinelle/api/alloc/zalloc-simple.cocci
>
> Signed-off-by: Yihao Han <hanyihao@vivo.com>
> ---
> net/bluetooth/mgmt.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Here is the summary with links:
- Bluetooth: MGMT: fix zalloc-simple.cocci warnings
https://git.kernel.org/bluetooth/bluetooth-next/c/239491111238
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] 3+ messages in thread
end of thread, other threads:[~2022-09-20 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-20 3:19 [PATCH] Bluetooth: MGMT: fix zalloc-simple.cocci warnings Yihao Han
2022-09-20 3:43 ` bluez.test.bot
2022-09-20 21:30 ` [PATCH] " 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;
as well as URLs for NNTP newsgroup(s).