bug-indent
[Top][All Lists]
Advanced

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

Re: Indent and the Linux Kernel


From: david ingamells
Subject: Re: Indent and the Linux Kernel
Date: Tue, 14 Oct 2008 17:12:45 +0200
User-agent: Thunderbird 2.0.0.17 (X11/20080922)

J.R. Mauro wrote:
> Hello,
>
> The Linux kernel has a script called 'Lindent' which is a wrapper
> around indent. It passes indent the following options: -npro -kr -i8
> -ts8 -sob -l80 -ss -ncs -cp1, and for certain indent versions, -il0 as
> well. I've been cleaning up some kernel code lately and I noticed a
> problem with Lindent's suggestion about certain function prototypes.
> Linux uses the sparse tool to do semantic analysis, but also to check
> for proper usage of address spaces for pointers. The kernel defines
> several macros, such as __user and __iomem. These define either to a
> gcc __attibute__ macro or to nothing; they also act as a clue to
> sparse as to what kind of pointer is being passed.
>
> Now my problem is that indent as invoked by the Lindent script doesn't
> understand this odd convention. When it sees something like fun(void
> __iomem *ptr), it seems to think I'm multiplying or something and
> tells me to change this to fun(void __iomem * ptr). Is there a way for
> indent to understand that __iomem, __user, etc. are specifiers that it
> should ignore? I didn't see anything immediately useful in the man
> page.
>
> Thanks,
> ~J.R.
>
>
> _______________________________________________
> bug-indent mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-indent
>
>
>   
You could try the -t option, although in conjunction with that void I'm
not sure what will happen.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]