From: Chris Ball <cjb@laptop.org>
To: linux-mmc@vger.kernel.org,
Tony Olech <tony.olech@elandigitalsystems.com>
Cc: Chris Ball <cjb@laptop.org>
Subject: [PATCH 3/6] mmc: vub300: Remove initialization of static ints to 0.
Date: Sun, 15 May 2011 20:21:45 -0400 [thread overview]
Message-ID: <1305505308-8767-3-git-send-email-cjb@laptop.org> (raw)
In-Reply-To: <1305505308-8767-1-git-send-email-cjb@laptop.org>
As Nicolas Pitre points out, we may omit initializing global variables
to 0 -- they are guaranteed to be automatically cleared to 0 at
run-time, and we save space in the compiled binary.
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/host/vub300.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index d5cff96..ac2fa06 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -224,29 +224,28 @@ MODULE_AUTHOR("Tony Olech <tony.olech@elandigitalsystems.com>");
MODULE_DESCRIPTION("VUB300 USB to SD/MMC/SDIO adapter driver");
MODULE_LICENSE("GPL");
-#define INITIALIZE_VALUE_TO_ZERO 0
#define FUN(c) (0x000007 & (c->arg>>28))
#define REG(c) (0x01FFFF & (c->arg>>9))
-static int limit_speed_to_24_MHz = INITIALIZE_VALUE_TO_ZERO;
+static int limit_speed_to_24_MHz;
module_param(limit_speed_to_24_MHz, bool, 0644);
MODULE_PARM_DESC(limit_speed_to_24_MHz, "Limit Max SDIO Clock Speed to 24 MHz");
-static int pad_input_to_usb_pkt = INITIALIZE_VALUE_TO_ZERO;
+static int pad_input_to_usb_pkt;
module_param(pad_input_to_usb_pkt, bool, 0644);
MODULE_PARM_DESC(pad_input_to_usb_pkt,
"Pad USB data input transfers to whole USB Packet");
-static int disable_offload_processing = INITIALIZE_VALUE_TO_ZERO;
+static int disable_offload_processing;
module_param(disable_offload_processing, bool, 0644);
MODULE_PARM_DESC(disable_offload_processing, "Disable Offload Processing");
-static int force_1_bit_data_xfers = INITIALIZE_VALUE_TO_ZERO;
+static int force_1_bit_data_xfers;
module_param(force_1_bit_data_xfers, bool, 0644);
MODULE_PARM_DESC(force_1_bit_data_xfers,
"Force SDIO Data Transfers to 1-bit Mode");
-static int force_polling_for_irqs = INITIALIZE_VALUE_TO_ZERO;
+static int force_polling_for_irqs;
module_param(force_polling_for_irqs, bool, 0644);
MODULE_PARM_DESC(force_polling_for_irqs, "Force Polling for SDIO interrupts");
--
1.7.0.1
next prev parent reply other threads:[~2011-05-16 0:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-16 0:21 [PATCH 1/6] mmc: vub300: Formatting cleanup Chris Ball
2011-05-16 0:21 ` [PATCH 2/6] mmc: vub300: add whitespace after module_param decls Chris Ball
2011-05-16 0:21 ` Chris Ball [this message]
2011-05-16 0:21 ` [PATCH 4/6] mmc: vub300: loop cleanup Chris Ball
2011-05-16 0:21 ` [PATCH 5/6] mmc: vub300: MODULE_* cleanup Chris Ball
2011-05-16 0:21 ` [PATCH 6/6] mmc: vub300: clean up multiline conditionals Chris Ball
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=1305505308-8767-3-git-send-email-cjb@laptop.org \
--to=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=tony.olech@elandigitalsystems.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;
as well as URLs for NNTP newsgroup(s).