From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754716Ab2LRTRx (ORCPT ); Tue, 18 Dec 2012 14:17:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11013 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753306Ab2LRTRw (ORCPT ); Tue, 18 Dec 2012 14:17:52 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <9cfc0861cd3ae0a7d4e72056c00b8bebef1490eb.1355853060.git.joe@perches.com> References: <9cfc0861cd3ae0a7d4e72056c00b8bebef1490eb.1355853060.git.joe@perches.com> <6433.1355840610@warthog.procyon.org.uk> To: Joe Perches Cc: dhowells@redhat.com, Andrew Morton , Andy Whitcroft , Marcelo Tosatti , Alexander Graf , linux-kernel@vger.kernel.org Subject: Re: [PATCH] checkpatch: Warn on #include Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Joe Perches wrote: > + if ($path =~ "^uapi/") { > + ERROR("UAPI_INCLUDE", > + "#include should not start with uapi/\n" . $herecurr); > } But does this limit the check only to headers in uapi/ directories? You need to be able to do this outside of a uapi/ directory. For instance, include/linux/fs.h shadows include/uapi/linux/fs.h and so the former has to #include the latter directly as or else suffer a circular link. David