From: Eric A. <et...@lc...> - 2005-06-27 01:06:15
|
On Mon, 2005-06-27 at 01:19 +0100, Alan Cox wrote: > On Llu, 2005-06-27 at 01:02, Eric Anholt wrote: > > > definitely vote for 120. You will need to do some manual touch up > > > after Lindent. It will mess up formatting of C99 initializers and some > > > constant blocks. > > > > Please, 80 is standard. > > Not for most code I've looked at. 80 generates horrible formatting like > printf( > "hello", > x, > y+5); > > all the time. Are you saying this: if ((offset>=dev_priv->fb_location) && (offset<dev_priv->gart_vm_start)) return 0; is more readable than: if ((offset >= dev_priv->fb_location) && (offset < dev_priv->gart_vm_start)) return 0; I also like being able to stick two windows side by side for comparing code, where diff isn't really appropriate. At 120 columns, that doesn't fit, even on my 1600x1200 screen. I'm not going to put my foot down on this one, though it would leave us with code quite contradictory to the style of kernel code in two of the projects that the DRM runs on. But I see a lot in here that would be improved by 80-column wrapping (comments starting at the 40th column, for example) and little that would be harmed (a few things that hang just beyond 80 columns, breaking up some strings into multiple lines). I typically use my editor at about 95 columns, to handle code that doesn't wrap (and it's often understandable), but this code seems egregious. > Disagree also about axing the comment - its useful to know why something > is being done. Wait, the comment says "TODO: Remove this; we can't afford to let userspace control something that locks up the graphics card so easily." We're not removing the code being referred to, as far as I've heard, and "we can't afford" is contradictory to what we have agreed on for DRI policy (drivers can't escalate privelege, but can hang the machine). I don't see how this comment would stay as-is. -- Eric Anholt et...@lc... http://people.freebsd.org/~anholt/ anholt@FreeBSD.org |