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:	Sun, 6 Dec 2009 22:48:57 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Wu Zhangjin <wuzhangjin@...il.com>
Cc:	Ralf Baechle <ralf@...ux-mips.org>, akpm@...ux-foundation.org,
	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
	"Rafael J . Wysocki" <rjw@...k.pl>, zhangfx@...ote.com,
	linux-laptop@...r.kernel.org,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Pavel Machek <pavel@....cz>
Subject: Re: [PATCH v8 8/8] Loongson: YeeLoong: add input/hotkey driver

Hi Wu,

On Sun, Dec 06, 2009 at 03:01:48PM +0800, Wu Zhangjin wrote:
> +
> +#define EC_VER_LEN 64
> +
> +static int black_screen_handler(int status)
> +{
> +	char *p, ec_ver[EC_VER_LEN];
> +
> +	p = strstr(loongson_cmdline, "EC_VER=");
> +	if (!p)
> +		memset(ec_ver, 0, EC_VER_LEN);
> +	else {
> +		strncpy(ec_ver, p, EC_VER_LEN);
> +		p = strstr(ec_ver, " ");
> +		if (p)
> +			*p = '\0';
> +	}
> +

Hmm, why do you copy and parse command lineinstead of using module
param and also doing it just once?

> +	/* Seems EC(>=PQ1D26) does this job for us, we can not do it again,
> +	 * otherwise, the brightness will not resume to the normal level! */
> +	if (strncasecmp(ec_ver, "EC_VER=PQ1D26", 64) < 0)
> +		yeeloong_lcd_vo_set(status);
> +
> +	return status;
> +}

Thanks.

-- 
Dmitry
--
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