From patchwork Thu Jun 4 09:56:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cong Wang X-Patchwork-Id: 27854 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n54A1kRc029926 for ; Thu, 4 Jun 2009 10:01:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752231AbZFDKBk (ORCPT ); Thu, 4 Jun 2009 06:01:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752081AbZFDKBj (ORCPT ); Thu, 4 Jun 2009 06:01:39 -0400 Received: from mail-px0-f182.google.com ([209.85.216.182]:43089 "EHLO mail-px0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181AbZFDKBj (ORCPT ); Thu, 4 Jun 2009 06:01:39 -0400 Received: by pxi12 with SMTP id 12so644020pxi.33 for ; Thu, 04 Jun 2009 03:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=eYJWqWynBxdkcFLDKg5p4RMFV7kxyC4o6EJHB6iaxWo=; b=mcjKsArEOnAyuSRmwSZ+Zjri6e6/GWM4U5H9hQvi9qjuLXquCWJdhzcgc7HoyUtbOG jyZTtNk2JhDTlTaRQsRVEPi6bfkUFoxvV1Udf5C/BYWNZWBLSoN+iNp4mAlXa9m1OO/W i/ullmQx+xd/F9ZdNNIEixVQV/5NjdEEKUcZM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=H15ZHuVL/NT4+NQ+8sYtNQIh1aEqEwBjx6gq8DW27pkLmvu6KgbEL/V6hjptCzr+G2 ezY1pchtKVfZwwFoNSrUDZRy9W3RUYMVQU2EvB68XybZ4h+eTLqiibNd6QUwdjl8zB4i MixT4zd758DCl1LcmIQfsa9yFnf7CsiMV0KX4= Received: by 10.115.14.1 with SMTP id r1mr2108339wai.23.1244109256402; Thu, 04 Jun 2009 02:54:16 -0700 (PDT) Received: from cr0.nay.redhat.com ([60.247.97.97]) by mx.google.com with ESMTPS id n33sm2888461wag.67.2009.06.04.02.54.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Jun 2009 02:54:15 -0700 (PDT) Date: Thu, 4 Jun 2009 17:56:23 +0800 From: Amerigo Wang To: Sam Ravnborg Cc: Amerigo Wang , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-kbuild@vger.kernel.org Subject: Re: [Patch 1/2] kbuild: two trivial fixes for check headers Message-ID: <20090604095623.GC7030@cr0.nay.redhat.com> References: <20090604080406.7005.27662.sendpatchset@localhost.localdomain> <20090604091519.GA9571@uranus.ravnborg.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090604091519.GA9571@uranus.ravnborg.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org On Thu, Jun 04, 2009 at 11:15:19AM +0200, Sam Ravnborg wrote: >On Thu, Jun 04, 2009 at 04:01:52AM -0400, Amerigo Wang wrote: >> >> Remove a useless 'extern' in an exported header. >> Fix a comment headers_check.pl. > >These two patches has nothing in commom. > >> >> Signed-off-by: WANG Cong >> Cc: Sam Ravnborg >> >> ------ >> diff --git a/include/mtd/jffs2-user.h b/include/mtd/jffs2-user.h >> index fa94b0e..10dc7ef 100644 >> --- a/include/mtd/jffs2-user.h >> +++ b/include/mtd/jffs2-user.h >> @@ -18,7 +18,7 @@ >> #undef je32_to_cpu >> #undef jemode_to_cpu >> >> -extern int target_endian; >> +int target_endian; > >You now declare a global variable named target_endian each time you include this file - which is wrong. Hmmm, the script seems wrong, not the C code. :) And the word 'prototype' is only for functions. How about patch below? Signed-off-by: WANG Cong --- -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 56f90a4..11dc869 100644 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl @@ -2,7 +2,7 @@ # # headers_check.pl execute a number of trivial consistency checks # -# Usage: headers_check.pl dir [files...] +# Usage: headers_check.pl dir arch [files...] # dir: dir to look for included files # arch: architecture # files: list of files to check @@ -63,7 +63,7 @@ sub check_include sub check_prototypes { - if ($line =~ m/^\s*extern\b/) { + if ($line =~ m/^\s*extern\b.*\(.*\)/) { printf STDERR "$filename:$lineno: extern's make no sense in userspace\n"; } }