projects/linux·commit 9b0af401

IB/srp: Remove redundant memset()

9b0af401 · Ishai Rabinovitz <[email protected]> · 2006-10-10 09:51:14 -07:00

scsi_host_alloc() already allocates with kzalloc(), so the struct Scsi_Host
is zeroed out, including the private data portion.  Remove the redundant
memset that zeros this out again in the SRP initiator.

Signed-off-by: Ishai Rabinovitz <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
Commit
9b0af401aae336975e620fccdd294bb763424f3f
Parents
e52e6080

Changes

1 files changed · +0 −1

FileStatusAddDelContent
drivers/infiniband/ulp/srp/ib_srp.cmodified+0−1View file

drivers/infiniband/ulp/srp/ib_srp.c

View file
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 44b9e5b..f1b7a0f 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1708,7 +1708,6 @@ static ssize_t srp_create_target(struct class_device *class_dev,
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;