← Back to team overview

ac100 team mailing list archive

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

 

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);




References