[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc/mmu-hash64: Remove duplicated #i
From: |
Thomas Huth |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc/mmu-hash64: Remove duplicated #include statement |
Date: |
Thu, 14 Jul 2016 17:11:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 |
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 <address@hidden>
>> ---
>> target-ppc/mmu-hash64.c | 1 -
>> 1 file changed, 1 deletion(-)
>
> Reviewed-by: Eric Blake <address@hidden>
>
> 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
signature.asc
Description: OpenPGP digital signature