LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>
Subject: [PATCH 2/4] Char: ip2, cleanup globals
Date: Sat, 5 Jul 2008 15:28:24 +0200 [thread overview]
Message-ID: <1215264506-32455-2-git-send-email-jirislaby@gmail.com> (raw)
In-Reply-To: <1215264506-32455-1-git-send-email-jirislaby@gmail.com>
- do not init .bss zeroed data to zero again (by memset or
explicit assignment)
- use char [] instead of char * for string constants
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/char/ip2/ip2main.c | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 8ac1dfe..4174c65 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -150,12 +150,12 @@ static int ip2_read_proc(char *, char **, off_t, int, int *, void * );
/*************/
/* String constants to identify ourselves */
-static char *pcName = "Computone IntelliPort Plus multiport driver";
-static char *pcVersion = "1.2.14";
+static const char pcName[] = "Computone IntelliPort Plus multiport driver";
+static const char pcVersion[] = "1.2.14";
/* String constants for port names */
-static char *pcDriver_name = "ip2";
-static char *pcIpl = "ip2ipl";
+static const char pcDriver_name[] = "ip2";
+static const char pcIpl[] = "ip2ipl";
/***********************/
/* Function Prototypes */
@@ -237,8 +237,8 @@ static const struct file_operations ip2_ipl = {
.open = ip2_ipl_open,
};
-static unsigned long irq_counter = 0;
-static unsigned long bh_counter = 0;
+static unsigned long irq_counter;
+static unsigned long bh_counter;
// Use immediate queue to service interrupts
#define USE_IQI
@@ -286,7 +286,7 @@ MODULE_AUTHOR("Doug McNash");
MODULE_DESCRIPTION("Computone IntelliPort Plus Driver");
MODULE_LICENSE("GPL");
-static int poll_only = 0;
+static int poll_only;
static int Eisa_irq;
static int Eisa_slot;
@@ -613,10 +613,6 @@ static int ip2_loadmain(void)
/* Initialise the iiEllis subsystem. */
iiEllisInit();
- /* Initialize arrays. */
- memset( i2BoardPtrTable, 0, sizeof i2BoardPtrTable );
- memset( DevTable, 0, sizeof DevTable );
-
/* Initialise all the boards we can find (up to the maximum). */
for ( i = 0; i < IP2_MAX_BOARDS; ++i ) {
switch ( ip2config.addr[i] ) {
--
1.5.5.1
next prev parent reply other threads:[~2008-07-05 13:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-05 13:28 [PATCH 1/4] Char: merge ip2main and ip2base Jiri Slaby
2008-07-05 13:28 ` Jiri Slaby [this message]
2008-07-05 13:28 ` [PATCH 3/4] Char: ip2, fix sparse warnings Jiri Slaby
2008-07-05 13:28 ` [PATCH 4/4] Char: ip2, init/deinit cleanup Jiri Slaby
2008-07-22 9:44 ` [PATCH 1/4] Char: merge ip2main and ip2base Andrew Morton
2008-07-22 9:44 ` Alan Cox
2008-07-22 10:06 ` Andrew Morton
2008-07-22 10:25 ` Alan Cox
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=1215264506-32455-2-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH 2/4] Char: ip2, cleanup globals' \
/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
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).