login
Header Space

 
 

[PATCH 3/4] firewire: fw-sbp2: remove unnecessary memset

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux1394-devel@...>
Cc: <linux-kernel@...>
Date: Thursday, February 28, 2008 - 3:52 pm

orb came from kzalloc.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
 drivers/firewire/fw-sbp2.c |    3 ---
 1 file changed, 3 deletions(-)

Index: linux/drivers/firewire/fw-sbp2.c
===================================================================
--- linux.orig/drivers/firewire/fw-sbp2.c
+++ linux/drivers/firewire/fw-sbp2.c
@@ -1426,7 +1426,6 @@ static int sbp2_scsi_queuecommand(struct
 	orb->cmd  = cmd;
 
 	orb->request.next.high   = cpu_to_be32(SBP2_ORB_NULL);
-	orb->request.next.low    = 0x0;
 	/*
 	 * At speed 100 we can do 512 bytes per packet, at speed 200,
 	 * 1024 bytes per packet etc.  The SBP-2 max_payload field
@@ -1446,8 +1445,6 @@ static int sbp2_scsi_queuecommand(struct
 	if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0)
 		goto out;
 
-	memset(orb->request.command_block,
-	       0, sizeof(orb->request.command_block));
 	memcpy(orb->request.command_block, cmd->cmnd, COMMAND_SIZE(*cmd->cmnd));
 
 	orb->base.callback = complete_command_orb;

-- 
Stefan Richter
-=====-==--- --=- ===--
http://arcgraph.de/sr/

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4] firewire: trivial fw-sbp2 updates, Stefan Richter, (Thu Feb 28, 3:50 pm)
[PATCH 4/4] firewire: fw-sbp2: reduce log noise, Stefan Richter, (Thu Feb 28, 3:53 pm)
[PATCH 3/4] firewire: fw-sbp2: remove unnecessary memset, Stefan Richter, (Thu Feb 28, 3:52 pm)
[PATCH 2/4] firewire: fw-sbp2: simplify some macros, Stefan Richter, (Thu Feb 28, 3:52 pm)
speck-geostationary