All of lore.kernel.org
 help / color / mirror / Atom feed
* checkpatch whitespace
@ 2009-07-21 10:01 Pavel Machek
  2009-07-21 15:48 ` Daniel Barkalow
  2009-07-22 11:05 ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 5+ messages in thread
From: Pavel Machek @ 2009-07-21 10:01 UTC (permalink / raw)
  To: apw, kernel list

Hi!

Checkpatch regulary complains about bad whitespace:

pavel@amd:/data/l/linux-msm/drivers/input/touchscreen$
../../../scripts/checkpatch.pl --file synaptics_i2c_rmi.c
ERROR: trailing whitespace
#245: FILE: synaptics_i2c_rmi.c:245:
+^Ipr_info("synaptics: version %x, product property %x\n", $

ERROR: trailing whitespace
#250: FILE: synaptics_i2c_rmi.c:250:
+static void compute_areas(struct synaptics_ts_data *ts,^I$

ERROR: trailing whitespace
#326: FILE: synaptics_i2c_rmi.c:326:
+^I^I^I     -inactive_area_left, max_x + inactive_area_right, $

ERROR: trailing whitespace
#468: FILE: synaptics_i2c_rmi.c:468:
+^I^Ipr_err("synaptics: Unable to register %s input device\n", $

ERROR: trailing whitespace
#497: FILE: synaptics_i2c_rmi.c:497:
+^Ipr_info("synaptics: Start touchscreen %s in %s mode\n", $

total: 5 errors, 0 warnings, 635 lines checked


I don't think that a bit of trailing whitespace hurts that much (it is
very easy to create when fixing overly long lines, another checkpatch
complain), and at least akpm autofixes the whitespace, anyway, but...

Would it be possible to add autofixing to checkpatch? Fixing
whitespace issues by hand is useless & boring task...
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: checkpatch whitespace
  2009-07-22 11:05 ` Bartlomiej Zolnierkiewicz
@ 2009-07-21 13:06   ` Andy Whitcroft
  2009-07-21 22:37     ` Pavel Machek
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Whitcroft @ 2009-07-21 13:06 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Pavel Machek, kernel list

On Wed, Jul 22, 2009 at 01:05:27PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Tuesday 21 July 2009 12:01:14 Pavel Machek wrote:
> 
> > Would it be possible to add autofixing to checkpatch? Fixing
> > whitespace issues by hand is useless & boring task...
> 
> That's why most people use scripts for it.. ;)
> 
> scripts/cleanfile
> scripts/cleanpatch
> 
> Maybe we should make checkpatch inform people about them
> (if any whitespace errors were detected)..

That sounds like a good idea.  Will have a look at doing that.

-apw

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: checkpatch whitespace
  2009-07-21 10:01 checkpatch whitespace Pavel Machek
@ 2009-07-21 15:48 ` Daniel Barkalow
  2009-07-22 11:05 ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Barkalow @ 2009-07-21 15:48 UTC (permalink / raw)
  To: Pavel Machek; +Cc: apw, kernel list

On Tue, 21 Jul 2009, Pavel Machek wrote:

> I don't think that a bit of trailing whitespace hurts that much (it is
> very easy to create when fixing overly long lines, another checkpatch
> complain), and at least akpm autofixes the whitespace, anyway, but...

The problem with trailing whitespace in files is that future developers 
have to keep it the same while making changes in the area, or it'll add 
noise to their commits and patches. Fixing up a patch to stop removing 
trailing whitespace is even more of a pain than fixing a patch to stop 
adding it.

> Would it be possible to add autofixing to checkpatch? Fixing
> whitespace issues by hand is useless & boring task...

Until checkpatch does it, "git apply" can be configured to auto-correct.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: checkpatch whitespace
  2009-07-21 13:06   ` Andy Whitcroft
@ 2009-07-21 22:37     ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2009-07-21 22:37 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Bartlomiej Zolnierkiewicz, kernel list

On Tue 2009-07-21 14:06:18, Andy Whitcroft wrote:
> On Wed, Jul 22, 2009 at 01:05:27PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > On Tuesday 21 July 2009 12:01:14 Pavel Machek wrote:
> > 
> > > Would it be possible to add autofixing to checkpatch? Fixing
> > > whitespace issues by hand is useless & boring task...
> > 
> > That's why most people use scripts for it.. ;)
> > 
> > scripts/cleanfile
> > scripts/cleanpatch
> > 
> > Maybe we should make checkpatch inform people about them
> > (if any whitespace errors were detected)..
> 
> That sounds like a good idea.  Will have a look at doing that.

Yes, that would be great. Thanks!

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: checkpatch whitespace
  2009-07-21 10:01 checkpatch whitespace Pavel Machek
  2009-07-21 15:48 ` Daniel Barkalow
@ 2009-07-22 11:05 ` Bartlomiej Zolnierkiewicz
  2009-07-21 13:06   ` Andy Whitcroft
  1 sibling, 1 reply; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-07-22 11:05 UTC (permalink / raw)
  To: Pavel Machek; +Cc: apw, kernel list

On Tuesday 21 July 2009 12:01:14 Pavel Machek wrote:

> Would it be possible to add autofixing to checkpatch? Fixing
> whitespace issues by hand is useless & boring task...

That's why most people use scripts for it.. ;)

scripts/cleanfile
scripts/cleanpatch

Maybe we should make checkpatch inform people about them
(if any whitespace errors were detected)..

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-21 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-21 10:01 checkpatch whitespace Pavel Machek
2009-07-21 15:48 ` Daniel Barkalow
2009-07-22 11:05 ` Bartlomiej Zolnierkiewicz
2009-07-21 13:06   ` Andy Whitcroft
2009-07-21 22:37     ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.