qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Eric Blake <eblake@redhat.com>,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] ppc/mmu-hash64: Remove duplicated #include statement
Date: Thu, 14 Jul 2016 17:11:26 +0200	[thread overview]
Message-ID: <dbc14b64-d3b4-b391-4275-64a3ec8a1a8c@redhat.com> (raw)
In-Reply-To: <5787A27B.8020703@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

On 14.07.2016 16:32, Eric Blake wrote:
> On 07/14/2016 02:14 AM, Thomas Huth wrote:
>> No need to include error-report.h twice here.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  target-ppc/mmu-hash64.c | 1 -
>>  1 file changed, 1 deletion(-)
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 
> Markus, do your header cleanup scripts detect any other situations like
> this?

There are indeed other files that include headers twice. You can get an
inaccurate list with following shell magic:

for i in `find include/ -name \*.h` ; do \
 grep -r '#include.*'`echo -n $i | sed s,include/,,` * \
      | sed s/:.*$// | sort > /tmp/dups1.txt ; \
 sort -u </tmp/dups1.txt >/tmp/dups2.txt; \
 DIF=`diff /tmp/dups?.txt | grep '\.[ch]' | tr \< \-` ; \
 if [ "x$DIF" != x ] ; then \
    echo '***' $i '***': ; echo $DIF ; echo; \
 fi ; \
done

Note that there are also valid cases where a file is including a header
multiple times (e.g. the way include/exec/cpu_ldst.h is including
cpu_ldst_template.h multiple times), so there are also false-positives
in this list.

But for the others ... feel free to send some patches ;-)

 Thomas



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2016-07-14 15:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14  8:14 [Qemu-devel] [PATCH] ppc/mmu-hash64: Remove duplicated #include statement Thomas Huth
2016-07-14 14:32 ` Eric Blake
2016-07-14 15:11   ` Thomas Huth [this message]
2016-07-14 16:32   ` Markus Armbruster

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=dbc14b64-d3b4-b391-4275-64a3ec8a1a8c@redhat.com \
    --to=thuth@redhat.com \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).