From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755295AbbIARom (ORCPT ); Tue, 1 Sep 2015 13:44:42 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:55890 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466AbbIARok (ORCPT ); Tue, 1 Sep 2015 13:44:40 -0400 From: Danilo Cesar Lemes de Paula To: dri-devel Cc: Danilo Cesar Lemes de Paula , Daniel Vetter , Jonathan Corbet , Andrew Morton , Johannes Berg , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, intel-gfx Subject: [PATCH] scripts/kernel-doc: Processing -nofunc for functions only Date: Tue, 1 Sep 2015 14:44:14 -0300 Message-Id: <1441129454-10356-1-git-send-email-danilo.cesar@collabora.co.uk> X-Mailer: git-send-email 2.4.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Docproc process EXPORT_SYMBOL(f1) macro and uses -nofunc f1 to avoid duplicated documentation in the next call. It works for most of the cases, but there are some specific situations where a struct has the same name of an already-exported function. Current kernel-doc behavior ignores those structs and do not add them to the final documentation. This patch fixes it. This is non-usual and the only case I've found is the drm_modeset_lock (function and struct) defined in drm_modeset_lock.h and drm_modeset_lock.c. Considering this, it should only affect the DRM documentation by including struct drm_modeset_lock to the final Docbook. Signed-off-by: Danilo Cesar Lemes de Paula Cc: Daniel Vetter Cc: Jonathan Corbet Cc: Andrew Morton Cc: Johannes Berg Cc: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: intel-gfx Cc: dri-devel --- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 12a106c..047deb7 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1827,7 +1827,7 @@ sub output_declaration { my $func = "output_${functype}_$output_mode"; if (($function_only==0) || ( $function_only == 1 && defined($function_table{$name})) || - ( $function_only == 2 && !defined($function_table{$name}))) + ( $function_only == 2 && !($functype eq "function" && defined($function_table{$name})))) { &$func(@_); $section_counter++; -- 2.4.3