Re: [PATCH] x86, apicdef: Fix checkpatch issues in apicdef.h
From: Maciej W. Rozycki
Date: Tue Nov 03 2009 - 18:35:02 EST
On Sat, 31 Oct 2009, Cyrill Gorcunov wrote:
> [Cyrill Gorcunov - Sat, Oct 31, 2009 at 12:44:31PM +0300]
> | [Rakib Mullick - Sat, Oct 31, 2009 at 03:29:32PM +0600]
> | |
> | | In apicdef.h - we have a checkpatch issue - needs to be fixed.
> | | We were warned by the following checkpatch warning:
> | |
> | | ERROR: space prohibited before that ':' (ctx:WxW)
> | | #276: FILE: arch/x86/include/asm/apicdef.h:376:
> | | + hi : 1;
> | | ^
> | | ---
> | | Signed-off-by: Rakib Mullick <rakib.mullick@xxxxxxxxx>
> | |
> | personally I would not change it even having checkpatch
> | issue. Really, it's easier to read this bitfield width
> | aligned rather then moved left. But this is a personal
> | opinion only (sorry).
I agree -- don't fix what ain't broke!
> On the other hands -- I wonder if we need this structure
> at all. Perhaps there was an idea to use it with suspend/resume
> actions? Ingo, Maciej, Yinghai?
The existence of this structure is purely documentary as it's considered
unsafe to map device registers using bitfields -- first: the C language
standard does not guarantee the layout of bitfield struct members, second:
the compiler may choose to use machine instructions such as BT that are
unsafe for MMIO, so all accesses should be made via the appropriate
Then even as such, the contents are out of date and as such may be
misleading, especially to the newcomers, so I think the choice is either
to fix the declarations or to dump them altogether and given I couldn't be
bothered to do the former, my vote is for the latter.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/