Message ID | 20231214070200.24405-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8362587dys; Wed, 13 Dec 2023 23:02:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwbnuEnMcEA2mJdRYmaIO3og0c086kCSkeSf8VxJ5pjAXAm9EZqdcG+9rC4HiWzoadV+sK X-Received: by 2002:a05:6a00:244a:b0:6ce:6898:c426 with SMTP id d10-20020a056a00244a00b006ce6898c426mr5486484pfj.31.1702537328759; Wed, 13 Dec 2023 23:02:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702537328; cv=none; d=google.com; s=arc-20160816; b=WdOVAXiJqQKhdJ6co220yaU/Bcylg5sKeHv48UXpZEZv/tjqL2QaSlr1T2apJAGKwI /RuIg1sOXn5wtwqUbUa4bKxvMXgqeL03Tsc/wDPGhDMQIIhbt9gQFXCjj0tC2eZ3Hwy0 e0vfoSKSxSOhR9LqJ6G9L0kN++PYWSKJPW5jI/sJ9cHmm1bLj0ZWbYjs/zTb3X28ADAx abMwFKedlYf/bUyTTFcojnlY7qJ8tJYtjDhDykboLkRX4YLjAq0cj0+GsvoNfDTNKSa5 8t3E+Hllu/Fo+iwUBwHTi+w5MEjh5vr7wCqd94BD7Hnc9EgN+dwbmCqn0gOvFaLHdFvI 6TOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=FZaOAO5vmABT0i97bp/ZMibUxD398U4/Yahe2hBKgzU=; fh=/KbMc9yqCxxUBJbMBf51c8mKjmBo6m7Q16GbwzlluCs=; b=A8EU8/24kAjTzaTSXtWBtLaNtDCMs7kS8z8w4bVkhxdQpdYQu+JnoQ+FRcbrBdv12c tpDo47ceQ12o/GoUHcBnoniOUXRmh6E9k3NN2sWkV+QOP9Ot1JeGk92haemdsLbIm3yV hzEmI1TFpCd2/Efn5BrVzF3AnhrAQDZwKiZlE+Ysx1MJwAo6qZ1YWxF7g+Cv7o/42FJz LjIaGoi5tjtdQmiJ/n5Ydj0yaYcX7vMD9C4+z/fNGfgVuU+/z+hJgtrkusK/MnADm5e6 pgZ6sx+eQm+LUgBGiczLEznWz9Vl2TOMSLu/LNyrYU/mVaGH/8BbsBYbLnpAbazO3mb8 E4Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="W8n+jLe/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id s3-20020a62e703000000b006cdd595606asi10467878pfh.392.2023.12.13.23.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 23:02:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="W8n+jLe/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id ACF5880A9E26; Wed, 13 Dec 2023 23:02:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234265AbjLNHB4 (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Thu, 14 Dec 2023 02:01:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbjLNHBz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Dec 2023 02:01:55 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07CEEB9; Wed, 13 Dec 2023 23:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=FZaOAO5vmABT0i97bp/ZMibUxD398U4/Yahe2hBKgzU=; b=W8n+jLe/I0E2TDYrMLqrBgsuqL 62NNBe7JtDtRBDwETRGttWq8l+UCTtbI/AGYcEqPN61UpWs+ihrwRWLpGa96hnYlkrMDjNynPE9bb 2l+zjow865xzGyC1+vbEZZhJjArWX6zHprnskaa9VIFc//MlTZH2tW7SyOKZZ+hTVdnKXzpKFDNIO qnf7h+LTmN2UPGIOOrZTXZjn43bsLCT9r/1IEqrhqBpFvxAB92bdVDhwNTgvP5WWIfZ3t2OFKdILC seuw6NA9eQbR9xkuDm7fHXPhVpS1qfr7QpLTZB3mYP8QBmq98Gs2/Yofyt6WOhUXKVSEqCaIqb5lo rCFc2/HQ==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rDfjM-00H3K5-2k; Thu, 14 Dec 2023 07:02:00 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Mauro Carvalho Chehab <mchehab@s-opensource.com>, Jonathan Corbet <corbet@lwn.net>, linux-doc@vger.kernel.org Subject: [PATCH] scripts/kernel-doc: restore warning for Excess struct/union Date: Wed, 13 Dec 2023 23:02:00 -0800 Message-ID: <20231214070200.24405-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 23:02:05 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785239781967437500 X-GMAIL-MSGID: 1785239781967437500 |
Series |
scripts/kernel-doc: restore warning for Excess struct/union
|
|
Commit Message
Randy Dunlap
Dec. 14, 2023, 7:02 a.m. UTC
The warning for Excess struct or union member description was
removed when the $nested parameter of check_sections() was removed.
This causes some kernel-doc notation warnings to be missed.
Recently the kernel test robot somehow reported an Excess member. The
code in kernel-doc has not issued that warning since kernel v4.16, so I
don't know how the robot did it. (See the Link for the report.)
drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs'
I patched that warning away even though I could not reproduce the
warning from kernel-doc. The warning should be issued for extraneous
struct member or union member description, so restore it.
Fixes: 1081de2d2f91 ("scripts: kernel-doc: get rid of $nested parameter")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/all/202312060810.QT9zourt-lkp@intel.com/
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
---
scripts/kernel-doc | 7 +++++++
1 file changed, 7 insertions(+)
Comments
(correcting Mauro's email address) On 12/13/23 23:02, Randy Dunlap wrote: > The warning for Excess struct or union member description was > removed when the $nested parameter of check_sections() was removed. > This causes some kernel-doc notation warnings to be missed. > > Recently the kernel test robot somehow reported an Excess member. The > code in kernel-doc has not issued that warning since kernel v4.16, so I > don't know how the robot did it. (See the Link for the report.) > > drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs' > > I patched that warning away even though I could not reproduce the > warning from kernel-doc. The warning should be issued for extraneous > struct member or union member description, so restore it. > > Fixes: 1081de2d2f91 ("scripts: kernel-doc: get rid of $nested parameter") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Link: https://lore.kernel.org/all/202312060810.QT9zourt-lkp@intel.com/ > Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> > Cc: Jonathan Corbet <corbet@lwn.net> > Cc: linux-doc@vger.kernel.org > --- > scripts/kernel-doc | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff -- a/scripts/kernel-doc b/scripts/kernel-doc > --- a/scripts/kernel-doc > +++ b/scripts/kernel-doc > @@ -1659,6 +1659,13 @@ sub check_sections($$$$$) { > "'$sects[$sx]' " . > "description in '$decl_name'\n"); > } > + elsif (($decl_type eq "struct") or > + ($decl_type eq "union")) { > + emit_warning("${file}:$.", > + "Excess $decl_type member " . > + "'$sects[$sx]' " . > + "description in '$decl_name'\n"); > + } > } > } > }
On Wed, Dec 13, 2023 at 11:05:42PM -0800, Randy Dunlap wrote: > (correcting Mauro's email address) > > > On 12/13/23 23:02, Randy Dunlap wrote: > > The warning for Excess struct or union member description was > > removed when the $nested parameter of check_sections() was removed. > > This causes some kernel-doc notation warnings to be missed. > > > > Recently the kernel test robot somehow reported an Excess member. The > > code in kernel-doc has not issued that warning since kernel v4.16, so I > > don't know how the robot did it. (See the Link for the report.) > > > > drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs' > > > > I patched that warning away even though I could not reproduce the > > warning from kernel-doc. The warning should be issued for extraneous > > struct member or union member description, so restore it. > > > > Fixes: 1081de2d2f91 ("scripts: kernel-doc: get rid of $nested parameter") > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > > Link: https://lore.kernel.org/all/202312060810.QT9zourt-lkp@intel.com/ > > Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> > > Cc: Jonathan Corbet <corbet@lwn.net> > > Cc: linux-doc@vger.kernel.org > > --- > > scripts/kernel-doc | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff -- a/scripts/kernel-doc b/scripts/kernel-doc > > --- a/scripts/kernel-doc > > +++ b/scripts/kernel-doc > > @@ -1659,6 +1659,13 @@ sub check_sections($$$$$) { > > "'$sects[$sx]' " . > > "description in '$decl_name'\n"); > > } > > + elsif (($decl_type eq "struct") or > > + ($decl_type eq "union")) { > > + emit_warning("${file}:$.", > > + "Excess $decl_type member " . > > + "'$sects[$sx]' " . > > + "description in '$decl_name'\n"); > > + } > > } > > } > > } Yes, please! Reviewed-by: Kees Cook <keescook@chromium.org>
Hi Randy, kernel test robot noticed the following build warnings: [auto build test WARNING on lwn/docs-next] [also build test WARNING on linus/master v6.7-rc5 next-20231214] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Randy-Dunlap/scripts-kernel-doc-restore-warning-for-Excess-struct-union/20231214-150722 base: git://git.lwn.net/linux.git docs-next patch link: https://lore.kernel.org/r/20231214070200.24405-1-rdunlap%40infradead.org patch subject: [PATCH] scripts/kernel-doc: restore warning for Excess struct/union config: arm-randconfig-r081-20231214 (https://download.01.org/0day-ci/archive/20231215/202312151356.OZmUHKRx-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312151356.OZmUHKRx-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202312151356.OZmUHKRx-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/gpio/gpio-syscon.c:46: warning: Excess struct member 'compatible' description in 'syscon_gpio_data' -- >> drivers/gpio/gpio-xilinx.c:75: warning: Excess struct member 'irqchip' description in 'xgpio_instance' -- >> net/tipc/link.c:228: warning: Excess struct member 'media_addr' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'timer' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'refcnt' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'proto_msg' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'pmsg' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'backlog_limit' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'exp_msg_count' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'reset_rcv_checkpt' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'transmitq' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'snt_nxt' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'deferred_queue' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'unacked_window' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'next_out' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'long_msg_seq_no' description in 'tipc_link' >> net/tipc/link.c:228: warning: Excess struct member 'bc_rcvr' description in 'tipc_link' -- >> net/tipc/node.c:150: warning: Excess struct member 'inputq' description in 'tipc_node' >> net/tipc/node.c:150: warning: Excess struct member 'namedq' description in 'tipc_node' -- >> net/tipc/socket.c:143: warning: Excess struct member 'blocking_link' description in 'tipc_sock' -- >> drivers/hte/hte.c:90: warning: Excess struct member 'ei' description in 'hte_device' -- >> drivers/i2c/i2c-atr.c:98: warning: Excess struct member 'adapter' description in 'i2c_atr' -- >> drivers/leds/leds-lm3697.c:93: warning: Excess struct member 'leds' description in 'lm3697' -- >> drivers/leds/leds-mlxreg.c:42: warning: Excess struct member 'led_data' description in 'mlxreg_led_data' -- >> drivers/of/property.c:1240: warning: Excess struct member 'parse_prop.np' description in 'supplier_bindings' >> drivers/of/property.c:1240: warning: Excess struct member 'parse_prop.prop_name' description in 'supplier_bindings' >> drivers/of/property.c:1240: warning: Excess struct member 'parse_prop.index' description in 'supplier_bindings' -- >> drivers/reset/core.c:64: warning: Excess struct member 'rstc' description in 'reset_control_array' .. vim +46 drivers/gpio/gpio-syscon.c 6a8a0c1d87377c Alexander Shiyan 2014-03-11 23 6a8a0c1d87377c Alexander Shiyan 2014-03-11 24 /** 6a8a0c1d87377c Alexander Shiyan 2014-03-11 25 * struct syscon_gpio_data - Configuration for the device. 5f3beb67b5d1c5 Lee Jones 2020-06-30 26 * @compatible: SYSCON driver compatible string. 5f3beb67b5d1c5 Lee Jones 2020-06-30 27 * @flags: Set of GPIO_SYSCON_FEAT_ flags: 6a8a0c1d87377c Alexander Shiyan 2014-03-11 28 * GPIO_SYSCON_FEAT_IN: GPIOs supports input, 6a8a0c1d87377c Alexander Shiyan 2014-03-11 29 * GPIO_SYSCON_FEAT_OUT: GPIOs supports output, 6a8a0c1d87377c Alexander Shiyan 2014-03-11 30 * GPIO_SYSCON_FEAT_DIR: GPIOs supports switch direction. 5f3beb67b5d1c5 Lee Jones 2020-06-30 31 * @bit_count: Number of bits used as GPIOs. 5f3beb67b5d1c5 Lee Jones 2020-06-30 32 * @dat_bit_offset: Offset (in bits) to the first GPIO bit. 5f3beb67b5d1c5 Lee Jones 2020-06-30 33 * @dir_bit_offset: Optional offset (in bits) to the first bit to switch 6a8a0c1d87377c Alexander Shiyan 2014-03-11 34 * GPIO direction (Used with GPIO_SYSCON_FEAT_DIR flag). 5f3beb67b5d1c5 Lee Jones 2020-06-30 35 * @set: HW specific callback to assigns output value 2c341d62eb4b69 Grygorii Strashko 2014-09-03 36 * for signal "offset" 6a8a0c1d87377c Alexander Shiyan 2014-03-11 37 */ 6a8a0c1d87377c Alexander Shiyan 2014-03-11 38 6a8a0c1d87377c Alexander Shiyan 2014-03-11 39 struct syscon_gpio_data { 6a8a0c1d87377c Alexander Shiyan 2014-03-11 40 unsigned int flags; 6a8a0c1d87377c Alexander Shiyan 2014-03-11 41 unsigned int bit_count; 6a8a0c1d87377c Alexander Shiyan 2014-03-11 42 unsigned int dat_bit_offset; 6a8a0c1d87377c Alexander Shiyan 2014-03-11 43 unsigned int dir_bit_offset; 2c341d62eb4b69 Grygorii Strashko 2014-09-03 44 void (*set)(struct gpio_chip *chip, 2c341d62eb4b69 Grygorii Strashko 2014-09-03 45 unsigned offset, int value); 6a8a0c1d87377c Alexander Shiyan 2014-03-11 @46 }; 6a8a0c1d87377c Alexander Shiyan 2014-03-11 47
On 12/14/23 21:35, kernel test robot wrote: > Hi Randy, > > kernel test robot noticed the following build warnings: > That's great. Thanks. > [auto build test WARNING on lwn/docs-next] > [also build test WARNING on linus/master v6.7-rc5 next-20231214] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Randy-Dunlap/scripts-kernel-doc-restore-warning-for-Excess-struct-union/20231214-150722 > base: git://git.lwn.net/linux.git docs-next > patch link: https://lore.kernel.org/r/20231214070200.24405-1-rdunlap%40infradead.org > patch subject: [PATCH] scripts/kernel-doc: restore warning for Excess struct/union > config: arm-randconfig-r081-20231214 (https://download.01.org/0day-ci/archive/20231215/202312151356.OZmUHKRx-lkp@intel.com/config) > compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312151356.OZmUHKRx-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: https://lore.kernel.org/oe-kbuild-all/202312151356.OZmUHKRx-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > >>> drivers/gpio/gpio-syscon.c:46: warning: Excess struct member 'compatible' description in 'syscon_gpio_data' > -- >>> drivers/gpio/gpio-xilinx.c:75: warning: Excess struct member 'irqchip' description in 'xgpio_instance' > -- >>> net/tipc/link.c:228: warning: Excess struct member 'media_addr' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'timer' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'refcnt' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'proto_msg' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'pmsg' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'backlog_limit' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'exp_msg_count' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'reset_rcv_checkpt' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'transmitq' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'snt_nxt' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'deferred_queue' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'unacked_window' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'next_out' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'long_msg_seq_no' description in 'tipc_link' >>> net/tipc/link.c:228: warning: Excess struct member 'bc_rcvr' description in 'tipc_link' > -- >>> net/tipc/node.c:150: warning: Excess struct member 'inputq' description in 'tipc_node' >>> net/tipc/node.c:150: warning: Excess struct member 'namedq' description in 'tipc_node' > -- >>> net/tipc/socket.c:143: warning: Excess struct member 'blocking_link' description in 'tipc_sock' > -- >>> drivers/hte/hte.c:90: warning: Excess struct member 'ei' description in 'hte_device' > -- >>> drivers/i2c/i2c-atr.c:98: warning: Excess struct member 'adapter' description in 'i2c_atr' > -- >>> drivers/leds/leds-lm3697.c:93: warning: Excess struct member 'leds' description in 'lm3697' > -- >>> drivers/leds/leds-mlxreg.c:42: warning: Excess struct member 'led_data' description in 'mlxreg_led_data' > -- >>> drivers/of/property.c:1240: warning: Excess struct member 'parse_prop.np' description in 'supplier_bindings' >>> drivers/of/property.c:1240: warning: Excess struct member 'parse_prop.prop_name' description in 'supplier_bindings' >>> drivers/of/property.c:1240: warning: Excess struct member 'parse_prop.index' description in 'supplier_bindings' > -- >>> drivers/reset/core.c:64: warning: Excess struct member 'rstc' description in 'reset_control_array' > .. > > > vim +46 drivers/gpio/gpio-syscon.c > > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 23 > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 24 /** > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 25 * struct syscon_gpio_data - Configuration for the device. > 5f3beb67b5d1c5 Lee Jones 2020-06-30 26 * @compatible: SYSCON driver compatible string. > 5f3beb67b5d1c5 Lee Jones 2020-06-30 27 * @flags: Set of GPIO_SYSCON_FEAT_ flags: > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 28 * GPIO_SYSCON_FEAT_IN: GPIOs supports input, > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 29 * GPIO_SYSCON_FEAT_OUT: GPIOs supports output, > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 30 * GPIO_SYSCON_FEAT_DIR: GPIOs supports switch direction. > 5f3beb67b5d1c5 Lee Jones 2020-06-30 31 * @bit_count: Number of bits used as GPIOs. > 5f3beb67b5d1c5 Lee Jones 2020-06-30 32 * @dat_bit_offset: Offset (in bits) to the first GPIO bit. > 5f3beb67b5d1c5 Lee Jones 2020-06-30 33 * @dir_bit_offset: Optional offset (in bits) to the first bit to switch > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 34 * GPIO direction (Used with GPIO_SYSCON_FEAT_DIR flag). > 5f3beb67b5d1c5 Lee Jones 2020-06-30 35 * @set: HW specific callback to assigns output value > 2c341d62eb4b69 Grygorii Strashko 2014-09-03 36 * for signal "offset" > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 37 */ > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 38 > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 39 struct syscon_gpio_data { > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 40 unsigned int flags; > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 41 unsigned int bit_count; > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 42 unsigned int dat_bit_offset; > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 43 unsigned int dir_bit_offset; > 2c341d62eb4b69 Grygorii Strashko 2014-09-03 44 void (*set)(struct gpio_chip *chip, > 2c341d62eb4b69 Grygorii Strashko 2014-09-03 45 unsigned offset, int value); > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 @46 }; > 6a8a0c1d87377c Alexander Shiyan 2014-03-11 47 >
Hi Randy, kernel test robot noticed the following build warnings: [auto build test WARNING on lwn/docs-next] [also build test WARNING on linus/master v6.7-rc5 next-20231215] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Randy-Dunlap/scripts-kernel-doc-restore-warning-for-Excess-struct-union/20231214-150722 base: git://git.lwn.net/linux.git docs-next patch link: https://lore.kernel.org/r/20231214070200.24405-1-rdunlap%40infradead.org patch subject: [PATCH] scripts/kernel-doc: restore warning for Excess struct/union config: arm64-defconfig (https://download.01.org/0day-ci/archive/20231215/202312151453.AaH01Gw5-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312151453.AaH01Gw5-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202312151453.AaH01Gw5-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/mailbox/zynqmp-ipi-mailbox.c:92: warning: Excess struct member 'irq' description in 'zynqmp_ipi_mbox' >> drivers/mailbox/zynqmp-ipi-mailbox.c:112: warning: Excess struct member 'ipi_mboxes' description in 'zynqmp_ipi_pdata' -- >> drivers/pinctrl/pinctrl-zynqmp.c:60: warning: Excess struct member 'node' description in 'zynqmp_pmux_function' -- >> drivers/pwm/pwm-mediatek.c:60: warning: Excess struct member 'clk_freq' description in 'pwm_mediatek_chip' -- >> drivers/net/ipa/ipa_power.c:71: warning: Excess struct member 'interconnect' description in 'ipa_power' -- >> drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_req_if.c:57: warning: Excess struct member 'wait_key_frame' description in 'vdec_vp8_slice_info' -- >> drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c:166: warning: Excess struct member 'mv_joint' description in 'vdec_vp9_slice_counts_map' vim +92 drivers/mailbox/zynqmp-ipi-mailbox.c 4981b82ba2ff87d Wendy Liang 2019-02-21 74 4981b82ba2ff87d Wendy Liang 2019-02-21 75 /** 4981b82ba2ff87d Wendy Liang 2019-02-21 76 * struct zynqmp_ipi_mbox - Description of a ZynqMP IPI mailbox 4981b82ba2ff87d Wendy Liang 2019-02-21 77 * platform data. 4981b82ba2ff87d Wendy Liang 2019-02-21 78 * @pdata: pointer to the IPI private data 4981b82ba2ff87d Wendy Liang 2019-02-21 79 * @dev: device pointer corresponding to the Xilinx ZynqMP 4981b82ba2ff87d Wendy Liang 2019-02-21 80 * IPI mailbox 4981b82ba2ff87d Wendy Liang 2019-02-21 81 * @remote_id: remote IPI agent ID 4981b82ba2ff87d Wendy Liang 2019-02-21 82 * @mbox: mailbox Controller 4981b82ba2ff87d Wendy Liang 2019-02-21 83 * @mchans: array for channels, tx channel and rx channel. 4981b82ba2ff87d Wendy Liang 2019-02-21 84 * @irq: IPI agent interrupt ID 4981b82ba2ff87d Wendy Liang 2019-02-21 85 */ 4981b82ba2ff87d Wendy Liang 2019-02-21 86 struct zynqmp_ipi_mbox { 4981b82ba2ff87d Wendy Liang 2019-02-21 87 struct zynqmp_ipi_pdata *pdata; 4981b82ba2ff87d Wendy Liang 2019-02-21 88 struct device dev; 4981b82ba2ff87d Wendy Liang 2019-02-21 89 u32 remote_id; 4981b82ba2ff87d Wendy Liang 2019-02-21 90 struct mbox_controller mbox; 4981b82ba2ff87d Wendy Liang 2019-02-21 91 struct zynqmp_ipi_mchan mchans[2]; 4981b82ba2ff87d Wendy Liang 2019-02-21 @92 }; 4981b82ba2ff87d Wendy Liang 2019-02-21 93 4981b82ba2ff87d Wendy Liang 2019-02-21 94 /** 4981b82ba2ff87d Wendy Liang 2019-02-21 95 * struct zynqmp_ipi_pdata - Description of z ZynqMP IPI agent platform data. 4981b82ba2ff87d Wendy Liang 2019-02-21 96 * 4981b82ba2ff87d Wendy Liang 2019-02-21 97 * @dev: device pointer corresponding to the Xilinx ZynqMP 4981b82ba2ff87d Wendy Liang 2019-02-21 98 * IPI agent 4981b82ba2ff87d Wendy Liang 2019-02-21 99 * @irq: IPI agent interrupt ID 4981b82ba2ff87d Wendy Liang 2019-02-21 100 * @method: IPI SMC or HVC is going to be used 4981b82ba2ff87d Wendy Liang 2019-02-21 101 * @local_id: local IPI agent ID 4981b82ba2ff87d Wendy Liang 2019-02-21 102 * @num_mboxes: number of mailboxes of this IPI agent 4981b82ba2ff87d Wendy Liang 2019-02-21 103 * @ipi_mboxes: IPI mailboxes of this IPI agent 4981b82ba2ff87d Wendy Liang 2019-02-21 104 */ 4981b82ba2ff87d Wendy Liang 2019-02-21 105 struct zynqmp_ipi_pdata { 4981b82ba2ff87d Wendy Liang 2019-02-21 106 struct device *dev; 4981b82ba2ff87d Wendy Liang 2019-02-21 107 int irq; 4981b82ba2ff87d Wendy Liang 2019-02-21 108 unsigned int method; 4981b82ba2ff87d Wendy Liang 2019-02-21 109 u32 local_id; 4981b82ba2ff87d Wendy Liang 2019-02-21 110 int num_mboxes; c5225cd073c65a6 Kees Cook 2023-09-22 111 struct zynqmp_ipi_mbox ipi_mboxes[] __counted_by(num_mboxes); 4981b82ba2ff87d Wendy Liang 2019-02-21 @112 }; 4981b82ba2ff87d Wendy Liang 2019-02-21 113
Randy Dunlap <rdunlap@infradead.org> writes: > The warning for Excess struct or union member description was > removed when the $nested parameter of check_sections() was removed. > This causes some kernel-doc notation warnings to be missed. > > Recently the kernel test robot somehow reported an Excess member. The > code in kernel-doc has not issued that warning since kernel v4.16, so I > don't know how the robot did it. (See the Link for the report.) > > drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs' > > I patched that warning away even though I could not reproduce the > warning from kernel-doc. The warning should be issued for extraneous > struct member or union member description, so restore it. > > Fixes: 1081de2d2f91 ("scripts: kernel-doc: get rid of $nested parameter") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Link: https://lore.kernel.org/all/202312060810.QT9zourt-lkp@intel.com/ > Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> > Cc: Jonathan Corbet <corbet@lwn.net> > Cc: linux-doc@vger.kernel.org > --- > scripts/kernel-doc | 7 +++++++ > 1 file changed, 7 insertions(+) *sigh* This adds nearly 600 new warnings. Anybody gonna help fix them? Of course, most of them are duplicates. Someday it would be really nice if we could find a way to only emit each warning once. Anyway, I've applied it. Thanks, jon
On 15/12/2023 17:28, Jonathan Corbet wrote: > *sigh* > > This adds nearly 600 new warnings. Anybody gonna help fix them? I think in the vast majority of the cases the fix will be to just remove the offending line from the kerneldoc, so it's not particularly difficult, mostly just overhead from the patch preparation/submission process. I'd be happy to take a stab at it -- I think we could even script most of it. Respond here, I guess, if anybody else wants to do some so we can split it up. On a related note, it might be useful to have some kind of "status page" somewhere on the web for the docs where you can see a list of unresolved documentation warnings in mainline/docs-next/next without having to do a local build first (as a way to solicit contributions). Vegard
Vegard Nossum <vegard.nossum@oracle.com> writes: > On 15/12/2023 17:28, Jonathan Corbet wrote: >> *sigh* >> >> This adds nearly 600 new warnings. Anybody gonna help fix them? > > I think in the vast majority of the cases the fix will be to just remove > the offending line from the kerneldoc, so it's not particularly > difficult, mostly just overhead from the patch preparation/submission > process. > > I'd be happy to take a stab at it -- I think we could even script most > of it. Respond here, I guess, if anybody else wants to do some so we can > split it up. It's mostly done; I've gotten it down to under 200 and sent patches to make the changes. Randy is working on it too, I know. It's not always just deletion, but the fixes are usually pretty straightforward. > On a related note, it might be useful to have some kind of "status page" > somewhere on the web for the docs where you can see a list of unresolved > documentation warnings in mainline/docs-next/next without having to do a > local build first (as a way to solicit contributions). I suppose, but how do you know you've properly addressed the warning if you don't do a build afterward? I don't see that saving a whole lot of effort, but maybe I'm missing something? Thanks, jon
On 21/12/2023 16:20, Jonathan Corbet wrote: > It's mostly done; I've gotten it down to under 200 and sent patches to > make the changes. Randy is working on it too, I know. It's not always > just deletion, but the fixes are usually pretty straightforward. Ah, cool. Will leave it to you, then. >> On a related note, it might be useful to have some kind of "status page" >> somewhere on the web for the docs where you can see a list of unresolved >> documentation warnings in mainline/docs-next/next without having to do a >> local build first (as a way to solicit contributions). > > I suppose, but how do you know you've properly addressed the warning if > you don't do a build afterward? I don't see that saving a whole lot of > effort, but maybe I'm missing something? You would definitely have to do local builds too, it's just about raising awareness of remaining issues and lowering the barrier for drive-by contributors to picking something to work on. I can only speak for myself but I find it easier to go look at a list of known problems than initiating a docs build and waiting for it to come back. Syzbot has monthly per-subsystem reports now (since ~March, AFAICT): https://lore.kernel.org/all/0000000000007fbf7a060cc67998@google.com/ A monthly email is maybe even better than what I suggested. Anyway, I'll try something out, we can see how it works. Vegard
On 12/21/23 07:20, Jonathan Corbet wrote: > Vegard Nossum <vegard.nossum@oracle.com> writes: > >> On 15/12/2023 17:28, Jonathan Corbet wrote: >>> *sigh* >>> >>> This adds nearly 600 new warnings. Anybody gonna help fix them? >> >> I think in the vast majority of the cases the fix will be to just remove >> the offending line from the kerneldoc, so it's not particularly >> difficult, mostly just overhead from the patch preparation/submission >> process. >> >> I'd be happy to take a stab at it -- I think we could even script most >> of it. Respond here, I guess, if anybody else wants to do some so we can >> split it up. > > It's mostly done; I've gotten it down to under 200 and sent patches to > make the changes. Randy is working on it too, I know. It's not always > just deletion, but the fixes are usually pretty straightforward. > I'm still seeing lots of Excess warnings from include/crypto/hash.h include/crypto/skcipher.h drivers/gpu/drm/* (several files there have warnings) I would be happy to see Vegard's help on this - unless Jon has already addressed those warnings. >> On a related note, it might be useful to have some kind of "status page" >> somewhere on the web for the docs where you can see a list of unresolved >> documentation warnings in mainline/docs-next/next without having to do a >> local build first (as a way to solicit contributions). > > I suppose, but how do you know you've properly addressed the warning if > you don't do a build afterward? I don't see that saving a whole lot of > effort, but maybe I'm missing something? Thanks.
Randy Dunlap <rdunlap@infradead.org> writes: > On 12/21/23 07:20, Jonathan Corbet wrote: >> Vegard Nossum <vegard.nossum@oracle.com> writes: >> >>> On 15/12/2023 17:28, Jonathan Corbet wrote: >>>> *sigh* >>>> >>>> This adds nearly 600 new warnings. Anybody gonna help fix them? >>> >>> I think in the vast majority of the cases the fix will be to just remove >>> the offending line from the kerneldoc, so it's not particularly >>> difficult, mostly just overhead from the patch preparation/submission >>> process. >>> >>> I'd be happy to take a stab at it -- I think we could even script most >>> of it. Respond here, I guess, if anybody else wants to do some so we can >>> split it up. >> >> It's mostly done; I've gotten it down to under 200 and sent patches to >> make the changes. Randy is working on it too, I know. It's not always >> just deletion, but the fixes are usually pretty straightforward. >> > > I'm still seeing lots of Excess warnings from > include/crypto/hash.h > include/crypto/skcipher.h > drivers/gpu/drm/* (several files there have warnings) > > I would be happy to see Vegard's help on this - unless Jon has already > addressed those warnings. Nope, I've not gone there and won't manage it before sometime next week at best. I'd be delighted if somebody waded into those warnings. Thanks, jon
diff -- a/scripts/kernel-doc b/scripts/kernel-doc --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1659,6 +1659,13 @@ sub check_sections($$$$$) { "'$sects[$sx]' " . "description in '$decl_name'\n"); } + elsif (($decl_type eq "struct") or + ($decl_type eq "union")) { + emit_warning("${file}:$.", + "Excess $decl_type member " . + "'$sects[$sx]' " . + "description in '$decl_name'\n"); + } } } }