From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752506AbcFWMbL (ORCPT ); Thu, 23 Jun 2016 08:31:11 -0400 Received: from mga02.intel.com ([134.134.136.20]:31106 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454AbcFWM3I (ORCPT ); Thu, 23 Jun 2016 08:29:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,509,1459839600"; d="scan'208";a="1008132049" From: Jani Nikula To: Jani Nikula , Jonathan Corbet Cc: Markus Heiser , Daniel Vetter , Grant Likely , Mauro Carvalho Chehab , Keith Packard , LKML , linux-doc@vger.kernel.org, Hans Verkuil Subject: [docs-next PATCH v2 06/11] kernel-doc: unify all EXPORT_SYMBOL scanning to one place Date: Thu, 23 Jun 2016 15:28:06 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Scan all input files for EXPORT_SYMBOLs along with the explicitly specified export files before actually parsing anything. Signed-off-by: Jani Nikula --- scripts/kernel-doc | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9708a87c7069..932b3f34ff06 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -61,10 +61,10 @@ Output format selection (mutually exclusive): Output selection (mutually exclusive): -export Only output documentation for symbols that have been exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL() - in the same FILE or any -export-file FILE. + in any input FILE or -export-file FILE. -internal Only output documentation for symbols that have NOT been exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL() - in the same FILE or any -export-file FILE. + in any input FILE or -export-file FILE. -function NAME Only output documentation for the given function(s) or DOC: section title(s). All other functions and DOC: sections are ignored. May be specified multiple times. @@ -2792,17 +2792,6 @@ sub process_file($) { return; } - # two passes for -export and -internal - if ($output_selection == OUTPUT_EXPORTED || - $output_selection == OUTPUT_INTERNAL) { - while () { - if (/$export_symbol/o) { - $function_table{$2} = 1; - } - } - seek(IN, 0, 0); - } - $. = 1; $section_counter = 0; @@ -3110,6 +3099,9 @@ if (open(SOURCE_MAP, "<.tmp_filelist.txt")) { if ($output_selection == OUTPUT_EXPORTED || $output_selection == OUTPUT_INTERNAL) { + + push(@export_file_list, @ARGV); + foreach (@export_file_list) { chomp; process_export_file($_); -- 2.1.4