mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>, Fabian Frederick <fabf@skynet.be>
Subject: [PATCH 8/8] cdrom: fix init_cdrom_command in dvd_do_auth
Date: Fri, 31 Oct 2014 22:48:04 +0100	[thread overview]
Message-ID: <1414792084-7739-9-git-send-email-fabf@skynet.be> (raw)
In-Reply-To: <1414792084-7739-1-git-send-email-fabf@skynet.be>

Remove memset 0 (init_cdrom_command already does it)
and send sizeof(buf) instead of 0 for buffer size.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/cdrom/cdrom.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 2afe89d..8fce522 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -1639,8 +1639,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
 	struct cdrom_device_ops *cdo = cdi->ops;
 	rpc_state_t rpc_state;
 
-	memset(buf, 0, sizeof(buf));
-	init_cdrom_command(&cgc, buf, 0, CGC_DATA_READ);
+	init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);
 
 	switch (ai->type) {
 	/* LU data send */
-- 
1.9.3


      parent reply	other threads:[~2014-10-31 21:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 21:47 [PATCH 0/8] cdrom: sysctl export + clean-up Fabian Frederick
2014-10-31 21:47 ` [PATCH 1/8] cdrom: include linux/uaccess.h instead of asm/uaccess.h Fabian Frederick
2014-10-31 21:47 ` [PATCH 2/8] cdrom: use static const char * const where possible Fabian Frederick
2014-10-31 21:47 ` [PATCH 3/8] cdrom: fix spaces required errors Fabian Frederick
2014-10-31 21:48 ` [PATCH 4/8] cdrom: move EXPORT_SYMBOL after functions Fabian Frederick
2014-10-31 21:48 ` [PATCH 5/8] cdrom: remove bool comparison/assignment to 0/1 Fabian Frederick
2014-10-31 21:48 ` [PATCH 6/8] cdrom: use bool for true/false initialized variable Fabian Frederick
2014-10-31 21:48 ` [PATCH 7/8] cdrom: cdrom: export sysctl code Fabian Frederick
2014-10-31 22:12   ` Joe Perches
2014-10-31 21:48 ` Fabian Frederick [this message]

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=1414792084-7739-9-git-send-email-fabf@skynet.be \
    --to=fabf@skynet.be \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®