All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: Zwane Mwaikambo <zwane@linux.realnet.co.sz>
Cc: Alan Cox <alan@redhat.com>, <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.4.19-pre10-ac2
Date: Thu, 6 Jun 2002 11:29:12 -0300	[thread overview]
Message-ID: <20020606142912.GK1068@conectiva.com.br> (raw)
In-Reply-To: <20020605151741.GD6438@conectiva.com.br> <Pine.LNX.4.44.0206060808360.26634-100000@netfinity.realnet.co.sz>

Em Thu, Jun 06, 2002 at 08:09:05AM +0200, Zwane Mwaikambo escreveu:
> On Wed, 5 Jun 2002, Arnaldo Carvalho de Melo wrote:
> 
> > Em Wed, Jun 05, 2002 at 02:04:48PM -0400, Alan Cox escreveu:
> > > The speakup code would benefit from a chunk of kernel janitoring I think.
> > 
> > me downloading... I have to have something to do on the taxy on my way to the
> > office... 8)
> 
> Thats either a damn long drive, or one helluva fast laptop ;)

or the statement was a joke 8) Anyway, here is the first cleanup, the laptop
is not that fast...

Alan is it important to keep all the ugly #ifdefs for 2.2 compatibility?

- Arnaldo

--- linux-2.4.19-pre10-ac2/drivers/char/speakup/speakup.c	2002-06-05 21:20:11.000000000 -0300
+++ linux-2.4.19-pre10-ac2.acme/drivers/char/speakup/speakup.c	2002-06-06 07:49:39.000000000 -0300
@@ -126,14 +126,14 @@ extern struct spk_synth synth_txprt;
 
 static int errno;
 char *spk_cfg[] = { DEFAULT_SPKUP_VARS };
-long spk_cfg_map = 0;		/* which ones have been re'alloc'ed */
-int synth_file_inuse = 0;
+long spk_cfg_map;		/* which ones have been re'alloc'ed */
+int synth_file_inuse;
 static struct spk_variable spk_vars[] = { SPKUP_VARS };
-static unsigned char pitch_shift = 0;
+static unsigned char pitch_shift;
 char saved_punc_level = 0x30;
-char mark_cut_flag = 0;
-unsigned short mark_x = 0;
-unsigned short mark_y = 0;
+char mark_cut_flag;
+unsigned short mark_x;
+unsigned short mark_y;
 static char synth_name[10] = CONFIG_SPEAKUP_DEFAULT;
 static struct spk_synth *synths[] = {
 #ifdef CONFIG_SPEAKUP_ACNTPC
@@ -276,9 +276,9 @@ char *default_chars[256] = {
 	"white space"
 };
 
-int spk_keydown = 0;
-int bell_pos = 0;
-static int spk_lastkey = 0;
+int spk_keydown;
+int bell_pos;
+static int spk_lastkey;
 
 struct spk_t *speakup_console[MAX_NR_CONSOLES];
 
@@ -466,7 +466,7 @@ int
 speakup_diacr (unsigned char ch, unsigned int currcons)
 {
 	static unsigned char *buf = "\0\0\0\0\0";
-	static int num = 0;
+	static int num;
 	int tmp = 0;
 
 	buf[num++] = ch;
@@ -1147,7 +1147,7 @@ spk_skip (unsigned short cnt)
 int
 spkup_write (const char *buf, int count)
 {
-	static unsigned short rep_count = 0;
+	static unsigned short rep_count;
 	static char old_ch, oldest_ch, count_buf[30], punc_buf[128];
 	int in_count = count;
 	char *punc_search = NULL;
@@ -1306,30 +1306,14 @@ speakup_file_release (struct inode *ip, 
 	return 0;
 }
 
-#if LINUX_VERSION_CODE >= 0x20300
 static struct file_operations synth_fops = {
-	read:speakup_file_read,
-	write:speakup_file_write,
-	ioctl:speakup_file_ioctl,
-	open:speakup_file_open,
-	release:speakup_file_release,
+	.owner	 = THIS_MODULE;
+	.read	 = speakup_file_read,
+	.write	 = speakup_file_write,
+	.ioctl	 = speakup_file_ioctl,
+	.open	 = speakup_file_open,
+	.release = speakup_file_release,
 };
-#else
-static struct file_operations synth_fops = {
-	NULL,			/* seek */
-	speakup_file_read,
-	speakup_file_write,
-	NULL,			/* readdir */
-	NULL,			/* poll */
-	speakup_file_ioctl,
-	NULL,			/* mmap */
-	speakup_file_open,
-	NULL,			/* flush */
-	speakup_file_release,
-	NULL,
-	NULL,			/* fasync */
-};
-#endif
 
 void
 speakup_register_devsynth (void)
@@ -1433,9 +1417,9 @@ speakup_characters_read_proc (char *page
 	return ((count < begin + len - off) ? count : begin + len - off);
 }
 
-static volatile int chars_timer_active = 0;	// indicates when a timer is set
+static volatile int chars_timer_active;	// indicates when a timer is set
 #if (LINUX_VERSION_CODE < 0x20300)	/* is it a 2.2.x kernel? */
-static struct wait_queue *chars_sleeping_list = NULL;
+static struct wait_queue *chars_sleeping_list;
 #else				/* nope it's 2.3.x */
 static DECLARE_WAIT_QUEUE_HEAD (chars_sleeping_list);
 #endif
@@ -1514,9 +1498,9 @@ speakup_characters_write_proc (struct fi
 			       unsigned long count, void *data)
 {
 	static const int max_description_len = 72;
-	static int cnt = 0, num = 0, state = 0;
+	static int cnt, num, state;
 	static char desc[max_description_len + 1];
-	static unsigned long jiff_last = 0;
+	static unsigned long jiff_last;
 	int i;
 	char ch, *s1, *s2;
 

  reply	other threads:[~2002-06-06 15:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-05 18:04 Linux 2.4.19-pre10-ac2 Alan Cox
2002-06-05 15:17 ` Arnaldo Carvalho de Melo
2002-06-06  6:09   ` Zwane Mwaikambo
2002-06-06 14:29     ` Arnaldo Carvalho de Melo [this message]
2002-06-05 18:19 ` Tomas Szepe
2002-06-05 19:11 ` dean gaudet
2002-06-06 10:11   ` Matt Bernstein
2002-06-06 10:14     ` David S. Miller
2002-06-06 15:00       ` Arnaldo Carvalho de Melo
2002-06-06 12:51     ` Keith Owens
2002-06-06 18:31       ` dean gaudet
2002-06-06 17:45     ` dean gaudet
2002-06-07  8:43       ` Matt Bernstein
2002-06-06  1:18 ` Stephen Rothwell
2002-06-06 19:21 ` Heinz Diehl

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=20020606142912.GK1068@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@linux.realnet.co.sz \
    /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.