From: "Emilio López" <emilio@elopez.com.ar>
To: Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net,
linux-kernel@vger.kernel.org,
"Emilio López" <emilio@elopez.com.ar>
Subject: [PATCH 2/2] usb: storage: alauda: initialize variables directly
Date: Sun, 12 May 2013 11:43:23 -0300 [thread overview]
Message-ID: <1368369803-17656-2-git-send-email-emilio@elopez.com.ar> (raw)
In-Reply-To: <1368369803-17656-1-git-send-email-emilio@elopez.com.ar>
Clean up the code a bit to initialize the variables directly when
defining them.
Signed-off-by: Emilio López <emilio@elopez.com.ar>
---
Please note that this patch is untested.
drivers/usb/storage/alauda.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
index 77a2ddf..6636a58 100644
--- a/drivers/usb/storage/alauda.c
+++ b/drivers/usb/storage/alauda.c
@@ -249,11 +249,7 @@ static void nand_init_ecc(void) {
/* compute 3-byte ecc on 256 bytes */
static void nand_compute_ecc(unsigned char *data, unsigned char *ecc) {
int i, j, a;
- unsigned char par, bit, bits[8];
-
- par = 0;
- for (j = 0; j < 8; j++)
- bits[j] = 0;
+ unsigned char par = 0, bit, bits[8] = {0};
/* collect 16 checksum bits */
for (i = 0; i < 256; i++) {
--
1.8.2.3
prev parent reply other threads:[~2013-05-12 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-12 14:43 [PATCH 1/2] usb: storage: sddr09: " Emilio López
2013-05-12 14:43 ` Emilio López [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=1368369803-17656-2-git-send-email-emilio@elopez.com.ar \
--to=emilio@elopez.com.ar \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=usb-storage@lists.one-eyed-alien.net \
/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®