From patchwork Mon May 16 00:21:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 786892 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4G0Jv2I027299 for ; Mon, 16 May 2011 00:19:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660Ab1EPATz (ORCPT ); Sun, 15 May 2011 20:19:55 -0400 Received: from pullcord.laptop.org ([18.85.46.20]:37128 "EHLO pullcord.laptop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369Ab1EPATz (ORCPT ); Sun, 15 May 2011 20:19:55 -0400 Received: from pullcord.laptop.org (localhost.localdomain [127.0.0.1]) by pullcord.laptop.org (8.14.4/8.14.4) with ESMTP id p4G0Lw4g008820; Sun, 15 May 2011 20:21:58 -0400 Received: (from cjb@localhost) by pullcord.laptop.org (8.14.4/8.14.4/Submit) id p4G0LwU3008819; Sun, 15 May 2011 20:21:58 -0400 From: Chris Ball To: linux-mmc@vger.kernel.org, Tony Olech Cc: Chris Ball Subject: [PATCH 3/6] mmc: vub300: Remove initialization of static ints to 0. Date: Sun, 15 May 2011 20:21:45 -0400 Message-Id: <1305505308-8767-3-git-send-email-cjb@laptop.org> X-Mailer: git-send-email 1.7.0.1 In-Reply-To: <1305505308-8767-1-git-send-email-cjb@laptop.org> References: <1305505308-8767-1-git-send-email-cjb@laptop.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 16 May 2011 00:19:57 +0000 (UTC) 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 --- 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 "); 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");