mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: JAILLET <jaillet.christophe@wanadoo.fr>
Cc: petero2@telia.com, linux <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] drivers/block/pktcdvd.c : avoid useless memset
Date: Sun, 22 Jun 2008 09:26:55 -0700	[thread overview]
Message-ID: <20080622092655.27b2c388.randy.dunlap@oracle.com> (raw)
In-Reply-To: <485E54DB.6060804@wanadoo.fr>

On Sun, 22 Jun 2008 15:34:19 +0200 JAILLET wrote:

> From: Christophe Jaillet <jaillet.christophe@wanadoo.fr>
> 
> 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.
> 
> 
> Signed-off-by: Christophe Jaillet <jaillet.christophe@wanadoo.fr>
> 
> ---
> diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
> index 3ba1df9..8369ebc 100644
> --- a/drivers/block/pktcdvd.c
> +++ b/drivers/block/pktcdvd.c
> @@ -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;

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/

  reply	other threads:[~2008-06-22 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-22 13:34 JAILLET
2008-06-22 16:26 ` Randy Dunlap [this message]
2008-06-22 20:21   ` JAILLET Christophe
2008-06-22 21:37 JAILLET Christophe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080622092655.27b2c388.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=jaillet.christophe@wanadoo.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petero2@telia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome