All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: dhowells@redhat.com, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org, arnd@arndb.de, tglx@linutronix.de,
	mingo@kernel.org, davej@redhat.com
Subject: Re: [PATCH 00/13] UAPI header file split
Date: Wed, 25 Jul 2012 11:23:18 +0100	[thread overview]
Message-ID: <6193.1343211798@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAHO5Pa310CYFKvyN4N21CHoCKJG-eJ04Q-yg1VmgwvgR5N91Rg@mail.gmail.com>

Michael Kerrisk <mtk.manpages@gmail.com> wrote:

> A few other points that I noticed now...
> 
> 1. GIT HISTORY COULD BE RETAINED IN SOME CASES
> ...
> But, as currently scripted the "new" uapi header file does not carry
> over the git history of the old "kapi" header, even though it is an
> exact duplicate of that file.

How do you retain git history?  Git relies entirely on the git client to
notice the rename or excision within a single commit - and this seems to work.

No history derivation clues are stored in the git repo.  It only stores that
the tree was at point A and is now at point B.  How it got there is not
recorded.

> i.e., those cases would be better scripted as the equivalent of
> a 'git mv'.

That's just a macro for "mv; git rm; git add", I believe.

> 2. EMPTY UAPI HEADERS
>
> Some of the resulting uapi header files are empty:
> ...
> I imagine this should be reasonably easy to fix.

Fix how?  The Kbuild files say these headers must exist in UAPI space, but the
__KERNEL__ guards therein don't define any content for them in UAPI.

> 3. HEADER COMMENTS NOT RETAINED IN KAPI FILES
> 
> Another point that may be more difficult to fix is the following. Your
> scripting is predicated on a header file structure that looks like
> this:
> 
>     /* Header comments (copyright, author, license, etc) */
>     #ifndef _GUARD_MACRO_H
>     #define _GUARD_MACRO_H
>     ...
>     #endif
> 
> And the header comments get (sensibly) duplicated in the new uapi header file.
> 
> But some of the header files have this structure:
> 
>     #ifndef _GUARD_MACRO_H
>     #define _GUARD_MACRO_H
>     /* Header comments (copyright, author, license, etc) */
>     ...
>     #endif

Yeah.  The problem was that the header following the guard also might not be
such, but as you say, checking for:

	copyright
	author
	licen[sc]e
	GPL
	warranty
	warranties
	merchantability
	liability

in the comment might well work.

> Some special casing or manual prepatching might best handle the
> following files, where it looks like there are two comments that
> should ideally be retained:

I see.

> Some other special casing may be needed for these files
> 
> include/uapi/linux/virtio_console.h
> include/uapi/sound/emu10k1.h
> include/uapi/linux/netfilter/xt_connmark.h

Hmmm.  Well, the virtio_console.h comment can actually be suitably modified to
get rid of the bit about __KERNEL__ for the UAPI file, I think.

It's looking like any comment that mentions one or more of the key words above
should be duplicated.

> 4. DISINTEGRATE MARKERS LEFT OVER (?)
> 
> Some of the DISINTEGRATE markers that you create during the scripting
> process are left in the final uapi files. Was this intentional?

Ummm... no, there shouldn't be any.

Certainly the marker has worked (the __KERNEL__ guard got retained), but I'm
not sure why it didn't get removed.  Probably my understanding of the black
magic required to make perl do what I want is lacking.

David

  reply	other threads:[~2012-07-25 10:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 21:56 [PATCH 00/13] UAPI header file split David Howells
2012-07-20 21:56 ` [PATCH 01/13] UAPI: Refer to the DRM UAPI headers with <...> and from certain headers only David Howells
2012-07-20 21:57 ` [PATCH 02/13] UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/ David Howells
2012-07-20 21:57 ` [PATCH 03/13] UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ David Howells
2012-07-20 21:57 ` [PATCH 04/13] UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers David Howells
2012-07-20 21:57 ` [PATCH 05/13] UAPI: Partition the header include path sets and add uapi/ header directories David Howells
2012-07-21  9:41   ` David Howells
2012-07-21  9:41     ` David Howells
2012-07-21 10:13   ` David Howells
2012-07-20 21:57 ` [PATCH 06/13] UAPI: (Scripted) Set up UAPI Kbuild files David Howells
2012-07-20 21:58 ` [PATCH 07/13] UAPI: x86: Fix the test_get_len tool David Howells
2012-07-20 21:58 ` [PATCH 08/13] UAPI: x86: Fix insn_sanity build failure after UAPI split David Howells
2012-07-20 21:58 ` [PATCH 09/13] UAPI: Set up uapi/asm/Kbuild.asm David Howells
2012-07-20 21:58 ` [PATCH 10/13] UAPI: Move linux/version.h David Howells
2012-07-20 21:58 ` [PATCH 11/13] UAPI: Remove the objhdr-y export list David Howells
2012-07-20 21:58 ` [PATCH 12/13] UAPI: x86: Differentiate the generated UAPI and internal headers David Howells
2012-07-20 21:59 ` [PATCH 13/13] UAPI: Plumb the UAPI Kbuilds into the user header installation and checking David Howells
2012-07-23 15:50 ` [PATCH 00/13] UAPI header file split Arnd Bergmann
2012-07-24 12:48 ` Michael Kerrisk
2012-07-24 13:19   ` David Howells
2012-07-25  7:48     ` Michael Kerrisk
2012-07-25  7:48       ` Michael Kerrisk
2012-07-25 10:23       ` David Howells [this message]
2012-07-25 11:01         ` Michael Kerrisk
2012-07-25 11:20           ` David Howells
2012-07-26 13:18             ` Michael Kerrisk
2012-07-26 14:32               ` David Howells
2012-07-26 14:35                 ` Michael Kerrisk
2012-07-26 15:22                   ` David Howells
2012-07-25 17:32           ` David Howells
2012-07-25 20:06             ` David Howells
2012-07-25 20:06               ` David Howells
2012-07-25 19:21           ` David Howells
2012-07-25 20:09             ` David Howells
2012-07-25 20:09               ` David Howells
2012-07-26 10:17             ` Michael Kerrisk
2012-07-26 10:46               ` David Howells
2012-07-27  7:07                 ` Michael Kerrisk
2012-07-26 10:46               ` David Howells
2012-07-26 13:29                 ` Michael Kerrisk
2012-08-03  0:15 ` Paul E. McKenney

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=6193.1343211798@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=arnd@arndb.de \
    --cc=davej@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.