* [PATCH] mmc: host: use kzalloc instead of kmalloc and memset
@ 2019-12-17 7:00 Pan Zhang
2019-12-17 7:32 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Pan Zhang @ 2019-12-17 7:00 UTC (permalink / raw)
To: zhangpan26, hushiyuan, ulf.hansson, allison, gregkh, tglx
Cc: linux-mmc, linux-kernel
Signed-off-by: Pan Zhang <zhangpan26@huawei.com>
---
drivers/mmc/host/vub300.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index 6ced1b7..e893ced 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -1227,12 +1227,10 @@ static void __download_offload_pseudocode(struct vub300_mmc_host *vub300,
size -= 1;
if (interrupt_size < size) {
u16 xfer_length = roundup_to_multiple_of_64(interrupt_size);
- u8 *xfer_buffer = kmalloc(xfer_length, GFP_KERNEL);
+ u8 *xfer_buffer = kzalloc(xfer_length, GFP_KERNEL);
if (xfer_buffer) {
int retval;
memcpy(xfer_buffer, data, interrupt_size);
- memset(xfer_buffer + interrupt_size, 0,
- xfer_length - interrupt_size);
size -= interrupt_size;
data += interrupt_size;
retval =
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: host: use kzalloc instead of kmalloc and memset
2019-12-17 7:00 [PATCH] mmc: host: use kzalloc instead of kmalloc and memset Pan Zhang
@ 2019-12-17 7:32 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-12-17 7:32 UTC (permalink / raw)
To: Pan Zhang; +Cc: hushiyuan, ulf.hansson, allison, tglx, linux-mmc, linux-kernel
On Tue, Dec 17, 2019 at 03:00:37PM +0800, Pan Zhang wrote:
> Signed-off-by: Pan Zhang <zhangpan26@huawei.com>
> ---
> drivers/mmc/host/vub300.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
I know I can not take patches without any changelog text, hopefully
other maintainers also do the same.
Please fix,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-17 7:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 7:00 [PATCH] mmc: host: use kzalloc instead of kmalloc and memset Pan Zhang
2019-12-17 7:32 ` Greg KH
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).