linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Move struct stat64 to uapi.
Date: Wed, 16 Jul 2014 14:27:08 +0100	[thread overview]
Message-ID: <20140716132708.GP29414@arm.com> (raw)
In-Reply-To: <1405420413.9794.10.camel@kazak.uk.xensource.com>

On Tue, Jul 15, 2014 at 11:33:33AM +0100, Ian Campbell wrote:
> On Tue, 2014-07-15 at 09:20 +0100, Will Deacon wrote:
> > Hmm, but struct kstat is defined in linux/stat.h so I'm not sure why this is
> > arm64-specific. linux/fs.h includes that on line 10.
> 
> That include won't do anything because we already got here via
> linux/stat.h (6th line of "In file included from" above), so the guard
> has already been defined. IOW there is a loop in the includes, which
> starts before kstat is struct defined:
> 
> linux/stat.h -> asm/stat.h -> arm/compat.h -> linux/ptrace.h ->
> linux_pidnamespace.h -> linux/mm.h -> linux/fs.h
> 
> The last link here is added by aufs patches, but all the other arches
> are ok with this because none of them have asm/stat.h, they only have
> uapi/asm/stat.h.
> 
> The issue ultimately is down to the asm/stat.h -> asm/compat.h link
> though I think so an alternative fix could be to switch to a different
> set of types for the existing definition and ditching asm/compat.h from
> asm/stat.h. I don't think that's the correct fix though.

Perhaps we could split asm/compat.h into asm/compat-types.h containing just
the type definitions, then asm/compat.h can include that as well as defining
any functions and macros.

Then asm/stat.h just needs to include asm/compat-types.h to avoid the
issue.

> > Can you help me unconfuse myself, please?
> 
> I hope I've managed to reduce rather than increase the confusion ;-)

I think so, but it hurt :)

Will

  reply	other threads:[~2014-07-16 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15  7:39 [PATCH] arm64: Move struct stat64 to uapi Ian Campbell
2014-07-15  8:20 ` Will Deacon
2014-07-15 10:33   ` Ian Campbell
2014-07-16 13:27     ` Will Deacon [this message]
2014-07-16 15:50       ` Ian Campbell
2014-07-16 14:00     ` Arnd Bergmann

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=20140716132708.GP29414@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).