lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 1 May 2007 21:57:40 +0100
From:	Christoph Hellwig <hch@...radead.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-m68k@...r.kernel.org, linux-kernel@...r.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Michael Schmitz <schmitz@...ian.org>,
	Roman Zippel <zippel@...ux-m68k.org>
Subject: Re: [patch 04/33] m68k: Atari keyboard and mouse support.

What's the reason for splitting this up?  Things would be a quite a bit
simpler if all the code was directly in atakeyb.c.

> +/*
> + * linux/atari/atakeyb.c

This is a good reason why filename comments are a really bad idea :)

> +/* state: 0: off; >0: in progress; >1: 0xf1 received */
> +static volatile int ikbd_self_test;
> +/* timestamp when last received a char */
> +static volatile unsigned long self_test_last_rcv;

Please don't use volatile variable in kernel code.  While linux/m68k doesn't
support smp or preemptible kernels we should at least put in proper synchronization
at the API level.

> +/* bitmap of keys reported as broken */
> +static unsigned long broken_keys[128/(sizeof(unsigned long)*8)] = { 0, };

DECLARE_BITMAP()

> +typedef enum kb_state_t {
> +	KEYBOARD, AMOUSE, RMOUSE, JOYSTICK, CLOCK, RESYNC
> +} KB_STATE_T;
> +
> +#define	IS_SYNC_CODE(sc)	((sc) >= 0x04 && (sc) <= 0xfb)
> +
> +typedef struct keyboard_state {
> +	unsigned char buf[6];
> +	int len;
> +	KB_STATE_T state;
> +} KEYBOARD_STATE;

Please kill the typedefs and shouting names.

> +#ifdef __MODULE__
> +MODULE_PARM(mouse_threshold, "2i");
> +#endif

__MODULE__ is never true and even if it was a MODULE_PARM wouldn't compile.
use an unconditional module_param instead.

> --- linux-m68k-2.6.21.orig/include/linux/input.h
> +++ linux-m68k-2.6.21/include/linux/input.h
> @@ -676,6 +676,7 @@ struct input_absinfo {
>  #define BUS_I2C			0x18
>  #define BUS_HOST		0x19
>  #define BUS_GSC			0x1A
> +#define BUS_ATARI		0x1B

Is this really a separate bus?  Should't we have a BUS_ONBOARD or so instead?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ