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] [day] [month] [year] [list]
Date:	Fri, 14 Jan 2011 08:47:23 +0100
From:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
To:	ahern.michael.t@...il.com
Cc:	gregkh@...e.de, julia@...u.dk, nikai@...ai.net,
	morgan.gatti@...il.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Coding style in serial2002

Hello,

On Fri, Jan 14, 2011 at 12:14:54PM +1100, ahern.michael.t@...il.com wrote:
> @@ -329,7 +332,7 @@ static struct serial_data serial_read(struct file *f, int timeout)
>  
>  		length++;
>  		if (data < 0) {
> -			printk("serial2002 error\n");
> +			printk(KERN_ERR "serial2002 error\n");
better use pr_err

>  			break;
>  		} else if (data & 0x80) {
>  			result.value = (result.value << 7) | (data & 0x7f);
> @@ -402,7 +405,7 @@ static int serial_2002_open(struct comedi_device *dev)
>  	devpriv->tty = filp_open(port, O_RDWR, 0);
>  	if (IS_ERR(devpriv->tty)) {
>  		result = (int)PTR_ERR(devpriv->tty);
> -		printk("serial_2002: file open error = %d\n", result);
> +		printk(KERN_ERR "serial_2002: file open error = %d\n", result);
>  	} else {
>  		struct config_t {
>  
> @@ -434,7 +437,7 @@ static int serial_2002_open(struct comedi_device *dev)
>  		}
>  
>  		tty_setspeed(devpriv->tty, devpriv->speed);
> -		poll_channel(devpriv->tty, 31);	/*  Start reading configuration */
> +		poll_channel(devpriv->tty, 31);	/* Start reading config */
>  		while (1) {
>  			struct serial_data data;
>  
> @@ -451,23 +454,23 @@ static int serial_2002_open(struct comedi_device *dev)
>  				command = (data.value >> 8) & 0x3;
>  				switch (kind) {
>  				case 1:{
IMHO these braces can go away, too.

Best regards
Uwe


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
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