[openib-general] [PATCH] IB/SRP: Remove redundant memset of the target

Ishai Rabinovitz ishai at mellanox.co.il
Tue Oct 3 14:14:59 PDT 2006


scsi_host_alloc already sets the entire scsi_host (including the privsize to
zero)

This patch removes the redundant memset.

Signed-off-by: Ishai Rabinovitz <ishai at mellanox.co.il>

Index: last_stable/drivers/infiniband/ulp/srp/ib_srp.c
===================================================================
--- last_stable.orig/drivers/infiniband/ulp/srp/ib_srp.c	2006-10-03 15:41:49.000000000 +0200
+++ last_stable/drivers/infiniband/ulp/srp/ib_srp.c	2006-10-03 15:55:19.000000000 +0200
@@ -1731,7 +1731,6 @@ static ssize_t srp_create_target(struct 
 	target_host->max_lun = SRP_MAX_LUN;
 
 	target = host_to_target(target_host);
-	memset(target, 0, sizeof *target);
 
 	target->io_class   = SRP_REV16A_IB_IO_CLASS;
 	target->scsi_host  = target_host;
-- 
Ishai Rabinovitz




More information about the general mailing list