drivers/block/pktcdvd.c : avoid useless memset
PATCH 1/1 drivers/block/pktcdvd.c : avoid useless memset
From: Christophe Jaillet <jaillet.[email protected]>
Hi, here is a patch against linux/drivers/block/pktcdvd.c which :
1) Avoid to 'memset(...,0, ...)' before calling 'init_cdrom_command' because this function already does it.
---
drivers/block/pktcdvd.c +0 -0
@@ -2079,7 +2079,6 @@ static noinline_for_stack int pkt_write_caching(struct pktcdvd_device *pd,
unsigned char buf[64];
int ret;
- memset(buf, 0, sizeof(buf));init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);
cgc.sense = &sense;
cgc.buflen = pd->mode_offset + 12;
@@ -2126,7 +2125,6 @@ static noinline_for_stack int pkt_get_max_speed(struct pktcdvd_device *pd, unsigned char *cap_buf;
int ret, offset;
- memset(buf, 0, sizeof(buf));cap_buf = &buf[sizeof(struct mode_page_header) + pd->mode_offset]; init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_UNKNOWN); cgc.sense = &sense;
Quoted 32 lines · On Sun, 22 Jun 2008 15:34:19 +0200 JAILLET wrote:
From: Christophe Jaillet <jaillet.[email protected]>
Hi, here is a patch against
linux/drivers/block/pktcdvd.cwhich :1) Avoid to '
memset(...,0, ...)' before calling 'init_cdrom_command' because this function already does it.Signed-off-by Christophe Jaillet <jaillet.[email protected]>---
drivers/block/pktcdvd.c +0
-1@@ -2079,7 +2079,6 @@ static noinline_for_stack int pkt_write_caching(struct pktcdvd_device *pd, unsigned char buf[64];int ret; -memset (buf,0 ,sizeof (buf));init_cdrom_command (&cgc, buf,sizeof (buf),CGC_DATA_READ ); cgc.sense = &sense;cgc.buflen =
pd->mode_offset+ 12;drivers/block/pktcdvd.c +0
-1@@ -2126,7 +2125,6 @@ static noinline_for_stack int pkt_get_max_speed(struct pktcdvd_device *pd, unsigned char *cap_buf;int ret, offset; -memset (buf,0 ,sizeof (buf)); cap_buf = &buf[sizeof (struct mode_page_header ) + pd->mode_offset];init_cdrom_command (&cgc, buf,sizeof (buf),CGC_DATA_UNKNOWN );
Quoted 1 line
cgc.sense = &sense;
Looks like tbird ate all of the whitespace.
You can see if Documentation/email-clients.txt has info in it that would help you, then resend the patch.
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
Quoted 5 lines · Randy Dunlap
Looks like tbird ate all of the whitespace.
You can see ifDocumentation/email-clients.txthas info in it that would help you, then resend the patch.
Hi,
thanks for the tips. I hope the 2nd try looks better.
Best regards
CJ