lkml.org 
[lkml]   [2011]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2 v3] coccicheck: add M= option to control which dir is processed

On 06/11/2011 12:53 PM, Greg Dietsche wrote:
> Examples:
> make coccicheck M=drivers/net/wireless/
> make coccicheck SUBDIRS=drivers/net/wireless/
>
> Version 2:
> fix patch file names when using M=
> tell coccinelle where the include files are
>
> Version 3:
> Add second include option to support out of tree development
> Fix error message
>
> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
> ---
> scripts/coccicheck | 19 ++++++++++++++-----
> 1 files changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index 1bb1a1b..3c27764 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -9,14 +9,23 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
> # FLAGS="-ignore_unknown_options -very_quiet"
> # OPTIONS=$*
>
> -# Workaround for Coccinelle < 0.2.3
> - FLAGS="-I $srctree/include -very_quiet"
> - shift $(( $# - 1 ))
> - OPTIONS=$1
> + if [ "$KBUILD_EXTMOD" = "" ] ; then
> + # Workaround for Coccinelle < 0.2.3
> + FLAGS="-I $srctree/include -very_quiet"
> + shift $(( $# - 1 ))
> + OPTIONS=$1
> + else
> + echo M= is not currently supported when C=1 or C=2
> + exit 1
> + fi
> else
> ONLINE=0
> FLAGS="-very_quiet"
> - OPTIONS="-dir $srctree"
> + if [ "$KBUILD_EXTMOD" = "" ] ; then
> + OPTIONS="-dir $srctree"
> + else
> + OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree -I $srctree/include -I $KBUILD_EXTMOD/include"
> + fi
> fi
>
> if [ ! -x "$SPATCH" ]; then

what's the process for getting this into the kernel tree?

Greg



\
 
 \ /
  Last update: 2011-11-04 02:57    [W:0.054 / U:15.052 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site