* [PATCH] [SCSI] mptfusion: Use kmemdup rather than duplicating its implementation
@ 2011-11-17 22:43 Thomas Meyer
2011-12-19 8:38 ` Nandigama, Nagalakshmi
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2011-11-17 22:43 UTC (permalink / raw)
To: DL-MPTFusionLinux, linux-scsi, linux-kernel
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
--- a/drivers/message/fusion/mptbase.c 2011-11-07 19:37:51.796676955 +0100
+++ b/drivers/message/fusion/mptbase.c 2011-11-08 10:40:23.121014643 +0100
@@ -6003,13 +6003,12 @@ mpt_findImVolumes(MPT_ADAPTER *ioc)
if (mpt_config(ioc, &cfg) != 0)
goto out;
- mem = kmalloc(iocpage2sz, GFP_KERNEL);
+ mem = kmemdup((u8 *)pIoc2, iocpage2sz, GFP_KERNEL);
if (!mem) {
rc = -ENOMEM;
goto out;
}
- memcpy(mem, (u8 *)pIoc2, iocpage2sz);
ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem;
mpt_read_ioc_pg_3(ioc);
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] [SCSI] mptfusion: Use kmemdup rather than duplicating its implementation
2011-11-17 22:43 [PATCH] [SCSI] mptfusion: Use kmemdup rather than duplicating its implementation Thomas Meyer
@ 2011-12-19 8:38 ` Nandigama, Nagalakshmi
0 siblings, 0 replies; 2+ messages in thread
From: Nandigama, Nagalakshmi @ 2011-12-19 8:38 UTC (permalink / raw)
To: Thomas Meyer, DL-MPT Fusion Linux, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
This patch seem to be fine.
Please consider this patch as acked by me.
Regards,
Nagalakshmi
-----Original Message-----
From: Thomas Meyer [mailto:thomas@m3y3r.de]
Sent: Friday, November 18, 2011 4:14 AM
To: DL-MPT Fusion Linux; linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: [PATCH] [SCSI] mptfusion: Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
--- a/drivers/message/fusion/mptbase.c 2011-11-07 19:37:51.796676955 +0100
+++ b/drivers/message/fusion/mptbase.c 2011-11-08 10:40:23.121014643 +0100
@@ -6003,13 +6003,12 @@ mpt_findImVolumes(MPT_ADAPTER *ioc)
if (mpt_config(ioc, &cfg) != 0)
goto out;
- mem = kmalloc(iocpage2sz, GFP_KERNEL);
+ mem = kmemdup((u8 *)pIoc2, iocpage2sz, GFP_KERNEL);
if (!mem) {
rc = -ENOMEM;
goto out;
}
- memcpy(mem, (u8 *)pIoc2, iocpage2sz);
ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem;
mpt_read_ioc_pg_3(ioc);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-19 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17 22:43 [PATCH] [SCSI] mptfusion: Use kmemdup rather than duplicating its implementation Thomas Meyer
2011-12-19 8:38 ` Nandigama, Nagalakshmi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox