+ drivers-block-pktcdvdc-avoid-useless-memset.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     drivers/block/pktcdvd.c: avoid useless memset
has been added to the -mm tree.  Its filename is
     drivers-block-pktcdvdc-avoid-useless-memset.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: drivers/block/pktcdvd.c: avoid useless memset
From: Christophe Jaillet <jaillet.christophe@xxxxxxxxxx>

Avoid the 'memset(...,0, ...)' before calling 'init_cdrom_command' because
this function already does it.

Signed-off-by: Christophe Jaillet <jaillet.christophe@xxxxxxxxxx>
Cc: Peter Osterlund <petero2@xxxxxxxxx>
Cc: Jens Axboe <jens.axboe@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/block/pktcdvd.c |    2 --
 1 file changed, 2 deletions(-)

diff -puN drivers/block/pktcdvd.c~drivers-block-pktcdvdc-avoid-useless-memset drivers/block/pktcdvd.c
--- a/drivers/block/pktcdvd.c~drivers-block-pktcdvdc-avoid-useless-memset
+++ a/drivers/block/pktcdvd.c
@@ -2082,7 +2082,6 @@ static noinline_for_stack int pkt_write_
 	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;
@@ -2129,7 +2128,6 @@ static noinline_for_stack int pkt_get_ma
 	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;
_

Patches currently in -mm which might be from jaillet.christophe@xxxxxxxxxx are

drivers-block-pktcdvdc-avoid-useless-memset.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux