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:	Wed, 5 Sep 2007 00:34:55 -0400
From:	Mike Frysinger <vapier@...too.org>
To:	linuxsh-dev@...ts.sourceforge.net
Cc:	"Adrian McMenamin" <lkmladrian@...il.com>,
	dmitry.torokhov@...il.com, Paul Mundt <lethal@...ux-sh.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Add support for keyboard on SEGA Dreamcast

On Tuesday 04 September 2007, Adrian McMenamin wrote:
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> +	  Say Y here if you have a DreamCast console running Linux and have

funny caps in Dreamcast

> --- /dev/null
> +++ b/drivers/input/keyboard/maple_keyb.c
> +static void dc_scan_kbd(struct dc_kbd *kbd)

still some funny wrappings in this func ...

> +				printk
> +				    ("Unknown key (scancode %#x) released.",
> +				     kbd->old[i]);
> ...
> +				printk
> +				    ("Unknown key (scancode %#x) pressed.",
> +				     kbd->new[i]);

missing KERN log levels in those printk's

> +static int dc_kbd_connect(struct maple_device *dev)
> +{
> ...
> +	struct dc_kbd *kbd;
> ...
> +	kbd = kzalloc(sizeof(struct dc_kbd), GFP_KERNEL);

i find this more readable/managable myself:
kbd = kzalloc(*kbd, GFP_KERNEL);

> +	kbd->dev = input_allocate_device();
> ...
> +	retval = input_register_device(kbd->dev);
> +	if (unlikely(retval))
> +		goto cleanup;
> ...
> +      cleanup:
> +	kfree(kbd);
> +	return -EINVAL;

i'm not familiar with the input layer, but do you need to deallocate that 
input device if the register fails ?  if so, i guess dc_kbd_disconnect() 
would need tweaking too ...
-mike

Download attachment "signature.asc " of type "application/pgp-signature" (828 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ