* [PATCH] Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls
@ 2024-05-31 23:51 Thorsten Blum
2024-06-01 1:12 ` bluez.test.bot
2024-06-03 13:00 ` [PATCH] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2024-05-31 23:51 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz
Cc: linux-bluetooth, linux-kernel, Thorsten Blum
Remove memset(0) after dma_alloc_coherent(), which already zeroes out
the memory, and fix the following two Coccinelle/coccicheck warnings
reported by zalloc-simple.cocci:
btintel_pcie.c:837:19-37: WARNING: dma_alloc_coherent used in
/* Allocate full chunk of data buffer for DMA first and do indexing and
* initialization next, so it can be freed easily
*/
rxq->buf_v_addr already zeroes out memory, so memset is not needed
btintel_pcie.c:792:19-37: WARNING: dma_alloc_coherent used in
/* Allocate full chunk of data buffer for DMA first and do indexing and
* initialization next, so it can be freed easily
*/
txq->buf_v_addr already zeroes out memory, so memset is not needed
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
drivers/bluetooth/btintel_pcie.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 5b6805d87fcf..237d4b27f5d8 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -797,7 +797,6 @@ static int btintel_pcie_setup_txq_bufs(struct btintel_pcie_data *data,
kfree(txq->bufs);
return -ENOMEM;
}
- memset(txq->buf_v_addr, 0, txq->count * BTINTEL_PCIE_BUFFER_SIZE);
/* Setup the allocated DMA buffer to bufs. Each data_buf should
* have virtual address and physical address
@@ -842,7 +841,6 @@ static int btintel_pcie_setup_rxq_bufs(struct btintel_pcie_data *data,
kfree(rxq->bufs);
return -ENOMEM;
}
- memset(rxq->buf_v_addr, 0, rxq->count * BTINTEL_PCIE_BUFFER_SIZE);
/* Setup the allocated DMA buffer to bufs. Each data_buf should
* have virtual address and physical address
--
2.45.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls
2024-05-31 23:51 [PATCH] Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls Thorsten Blum
@ 2024-06-01 1:12 ` bluez.test.bot
2024-06-03 13:00 ` [PATCH] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-06-01 1:12 UTC (permalink / raw)
To: linux-bluetooth, thorsten.blum
[-- Attachment #1: Type: text/plain, Size: 3769 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=857876
---Test result---
Test Summary:
CheckPatch PASS 0.46 seconds
GitLint FAIL 0.43 seconds
SubjectPrefix PASS 0.07 seconds
BuildKernel PASS 29.44 seconds
CheckAllWarning PASS 32.63 seconds
CheckSparse PASS 37.72 seconds
CheckSmatch FAIL 36.01 seconds
BuildKernel32 PASS 28.64 seconds
TestRunnerSetup PASS 517.96 seconds
TestRunner_l2cap-tester PASS 20.27 seconds
TestRunner_iso-tester PASS 30.58 seconds
TestRunner_bnep-tester PASS 4.84 seconds
TestRunner_mgmt-tester PASS 111.42 seconds
TestRunner_rfcomm-tester PASS 7.33 seconds
TestRunner_sco-tester PASS 14.95 seconds
TestRunner_ioctl-tester PASS 7.91 seconds
TestRunner_mesh-tester PASS 5.86 seconds
TestRunner_smp-tester PASS 6.90 seconds
TestRunner_userchan-tester PASS 4.96 seconds
IncrementalBuild PASS 27.83 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
9: B3 Line contains hard tab characters (\t): " /* Allocate full chunk of data buffer for DMA first and do indexing and"
10: B3 Line contains hard tab characters (\t): " * initialization next, so it can be freed easily"
11: B3 Line contains hard tab characters (\t): " */"
12: B3 Line contains hard tab characters (\t): " rxq->buf_v_addr already zeroes out memory, so memset is not needed"
16: B3 Line contains hard tab characters (\t): " /* Allocate full chunk of data buffer for DMA first and do indexing and"
17: B3 Line contains hard tab characters (\t): " * initialization next, so it can be freed easily"
18: B3 Line contains hard tab characters (\t): " */"
19: B3 Line contains hard tab characters (\t): " txq->buf_v_addr already zeroes out memory, so memset is not needed"
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bpa10x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bpa10x.o'
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls
2024-05-31 23:51 [PATCH] Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls Thorsten Blum
2024-06-01 1:12 ` bluez.test.bot
@ 2024-06-03 13:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-06-03 13:00 UTC (permalink / raw)
To: Thorsten Blum; +Cc: marcel, luiz.dentz, 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, 1 Jun 2024 01:51:33 +0200 you wrote:
> Remove memset(0) after dma_alloc_coherent(), which already zeroes out
> the memory, and fix the following two Coccinelle/coccicheck warnings
> reported by zalloc-simple.cocci:
>
> btintel_pcie.c:837:19-37: WARNING: dma_alloc_coherent used in
>
> /* Allocate full chunk of data buffer for DMA first and do indexing and
> * initialization next, so it can be freed easily
> */
> rxq->buf_v_addr already zeroes out memory, so memset is not needed
>
> [...]
Here is the summary with links:
- Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls
https://git.kernel.org/bluetooth/bluetooth-next/c/c137bc53035c
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:[~2024-06-03 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 23:51 [PATCH] Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls Thorsten Blum
2024-06-01 1:12 ` bluez.test.bot
2024-06-03 13:00 ` [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).