Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2600592iof; Wed, 8 Jun 2022 08:16:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxG3hHgMCu0Al4XFfT25yaYFM1Bpkdl36GAN2xOOgulRRK2kaR535XfpRzcLGeN1rAMSNlr X-Received: by 2002:a17:90a:9741:b0:1e8:a001:5caa with SMTP id i1-20020a17090a974100b001e8a0015caamr10415617pjw.231.1654701372826; Wed, 08 Jun 2022 08:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654701372; cv=none; d=google.com; s=arc-20160816; b=z+M6jjsWZWjKCI1zOiBUA9UoP5CuZizGr6K8YA9w2lo1Qab6x4eem9pCjQS2QI9A0E DUnds7rJ+UspaAn+kim9xtaccEsHZex/mlHyuACvAbkdOFCl57S3boRzkr73IyZA/hKn jjf8feF0SFDxIYqETxb3KLOCZN/W+4azEB0YVyHbAq3Wv/o6mboChV0KpN7zxCbwdwvc lmMvS5Uv0uD5Qi8M5UupYhn39zqgUF7nCfNyHlL0WNDvuj9+/c8nnEWrgpJOVXZmfLxw fS9T3r2gVtJLoxDMK4V+/p5NdW3uU4hgf8qzmqHzxS5qhBUQlBipgJDJ7w1/AZsiIiYE R47Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CRsWP2G+wghkUNt8S+tGdaVaiP+VpO+A8Nv2DBBotgM=; b=pLK7WcjCJyo8a4vlTcqUiRodPgUhtXBPlG3ghSzE3Z5O0qABH+0eFLPveq00Z4/7FJ hGabd855EcXXoBS86ichBLVI2TyZ9Z273ZT9mPO19AlDjFn9gJJaVv1aWsWsANyFyEJW Em2GuZQWDvKO0ve4ftQMe94VuoDVCGiqklA0WCYHTORAh434Zm6C1zZASBZx5r+l/RNs OSKSB5aoQYC2lL7igXxRdfiHP/3cGDbNHPx8fOWEgLGeP8MBhkT+RAJrTAB3j23zkbf3 sOLUsX1j6KFVmN2tV57aoSXdqrAvGmoaGgcczzKhzLuxm2mLeNaHVi/Vmlf73aW7+H40 gp3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bGo4iGu2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id go10-20020a17090b03ca00b001ea3778cebbsi2888256pjb.101.2022.06.08.08.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 08:16:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bGo4iGu2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A77A49F8E; Wed, 8 Jun 2022 07:45:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242058AbiFHOm7 (ORCPT + 99 others); Wed, 8 Jun 2022 10:42:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242050AbiFHOmc (ORCPT ); Wed, 8 Jun 2022 10:42:32 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95C573A1BB; Wed, 8 Jun 2022 07:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=CRsWP2G+wghkUNt8S+tGdaVaiP+VpO+A8Nv2DBBotgM=; b=bGo4iGu2HpMKf252eq1uEtnpjj akPOmAWyf8pvG+BywRGLgG5fOMaX6wl7YyT6Ez3R2dDMG+3wPjNrEFJpjbcE6SoIC8Zbu70aWSeZ8 9mdGka0Bx2c8E0l+agsf3pk6HFYtLGgsnddsBXuSxkIxlefCSBrj1giqEwCoEjegMqX9AvsvB0PdJ KFPA1T41+FAq39v6UPCsrkHj5GulwVIQJiEjKFhc6ICWylVGvPxR6lkG96dFqLjVFasfmVTS8WGk2 kRXeoxWZJVFNQvC6SaG8rLZ2KtBDAf8fN+uI9Z4fDZl5mCD3MuYYC8RFroBLYlfbRd1JJCpvt8ryu 5m70+7lw==; Received: from [2601:1c0:6280:3f0::aa0b] by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nywsp-00665h-51; Wed, 08 Jun 2022 14:42:07 +0000 Message-ID: <74a53856-281d-0443-1141-af116abab991@infradead.org> Date: Wed, 8 Jun 2022 07:41:59 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] scripts: kernel-doc: Always increment warnings counter Content-Language: en-US To: =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Jonathan Corbet , linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, oss-drivers@corigine.com, Simon Horman , Louis Peens References: <20220608142601.832926-1-niklas.soderlund@corigine.com> From: Randy Dunlap In-Reply-To: <20220608142601.832926-1-niklas.soderlund@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/8/22 07:26, Niklas Söderlund wrote: > Some warnings did not increment the warnings counter making the behavior > of running kernel-doc with -Werror unlogical as some warnings would be > generated but not treated as errors. > > Fix this by always incrementing the warnings counter every time a > warning related to the input documentation is generated. There is one > location in get_sphinx_version() where a warning is printed and the > counter is not touched as it concerns the execution environment of the > kernel-doc and not the documentation being processed. > > Incrementing the counter only have effect when running kernel-doc in > either verbose mode (-v or environment variable KBUILD_VERBOSE) or when > treating warnings as errors (-Werror or environment variable > KDOC_WERROR). In both cases the number of warnings printed is printed to > stderr and for the later the exit code of kernel-doc is non-zero if > warnings where encountered. > > Simple test case to demo one of the warnings, > > $ cat test.c > /** > * foo() - Description > */ > int bar(); > > # Without this change > $ ./scripts/kernel-doc -Werror -none test.c > test.c:4: warning: expecting prototype for foo(). Prototype was for > bar() instead > > # With this change > $ ./scripts/kernel-doc -Werror -none test.c > test.c:4: warning: expecting prototype for foo(). Prototype was for > bar() instead > 1 warnings as Errors > > Signed-off-by: Niklas Söderlund > Signed-off-by: Simon Horman > Signed-off-by: Louis Peens > --- > scripts/kernel-doc | 10 ++++++++++ > 1 file changed, 10 insertions(+) LGTM. Thanks. Reviewed-by: Randy Dunlap -- ~Randy