From: Michael Rawson <michael.rawson@ubuntu.com>
To: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Subject: [PATCH] cdrom: remove extraneous braces to comply with coding style.
Date: Tue, 25 Dec 2012 22:00:39 +0000 [thread overview]
Message-ID: <50DA2207.3010807@ubuntu.com> (raw)
Hi list, Jens.
Please note that I'm a kernel newbie, hope I'm not about to embarrass myself. :-)
From https://github.com/torvalds/linux/blob/master/Documentation/CodingStyle:
"Printing numbers in parentheses (%d) adds no value and should be avoided."
I saw a couple of parenthesized messages in the cdrom driver I was looking at, have edited them out as a first patch.
I intend this for the mainline branch, though given the patch content I can't see a reason why it wouldn't work elsewhere.
Patch follows:
--- linux-clean/drivers/cdrom/cdrom.c 2012-12-25 20:48:07.130718725 +0000
+++ linux/drivers/cdrom/cdrom.c 2012-12-25 19:49:01.080357984 +0000
@@ -1759,7 +1759,7 @@ static int dvd_do_auth(struct cdrom_devi
break;
default:
- cdinfo(CD_WARNING, "Invalid DVD key ioctl (%d)\n", ai->type);
+ cdinfo(CD_WARNING, "Invalid DVD key ioctl %d\n", ai->type);
return -ENOTTY;
}
@@ -1891,7 +1891,7 @@ static int dvd_read_bca(struct cdrom_dev
s->bca.len = buf[0] << 8 | buf[1];
if (s->bca.len < 12 || s->bca.len > 188) {
- cdinfo(CD_WARNING, "Received invalid BCA length (%d)\n", s->bca.len);
+ cdinfo(CD_WARNING, "Received invalid BCA length %d\n", s->bca.len);
ret = -EIO;
goto out;
}
@@ -1928,12 +1928,12 @@ static int dvd_read_manufact(struct cdro
s->manufact.len = buf[0] << 8 | buf[1];
if (s->manufact.len < 0) {
cdinfo(CD_WARNING, "Received invalid manufacture info length"
- " (%d)\n", s->manufact.len);
+ " %d\n", s->manufact.len);
ret = -EIO;
} else {
if (s->manufact.len > 2048) {
cdinfo(CD_WARNING, "Received invalid manufacture info "
- "length (%d): truncating to 2048\n",
+ "length %d: truncating to 2048\n",
s->manufact.len);
s->manufact.len = 2048;
}
@@ -1965,7 +1965,7 @@ static int dvd_read_struct(struct cdrom_
return dvd_read_manufact(cdi, s, cgc);
default:
- cdinfo(CD_WARNING, ": Invalid DVD structure read requested (%d)\n",
+ cdinfo(CD_WARNING, ": Invalid DVD structure read requested %d\n",
s->type);
return -EINVAL;
}
"Signed-off-by: Michael Rawson <michael.rawson@ubuntu.com>"
If you guys think it's unimportant, appreciated, but suggestions on a better first patch would be good too.
Thanks for attention, criticism on submission would be appreciated.
Happy Christmas (or just have a good day if not),
Michael.
reply other threads:[~2012-12-25 22:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=50DA2207.3010807@ubuntu.com \
--to=michael.rawson@ubuntu.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.