* [PATCH V2] mmc: change to use kmalloc
@ 2015-11-12 11:27 yalin wang
2015-11-19 11:31 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: yalin wang @ 2015-11-12 11:27 UTC (permalink / raw)
To: ulf.hansson, adrian.hunter, akpm, tklauser, yalin.wang2010,
JBottomley, ben, chuanxiao.dong, shawn.lin, justin.wang,
linux-mmc, linux-kernel
Use kmalloc instead of kzalloc, zero the memory is not needed.
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
drivers/mmc/card/block.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c742cfd..c3fd4c8 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -345,7 +345,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
struct mmc_blk_ioc_data *idata;
int err;
- idata = kzalloc(sizeof(*idata), GFP_KERNEL);
+ idata = kmalloc(sizeof(*idata), GFP_KERNEL);
if (!idata) {
err = -ENOMEM;
goto out;
@@ -365,7 +365,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
if (!idata->buf_bytes)
return idata;
- idata->buf = kzalloc(idata->buf_bytes, GFP_KERNEL);
+ idata->buf = kmalloc(idata->buf_bytes, GFP_KERNEL);
if (!idata->buf) {
err = -ENOMEM;
goto idata_err;
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH V2] mmc: change to use kmalloc
2015-11-12 11:27 [PATCH V2] mmc: change to use kmalloc yalin wang
@ 2015-11-19 11:31 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2015-11-19 11:31 UTC (permalink / raw)
To: yalin wang
Cc: Adrian Hunter, Andrew Morton, Tobias Klauser,
JBottomley@Odin.com, Ben Hutchings, Dong, Chuanxiao, Shawn Lin,
Justin Wang (王丁),
linux-mmc, linux-kernel
On 12 November 2015 at 12:27, yalin wang <yalin.wang2010@gmail.com> wrote:
> Use kmalloc instead of kzalloc, zero the memory is not needed.
>
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
Thanks, applied for next! I took liberty to update the change log and
the commit message header to make it more descriptive.
Kind regards
Uffe
> ---
> drivers/mmc/card/block.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index c742cfd..c3fd4c8 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -345,7 +345,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
> struct mmc_blk_ioc_data *idata;
> int err;
>
> - idata = kzalloc(sizeof(*idata), GFP_KERNEL);
> + idata = kmalloc(sizeof(*idata), GFP_KERNEL);
> if (!idata) {
> err = -ENOMEM;
> goto out;
> @@ -365,7 +365,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
> if (!idata->buf_bytes)
> return idata;
>
> - idata->buf = kzalloc(idata->buf_bytes, GFP_KERNEL);
> + idata->buf = kmalloc(idata->buf_bytes, GFP_KERNEL);
> if (!idata->buf) {
> err = -ENOMEM;
> goto idata_err;
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-19 11:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 11:27 [PATCH V2] mmc: change to use kmalloc yalin wang
2015-11-19 11:31 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®