Re: [PATCH 01/24] ath6kl: add bmi.c

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

 



On Thu, 2011-07-14 at 09:46 +0300, Kalle Valo wrote:
> On 07/13/2011 03:19 PM, Joe Perches wrote:
> > Add this patch to checkpatch?
> > I'll submit it to Andrew Morton later.
> Awesome! I had no idea checkpatch supports this. Just tested this with
> ath6kl and I don't get long line warnings with long log messages.

Note that this doesn't let you have arbitrarily
long lines just because it's a printk or any other
logging function.  Only the format portion of the
printk may exceed 80 columns.

Any additional arguments for the printk must not
start after or exceed 80 columns.

For instance below, the first ath6kl_info is fine,
the second one is not.

$ cat t.c
static int dump_obj(void)
{
	ath6kl_info("%s: 12345678901234567890123456789012345678901234567890123456789012345678901234567890\n",
		    "some long string");
	ath6kl_info("%s: 12345678901234567890123456789012345678901234567890123456789012345678901234567890\n", "some long string");
}

$ ./scripts/checkpatch.pl -f t.c
WARNING: line over 80 characters
#5: FILE: t.c:5:
+	ath6kl_info("%s: 12345678901234567890123456789012345678901234567890123456789012345678901234567890", "some long string");

total: 0 errors, 1 warnings, 6 lines checked

t.c has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.


_______________________________________________
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