mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 3W RAID drivers: memset not needed in probe
@ 2007-12-08 15:40 Denis Cheng
  0 siblings, 0 replies; only message in thread
From: Denis Cheng @ 2007-12-08 15:40 UTC (permalink / raw)
  To: Adam Radford; +Cc: linux-scsi, Andrew Morton, linux-kernel

the memory return from scsi_host_alloc is alloced by kzalloc,
which is already zero initilized, so memset not needed.

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 drivers/scsi/3w-9xxx.c |    2 --
 drivers/scsi/3w-xxxx.c |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index afb262b..cb28511 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -2028,8 +2028,6 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
 	}
 	tw_dev = (TW_Device_Extension *)host->hostdata;
 
-	memset(tw_dev, 0, sizeof(TW_Device_Extension));
-
 	/* Save values to device extension */
 	tw_dev->host = host;
 	tw_dev->tw_pci_dev = pdev;
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 59716eb..a8c12d7 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -2295,8 +2295,6 @@ static int __devinit tw_probe(struct pci_dev *pdev, const struct pci_device_id *
 	}
 	tw_dev = (TW_Device_Extension *)host->hostdata;
 
-	memset(tw_dev, 0, sizeof(TW_Device_Extension));
-
 	/* Save values to device extension */
 	tw_dev->host = host;
 	tw_dev->tw_pci_dev = pdev;
-- 
1.5.3.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-08 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-08 15:40 [PATCH] 3W RAID drivers: memset not needed in probe Denis Cheng

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®