From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Rakib Mullick <rakib.mullick@gmail.com>,
Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH] x86, apicdef: Fix checkpatch issues in apicdef.h
Date: Tue, 3 Nov 2009 23:34:51 +0000 (GMT) [thread overview]
Message-ID: <alpine.LFD.2.00.0911032317240.9725@eddie.linux-mips.org> (raw)
In-Reply-To: <20091031095959.GC4869@lenovo>
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@gmail.com>
> | |
> |
> | 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
accessors.
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.
Maciej
prev parent reply other threads:[~2009-11-03 23:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-31 9:29 Rakib Mullick
2009-10-31 9:44 ` Cyrill Gorcunov
2009-10-31 9:59 ` Cyrill Gorcunov
2009-11-03 23:34 ` Maciej W. Rozycki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0911032317240.9725@eddie.linux-mips.org \
--to=macro@linux-mips.org \
--cc=akpm@linux-foundation.org \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rakib.mullick@gmail.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®