lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 24 Jan 2017 12:13:32 +0000 From: "Valo, Kalle" <kvalo@....qualcomm.com> To: Joe Perches <joe@...ches.com> CC: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>, "ath10k@...ts.infradead.org" <ath10k@...ts.infradead.org>, "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH 2/3] ath10k: use dma_zalloc_coherent() Joe Perches <joe@...ches.com> writes: > On Tue, 2017-01-24 at 05:18 +0000, Valo, Kalle wrote: >> Joe Perches <joe@...ches.com> writes: >> >> > On Mon, 2017-01-23 at 15:04 +0000, Srinivas Kandagatla wrote: >> > > use dma_zalloc_coherent() instead of dma_alloc_coherent and memset(). >> > >> > [] >> > > diff --git a/drivers/net/wireless/ath/ath10k/pci.c >> > > b/drivers/net/wireless/ath/ath10k/pci.c >> > >> > [] >> > > @@ -896,7 +896,7 @@ static int ath10k_pci_diag_read_mem(struct ath10k *ar, u32 address, void *data, >> > > */ >> > > alloc_nbytes = min_t(unsigned int, nbytes, DIAG_TRANSFER_LIMIT); >> > > >> > > - data_buf = (unsigned char *)dma_alloc_coherent(ar->dev, >> > > + data_buf = (unsigned char *)dma_zalloc_coherent(ar->dev, >> > > alloc_nbytes, >> > > &ce_data_base, >> > > GFP_ATOMIC); >> > >> > trivia: >> > >> > Nicer to realign arguments and remove the unnecessary cast. >> > >> > Perhaps: >> > >> > data_buf = dma_zalloc_coherent(ar->dev, alloc_nbytes, &ce_data_base, >> > GFP_ATOMIC); >> >> Sure, but that should be in a separate patch. > > I don't think so, trivial patches can be combined. > > It's also nicer to realign all modified multiline > arguments when performing these changes. > > Coccinelle generally does it automatically. A matter of preference really. I prefer keeping style and functional changes in separate patches, keeps the review simple. And style changes can hide bugs. -- Kalle Valo
Powered by blists - more mailing lists