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 <th...@redhat.com> >> --- >> target-ppc/mmu-hash64.c | 1 - >> 1 file changed, 1 deletion(-) > > Reviewed-by: Eric Blake <ebl...@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
signature.asc
Description: OpenPGP digital signature