From patchwork Thu Dec 14 07:02:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 178520 Return-Path: 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 + 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 ); 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 To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Mauro Carvalho Chehab , Jonathan Corbet , 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 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: 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 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 Link: https://lore.kernel.org/all/202312060810.QT9zourt-lkp@intel.com/ Cc: Mauro Carvalho Chehab Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Reviewed-by: Kees Cook --- 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"); + } } } }