[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FC1F9E38C0703341A1A750524E2525A901978CD9@XYUS-EX22.xyus.xyratex.com>
Date: Tue, 22 Nov 2011 06:24:01 -0800
From: "Mark Salyzyn" <mark_salyzyn@...xyratex.com>
To: "Thomas Meyer" <thomas@...3r.de>, <JBottomley@...allels.com>,
<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Cc: "Achim Leubner" <Achim_Leubner@...-sierra.com>,
"Mahesh Rajashekhara" <Mahesh_Rajashekhara@...-sierra.com>
Subject: RE: [PATCH] [SCSI] aacraid: Use kmemdup rather than duplicating its implementation
Ack
This driver is maintained by Achim Leubner
<Achim_Leubner@...-sierra.com> and Mahesh Rajashekhara
<Mahesh_Rajashekhara@...-sierra.com>. I have added them so that either
one of them can have the opportunity to respond.
Sincerely -- Mark Salyzyn
-----Original Message-----
From: linux-scsi-owner@...r.kernel.org
[mailto:linux-scsi-owner@...r.kernel.org] On Behalf Of Thomas Meyer
Sent: Thursday, November 17, 2011 5:44 PM
To: JBottomley@...allels.com; linux-scsi@...r.kernel.org;
linux-kernel@...r.kernel.org
Subject: [PATCH] [SCSI] aacraid: 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@...3r.de>
---
diff -u -p a/drivers/scsi/aacraid/commctrl.c
b/drivers/scsi/aacraid/commctrl.c
--- a/drivers/scsi/aacraid/commctrl.c 2011-11-07 19:38:06.463566391
+0100
+++ b/drivers/scsi/aacraid/commctrl.c 2011-11-08 10:53:23.848146953
+0100
@@ -631,15 +631,14 @@ static int aac_send_raw_srb(struct aac_d
}
} else {
struct user_sgmap* usg;
- usg = kmalloc(actual_fibsize - sizeof(struct
aac_srb)
- + sizeof(struct sgmap), GFP_KERNEL);
+ usg = kmemdup(upsg,
+ actual_fibsize - sizeof(struct
aac_srb) + sizeof(struct sgmap),
+ GFP_KERNEL);
if (!usg) {
dprintk((KERN_DEBUG"aacraid: Allocation
error in Raw SRB command\n"));
rcode = -ENOMEM;
goto cleanup;
}
- memcpy (usg, upsg, actual_fibsize -
sizeof(struct aac_srb)
- + sizeof(struct sgmap));
actual_fibsize = actual_fibsize64;
for (i = 0; i < usg->count; i++) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists