* [PATCH] ide: Use kzalloc in idedisk_prepare_flush.
@ 2010-08-02 9:22 Tao Ma
2010-08-02 16:10 ` FUJITA Tomonori
0 siblings, 1 reply; 3+ messages in thread
From: Tao Ma @ 2010-08-02 9:22 UTC (permalink / raw)
To: linux-kernel; +Cc: davem, linux-ide, Tao Ma
Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
drivers/ide/ide-disk.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 33d6503..127a5a2 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -430,12 +430,11 @@ static void ide_disk_unlock_native_capacity(ide_drive_t *drive)
static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
{
ide_drive_t *drive = q->queuedata;
- struct ide_cmd *cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
+ struct ide_cmd *cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
/* FIXME: map struct ide_taskfile on rq->cmd[] */
BUG_ON(cmd == NULL);
- memset(cmd, 0, sizeof(*cmd));
if (ata_id_flush_ext_enabled(drive->id) &&
(drive->capacity64 >= (1UL << 28)))
cmd->tf.command = ATA_CMD_FLUSH_EXT;
--
1.7.1.571.gba4d01
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ide: Use kzalloc in idedisk_prepare_flush.
2010-08-02 9:22 [PATCH] ide: Use kzalloc in idedisk_prepare_flush Tao Ma
@ 2010-08-02 16:10 ` FUJITA Tomonori
2010-08-03 2:06 ` [PATCH v2] ide: Use kzalloc in idedisk_prep_fn Tao Ma
0 siblings, 1 reply; 3+ messages in thread
From: FUJITA Tomonori @ 2010-08-02 16:10 UTC (permalink / raw)
To: tao.ma; +Cc: linux-kernel, davem, linux-ide
On Mon, 2 Aug 2010 17:22:31 +0800
Tao Ma <tao.ma@oracle.com> wrote:
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
> ---
> drivers/ide/ide-disk.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
> index 33d6503..127a5a2 100644
> --- a/drivers/ide/ide-disk.c
> +++ b/drivers/ide/ide-disk.c
> @@ -430,12 +430,11 @@ static void ide_disk_unlock_native_capacity(ide_drive_t *drive)
> static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
> {
> ide_drive_t *drive = q->queuedata;
> - struct ide_cmd *cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
> + struct ide_cmd *cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
>
> /* FIXME: map struct ide_taskfile on rq->cmd[] */
> BUG_ON(cmd == NULL);
>
> - memset(cmd, 0, sizeof(*cmd));
This change conflicts with the change in linux-next (came from Jens'
tree).
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] ide: Use kzalloc in idedisk_prep_fn.
2010-08-02 16:10 ` FUJITA Tomonori
@ 2010-08-03 2:06 ` Tao Ma
0 siblings, 0 replies; 3+ messages in thread
From: Tao Ma @ 2010-08-03 2:06 UTC (permalink / raw)
To: linux-kernel; +Cc: davem, linux-ide, Tao Ma, FUJITA Tomonori
>
> This change conflicts with the change in linux-next (came from Jens'
> tree).
Thanks for pointing it out. Here is the updated one.
Regards,
Tao
>From 5b8ae2eb7e3ecb54ea8db3b296727106148f17b3 Mon Sep 17 00:00:00 2001
From: Tao Ma <tao.ma@oracle.com>
Date: Tue, 3 Aug 2010 08:18:27 +0800
Subject: [PATCH v2] ide: Use kzalloc in idedisk_prep_fn.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/ide/ide-disk.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 7433e07..471bb0d 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -435,12 +435,11 @@ static int idedisk_prep_fn(struct request_queue *q, struct request *rq)
if (!(rq->cmd_flags & REQ_FLUSH))
return BLKPREP_OK;
- cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
+ cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
/* FIXME: map struct ide_taskfile on rq->cmd[] */
BUG_ON(cmd == NULL);
- memset(cmd, 0, sizeof(*cmd));
if (ata_id_flush_ext_enabled(drive->id) &&
(drive->capacity64 >= (1UL << 28)))
cmd->tf.command = ATA_CMD_FLUSH_EXT;
--
1.7.1.571.gba4d01
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-03 2:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02 9:22 [PATCH] ide: Use kzalloc in idedisk_prepare_flush Tao Ma
2010-08-02 16:10 ` FUJITA Tomonori
2010-08-03 2:06 ` [PATCH v2] ide: Use kzalloc in idedisk_prep_fn Tao Ma
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).