Re: [PATCH 03/30] staging: nvec: Use print_hex_dump() where appropriate

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

 



On Fri, Sep 23, 2011 at 06:37:55PM +0200, Julian Andres Klode wrote:
> -	if ((msg->data[0] >> 7) == 1 && (msg->data[0] & 0x0f) == 5) {
> -		dev_warn(nvec->dev, "ec system event ");
> -		for (i = 0; i < msg->data[1]; i++)
> -			dev_warn(nvec->dev, "%02x ", msg->data[2+i]);
> -		dev_warn(nvec->dev, "\n");
> -	}
> +	if ((msg->data[0] >> 7) == 1 && (msg->data[0] & 0x0f) == 5)
> +		print_hex_dump(KERN_WARNING, "ec system event ",
> +				DUMP_PREFIX_NONE, 16, 1, msg->data,
> +				msg->data[1] + 2, true);
>  
>  	atomic_notifier_call_chain(&nvec->notifier_list, msg->data[0] & 0x8f,
>  				   msg->data);

This fixes a bug as well btw.  The original code used dev_warn() for
continuation printks so it would have looked really bad.

regards,
dan carpenter
_______________________________________________
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