public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Lindent and __user, etc.
@ 2008-10-14 17:27 J.R. Mauro
  2008-10-18  4:54 ` J.R. Mauro
  0 siblings, 1 reply; 2+ messages in thread
From: J.R. Mauro @ 2008-10-14 17:27 UTC (permalink / raw)
  To: linux-kernel

Indent doesn't understand macros and typedefs, so when running Lindent
it makes some wrong suggestions about pointers. For example, something
like "void fun(void __iomem *ptr)" comes back as "void fun(void
__iomem * ptr)" from Lindent. I emailed the maintainer, and as indent
doesn't do any parsing, the only solution is by telling it your
typedefs with -T. Obviously, telling Lindent about every typedef and
special macro in the kernel might be prohibitive, but should it at
least know about __kernel, __user, etc. and all the u8, u16, etc.
typedefs?

Letting indent know about some common typenames will also help it find
other style bugs it currently misses. I can submit more examples if
desired, and I'll submit a patch to Lindent if people think it would
be a good idea. Please CC me directly with replies.

Thanks,
J.R.

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

end of thread, other threads:[~2008-10-18  4:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 17:27 Lindent and __user, etc J.R. Mauro
2008-10-18  4:54 ` J.R. Mauro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox