Skip to contentSkip to conversation

3W RAID drivers: memset not needed in probe

PATCH New Denis Cheng 1 participant 1 message Dec 8, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 3W RAID drivers: memset not needed in probe

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

---
 drivers/scsi/3w-9xxx.c |    2 --
 drivers/scsi/3w-xxxx.c |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
drivers/scsi/3w-9xxx.c +0 -2
index afb262b..cb28511 100644
@@ -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;
drivers/scsi/3w-xxxx.c +0 -2
index 59716eb..a8c12d7 100644
@@ -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;
Signature · 1 line
1.5.3.4