Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7360412rdb; Wed, 3 Jan 2024 13:13:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzpGyd7jozEnuEEHwMgJv7DofJoE7E20Lt6YclyFla1uDnxHrgf3a0am0Fy25iYjGO3gXG X-Received: by 2002:a05:6122:458d:b0:4b6:d652:f80 with SMTP id de13-20020a056122458d00b004b6d6520f80mr7398588vkb.10.1704316426056; Wed, 03 Jan 2024 13:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704316426; cv=none; d=google.com; s=arc-20160816; b=R+2hYe299G9a72IhSh+MTs3fsdzDxEEHPrz+m5Xw1P81zwBTRdS34OSiOiPogi6jHd k9RLQx+spiEUyWxeuNtU6fVrRHHE+53CoUSIPf7HT3M9xwg9Rh0aUxbAgW0rjvMmNIDV PwhxWE7n4wqIfukFrMKiYXG6Cn02qEirnM6Hcq5fMjxHnO4423cKKFyttknprkO5+svG 7/VvjKacg2Y2hcJGXozVcNy7j0oAmrbLkM6tzUm+dfFeiPdAgTVVHHr4t2J7DTnPOT+D G3DqIWZYG4fWcPQ1jXlYkTsyeHXcEtoqlBAqD9q3g1kDUtLdKac0rqojD9FRRFLCEY4i eXXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature:dkim-filter; bh=Z9wBUNkIgI1KjeMMPZc6rSKy4oBEXR9BlVUj6OtV9uI=; fh=xfOsgPwP6f6ufaEErAJNeZJtfbykCJZSsfAgIatXrMg=; b=ZRx5LylLqJlsGzLWd28Qg0afHEfOaCcXO4IcVmti+qKmRRd8gebqrSPCH3ViquPDuU 5csokJy9qaKEUjbV6elTppK3qmgeXSMuA0/YtQMvxM52OfOBY2XEXjBO4kTCE3kzW4bn c6yGT5/wBb3E0T24MFTanxzTfpUqQwDwr07qQcPtb8rEePp/1QOvFjqgf4rXLaaFWQFX TyCHbybqPAHv1vdHriYTYeD3BuvXTiZ5Knv4kw2LYpqDNUI1D7w4gZdViKo29J0m2anU PcmKORQ4AW+9fovIOHxZ3OH/IYBBkBDPo9ThCkF7IFmd2Iw1VokkoZn5ePwtc132D6to iizg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=thrsfLlP; spf=pass (google.com: domain of linux-kernel+bounces-16009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lwn.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h1-20020a05620a400100b007725a68ea34si30424992qko.89.2024.01.03.13.13.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 13:13:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=thrsfLlP; spf=pass (google.com: domain of linux-kernel+bounces-16009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lwn.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C60CE1C24649 for ; Wed, 3 Jan 2024 21:13:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 878E11D69E; Wed, 3 Jan 2024 21:13:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="thrsfLlP" X-Original-To: linux-kernel@vger.kernel.org Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D4141D687; Wed, 3 Jan 2024 21:13:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net Received: from localhost (unknown [IPv6:2601:280:5e00:7e19::646]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id B79B21C33; Wed, 3 Jan 2024 21:13:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net B79B21C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1704316416; bh=Z9wBUNkIgI1KjeMMPZc6rSKy4oBEXR9BlVUj6OtV9uI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=thrsfLlP77MOXmB2UFnPrAPvKi8nCbKhM4/jiA2DsSt1OzJWwxacP255IxO3RWr+h BLeecooI+oUYzgNVAOLDxbVno4j0sTneuB3UJLAxSHrb3tgGQdg/vqNPRzPCz60+iE PilAJa/NgU3fynrEBLA4496+Khl8sh/FEd+Ao6Uag2TmI53IRVEQBb8BHGGGajNmOb tHD5ZQKbIC3wv3fDikABq3bRANZ6W+F67hqRxOAj4Whk8scDHDT38btyDIt2Rw10+3 ue68xJFNJmsN6k+bVyN7g1mS4LahLa6Q8Yrh5lgpak74Yf8oi34Drousj30aImLLTb 1L5YZsi+TO2kw== From: Jonathan Corbet To: Randy Dunlap , linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jani Nikula , linux-doc@vger.kernel.org Subject: Re: [PATCH] kernel-doc: handle a void function without producing a warning In-Reply-To: <20231226065219.319-1-rdunlap@infradead.org> References: <20231226065219.319-1-rdunlap@infradead.org> Date: Wed, 03 Jan 2024 14:13:36 -0700 Message-ID: <87le9686in.fsf@meer.lwn.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Randy Dunlap writes: > Currently a void function can produce a warning: > main.c:469: warning: contents before sections > > This one is from arch/x86/kernel/cpu/sgx/main.c (which is not included > in any produced kernel documentation output). > > Handle this by setting $in_doc_sect to 1 whenever any recognized > document section name is processed. > > Fixes: f624adef3d0b ("kernel-doc: limit the "section header:" detection to a select few") > Signed-off-by: Randy Dunlap > Cc: Jani Nikula > Cc: Jonathan Corbet > Cc: linux-doc@vger.kernel.org > --- > scripts/kernel-doc | 1 + > 1 file changed, 1 insertion(+) > > diff -- a/scripts/kernel-doc b/scripts/kernel-doc > --- a/scripts/kernel-doc > +++ b/scripts/kernel-doc > @@ -2126,6 +2126,7 @@ sub process_body($$) { > } > > if (/$doc_sect/i) { # case insensitive for supported section names > + $in_doc_sect = 1; > $newsection = $1; Applied, thanks. jon