Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2636881rdb; Mon, 25 Dec 2023 22:52:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKUmgGJuybG9V1j6VMoiS10YtKTksT6vUUHjkibW1gJd/d89lsfI2G9KmlbzULopMNTyxC X-Received: by 2002:a05:6214:2684:b0:67f:4926:60c0 with SMTP id gm4-20020a056214268400b0067f492660c0mr12869332qvb.1.1703573551655; Mon, 25 Dec 2023 22:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703573551; cv=none; d=google.com; s=arc-20160816; b=qXJbCF23EvDicPENeqJy9k18vLprKHjAgWdDrq9dIQslyTRGxeql9cUZ3NjdTyTLXi ReyJli7kbnNPMpvgnSUoTPIKpTOMFOpAIcwz0EEfUSGbzw+/LisXjYWKB7DxVssJAT+y knzNsBaF9E+iENnJY071JF8eDKzp4hUsinmT1LDA98KEHYGKCCNAj/S+bIo/2qPU9+2Z 8VLHmWF5zQa0AqOESStWrB/141zyJQ1tSoiK/6YlQqnoACdrR9NI0Y4aIGppKIU5Ve7m 7k8aOVTzuENeVj4nK16PdNZzbnXtUt4vl9WzzYzjm7psxf+2rbbHmPtn28p5xMjuIZfq MWkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=kkgklDeXRuhCQW767gm/kiIxt834TUdRq1zskO/SUKE=; fh=ZF4KgFNntCOwm2Hz8dv/v6PaU4pUfym3H72oYsTv2J0=; b=bZjYw0grdDrwUnLV6jLcpr+zPCA2tQeXKC9EfVPRasVSMTiPMZi8Fzz6dXiklFKf5B lJ63MwJtRseiCy4ZuPrN+t3nvJQAIGENYcuKLmLGxdlWVYCpsmVoBL3t8MhWoeVeTyIc 4dPO9I+6UzXk8M8PBrIzF/rf3oasbPjqf0N9oo7YXyvt4wXqAt/9Qf6l4n4Wz8j32uVQ naAUg1+x483JkQR4CFfr5IJ/T5dbbpcFsAPkLeKejg1oZBbhj8d3vAoXKYa/EfNGCzfd Yl5+efNRqcaCg1E+MMGGAwshE3nVTjS64qs/rAK6HgeVG+rUOngtnPGM8SZ0dPDjZFlG MKIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xvTXLOrh; spf=pass (google.com: domain of linux-kernel+bounces-11394-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11394-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n18-20020ac85a12000000b00425869c1badsi12299324qta.579.2023.12.25.22.52.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 22:52:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11394-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xvTXLOrh; spf=pass (google.com: domain of linux-kernel+bounces-11394-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11394-linux.lists.archive=gmail.com@vger.kernel.org" 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 683681C21D16 for ; Tue, 26 Dec 2023 06:52:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09FE04C3DE; Tue, 26 Dec 2023 06:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="xvTXLOrh" X-Original-To: linux-kernel@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 CA0AC4C3BD; Tue, 26 Dec 2023 06:52:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=kkgklDeXRuhCQW767gm/kiIxt834TUdRq1zskO/SUKE=; b=xvTXLOrhrpyxzm/nxWY/ILl0N/ QwKSw3UC8qJkByrAA9kO9T2rX4cbqE/6NLralyTz97Ml89Ly9utPeqW0TdhnS1SqbLO9ixT+ABdfT /lg8Jx4Y9nso7eggfKdVEooRpoPf3xkmSiBFDP+szt/Kt2FgiWKM6CMCMIONyfWAGs8+SW4VLVbSj FNke/bw0pdMwPbqDiguH2OpmH/1NWITlM9CLM2lS0CcpvG5bFWs6Lj+/VXB6ECF7WZpCXU0fs8mC1 CrEd66DOVJBWepQ3Ru4q+Rq8tiPwZrGclJtTXuCuL88RwGZ+4+f/GLctXrjsa+vIOD4a62xw1jSQb U+oVevPQ==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rI1Ia-00BpNA-0w; Tue, 26 Dec 2023 06:52:20 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jani Nikula , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH] kernel-doc: handle a void function without producing a warning Date: Mon, 25 Dec 2023 22:52:19 -0800 Message-ID: <20231226065219.319-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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; $newcontents = $2;