[dm-devel] Re: [PATCH] Drop 80-character limit in checkpatch.pl

Bartlomiej Zolnierkiewicz bzolnier at gmail.com
Thu Dec 17 16:08:07 UTC 2009


On Thursday 17 December 2009 04:37:41 pm Linus Torvalds wrote:
> 
> On Thu, 17 Dec 2009, Bartlomiej Zolnierkiewicz wrote:
> > 
> > Examples? :)
> 
> They're typically things like this:
> 
> -			ret = sscanf (buf, "0x%lx - 0x%lx", &start_addr, &end_addr);
> +			ret = sscanf(buf, "0x%lx - 0x%lx", &start_addr,
> +				&end_addr);
> 
> ie a line-break that is just annoying and makes the code harder to read 
> rather than easier. 

Well, it could have been done in the other way:

-			ret = sscanf (buf, "0x%lx - 0x%lx", &start_addr, &end_addr);
+			ret = sscanf(buf, "0x%lx - 0x%lx",
+				     &start_addr, &end_addr);

Just an example that the limit itself is usually not a problem
but its literal interpretation is..

I don't feel strongly about it the either way so how's about just
adding the switch and than changing the default (Alasdair?) on top
of it?

--
Bartlomiej Zolnierkiewicz




More information about the dm-devel mailing list