Re: [PATCH 4/9] staging: nvec: ps2: add some more debug functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 26, 2011 at 05:57:35PM +0100, Julian Andres Klode wrote:
>  	case NVEC_PS2:
> -		if (msg[2] == 1)
> +		if (msg[2] == 1) {
>  			for (i = 0; i < (msg[1] - 2); i++)
>  				serio_interrupt(ps2_dev.ser_dev, msg[i + 4], 0);
> -		else if (msg[1] != 2) {	/* !ack */
> -			print_hex_dump(KERN_WARNING, "unhandled mouse event: ",
> -				DUMP_PREFIX_NONE, 16, 1,
> -				msg, msg[1] + 2, true);
> +			NVEC_PHD("ps/2 mouse reply: ", &msg[4], msg[1] - 2);
>  		}
>  
> +		else if (msg[1] != 2) /* !ack */
> +			NVEC_PHD("unhandled mouse event: ", msg, msg[1] + 2);

Kernel style is that the else goes on the same line as the close
brace and if one side of the if else statement gets braces then they
both do.
	if (foo) {
		frob();
		frob();
		frob();
	} else {
		frob_once();
	}

regards,
dan carpenter

>  		return NOTIFY_STOP;
>  	}
>  
> -- 
> 1.7.7.3
> 
> _______________________________________________
> devel mailing list
> devel@xxxxxxxxxxxxxxxxxxxxxx
> http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux