Re: [PATCH] staging:comedi: Fixed coding convention issues.

From: Joe Perches
Date: Sun Jun 13 2010 - 14:12:05 EST


On Sun, 2010-06-13 at 14:27 +0300, Henri HÃkkinen wrote:
> There are several printk statements without the "comedi:" prefix.
> Do you think it is better to leave these as they are, or should they
> be changed to use comedi_xxx macros (which will print the "comedi:"
> prefix)?
>
> printk(KERN_WARNING "BUG: dev->driver=NULL in comedi_device_detach()\n");

I think it's better to convert them.

Anything with "BUG" in the format
maybe should be converted to BUG_ON.

> Also even with logging macros, there will be few lines which go beyond
> the 80 character boundary.

I'd ignore printk related long line warnings.

I suggest coalescing the format string to a single line
where reasonable. If a single printk has non trailing
'\n's in a format, it may be better to split them up.

comedi_info("some incredibly long output line with error: %d\n"
"Another line with some other information: %d\n",
err, info);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/