Re: [PATCH 2/8] staging: nvec: coding style fixes / add copyright notice

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

 



On Sun, 2011-08-07 at 18:03 +0200, Marc Dietrich wrote:
> This patch fixes coding style and adds copyright notices.

Does rather more than that.
> +	/* VK_OEM_102 */
> +	KEY_102ND,

I think this style of comment is pretty poor.
Mixing index and comment makes for difficult reading.

> +static int nvec_status_notifier(struct notifier_block *nb,
> +				unsigned long event_type, void *data)
[]
> -	printk("unhandled msg type %ld, payload: ", event_type);
> -	for (i = 0; i < msg[1]; i++)
> -		printk("%0x ", msg[i+2]);
> -	printk("\n");
> +	printk(KERN_WARNING "unhandled msg type %ld\n", event_type);
> +	print_hex_dump(KERN_WARNING, "payload: ", DUMP_PREFIX_NONE, 16, 1,
> +		msg, msg[1] + 2, true);

Not the same.  I think you want:

	print_hex_dump(KERN_WARNING, "payload: ", DUMP_PREFIX_NONE, 16, 1,
		       msg + 2, msg[1], true);


_______________________________________________
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