From patchwork Thu Nov 30 13:42:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10084951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F2E646035E for ; Thu, 30 Nov 2017 13:43:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E93DE29FD0 for ; Thu, 30 Nov 2017 13:43:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE03B29FDA; Thu, 30 Nov 2017 13:43:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6174329FD8 for ; Thu, 30 Nov 2017 13:43:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbdK3NnE (ORCPT ); Thu, 30 Nov 2017 08:43:04 -0500 Received: from osg.samsung.com ([64.30.133.232]:46114 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750964AbdK3NnD (ORCPT ); Thu, 30 Nov 2017 08:43:03 -0500 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id B4DD832B57; Thu, 30 Nov 2017 05:43:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tT_5PFf5HL57; Thu, 30 Nov 2017 05:43:01 -0800 (PST) Received: from smtp.s-opensource.com (unknown [179.182.167.145]) by osg.samsung.com (Postfix) with ESMTPSA id 45A5332B4F; Thu, 30 Nov 2017 05:43:01 -0800 (PST) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.89) (envelope-from ) id 1eKP7C-0001jU-OV; Thu, 30 Nov 2017 08:42:58 -0500 From: Mauro Carvalho Chehab To: Jonathan Corbet Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , linux-doc@vger.kernel.org Subject: [PATCH] kernel-doc: parse DECLARE_KFIFO_PTR() Date: Thu, 30 Nov 2017 08:42:57 -0500 Message-Id: X-Mailer: git-send-email 2.14.3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On media, we now have an struct declared with: struct lirc_fh { struct list_head list; struct rc_dev *rc; int carrier_low; bool send_timeout_reports; DECLARE_KFIFO_PTR(rawir, unsigned int); DECLARE_KFIFO_PTR(scancodes, struct lirc_scancode); wait_queue_head_t wait_poll; u8 send_mode; u8 rec_mode; }; Currently, it produces the following error: ./include/media/rc-core.h:96: warning: No description found for parameter 'int' ./include/media/rc-core.h:96: warning: No description found for parameter 'lirc_scancode' ./include/media/rc-core.h:96: warning: Excess struct member 'rawir' description in 'lirc_fh' ./include/media/rc-core.h:96: warning: Excess struct member 'scancodes' description in 'lirc_fh' So, teach kernel-doc how to parse a DECLARE_KFIFO_PTR(); While here, relax at the past DECLARE_foo() macros, accepting a random number of spaces after comma. Signed-off-by: Mauro Carvalho Chehab --- scripts/kernel-doc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index bd29a92b4b48..5c12208f8c89 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -2208,10 +2208,11 @@ sub dump_struct($$) { $members =~ s/__aligned\s*\([^;]*\)//gos; $members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos; # replace DECLARE_BITMAP - $members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; + $members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; # replace DECLARE_HASHTABLE - $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; - + $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos; + # replace DECLARE_KFIFO_PTR(fifo, type) + $members =~ s/DECLARE_KFIFO_PTR\s*\(([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos; create_parameterlist($members, ';', $file); check_sections($file, $declaration_name, $decl_type, $sectcheck, $struct_actual, $nested);