Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1647537ybt; Sat, 20 Jun 2020 17:26:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpSh1ChSNY/d0e3G+E1XdvqI1+sEaIRcbu40LoymZgCpIL/TwK3KpL9RcMhk8ejtgMYuSD X-Received: by 2002:a50:9ee4:: with SMTP id a91mr10680458edf.172.1592699186860; Sat, 20 Jun 2020 17:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592699186; cv=none; d=google.com; s=arc-20160816; b=Ct/aTmxg2aURZE7gYrVxA5E0vR87SEcCGw6VmRayMLSwscLeaOcdzzkJ/CelBltOu4 D1tDmdfyNYTJ8Soce6qYnmv6R5aPZbUaqKpD29HnrKosvOFWlh/JSHsIufVlhTQN7dDD UwXAkRjZzsuZou1DyMZh6gVH45vyRIYc+DCBn1UCc+jU8Zv9roh+7VFh6mTatfczQuRI 3cf7pTdtj329X5Fuvv4VeeG8YSQfvFotSqIPeuDMwraCjhJztS8/UQyigNYM3cs4MmvM l2nJKrf66hnJ8BvZu/JKPDDlVSDqTQwuXJoDnedC0TCRVV5EsIj6k3hPRUvvkXatqlYF grdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:mime-version:subject:cc :to:from; bh=dwZeMkh+DsPbnyYGwceXjBXapy6lVxCTDStNpO5K+aU=; b=bHgORZpGn6YN4OO8X6t8UAQ+D7fD7kuTpLGXGsuiMzUfTU24bgCmumZmEw0pkAejQ2 Q5ak8ZjgHjDiaKMchKvOjh9qbO/5EyVILFCpN56Pvzb7F076gTrSPdDOrOkFLucV4QYs KlIFyiZtRmzZSoxmt1pcnF4GSOI3xA8zu23IrdFgNTZ7gHjDNnDjuXt1+6f69ppWa6mY F8g0sUZCG9huIe6Dc6NP+KRI2p8pZeXXNHRNAv+V8RFfQwaMRSLwC83Kpf+3SqN4BcBX vR8bNiw49dHEKqraD6OaP+2RRreqBVlnqc1rpX/Aogt25bsjKtCEWmfPLhZ1ttl6ul2u Lw4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk19si6248929edb.446.2020.06.20.17.25.49; Sat, 20 Jun 2020 17:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728805AbgFUAXV (ORCPT + 99 others); Sat, 20 Jun 2020 20:23:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728720AbgFUAXU (ORCPT ); Sat, 20 Jun 2020 20:23:20 -0400 Received: from omr2.cc.vt.edu (omr2.cc.ipv6.vt.edu [IPv6:2607:b400:92:8400:0:33:fb76:806e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38C5FC061795 for ; Sat, 20 Jun 2020 17:23:20 -0700 (PDT) Received: from mr5.cc.vt.edu (mail.ipv6.vt.edu [IPv6:2607:b400:92:9:0:9d:8fcb:4116]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id 05KIqele025348 for ; Sat, 20 Jun 2020 14:52:40 -0400 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mr5.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 05KIqZM1004291 for ; Sat, 20 Jun 2020 14:52:40 -0400 Received: by mail-qv1-f69.google.com with SMTP id q5so9428823qvp.23 for ; Sat, 20 Jun 2020 11:52:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:mime-version:date :message-id; bh=dwZeMkh+DsPbnyYGwceXjBXapy6lVxCTDStNpO5K+aU=; b=s4/6WPE+cE6MBlEcLzXX8260eUsMDqGnJCre5Gv3og8mc7d+HglTCWgId/XOcwtiOc 8AQ1KwlPEJxMCJsRfUUr696xEflCJFuR3zqGZHZ0MDM175acTenuzjnjymN6uH00U01r bb96p9PCyuP0eb2diFYReGPbZxsdz1WrdBqsY4Ae/WdIM16TJoiVTWNRyVYcybScMdFv Ka+VrJJeE5/62DH8yDT+zwCQN0BQM1zXDghvGIIXyfFgEoI+OYGAwL2lanvhc8Bo4sCL rkRlEBYVVVer7JyTVOFOOzfTpYz/MDjdgU1Q+nJbAeBOXOVRMuhX0mD5hNHm3rQFY6yi KJOw== X-Gm-Message-State: AOAM532vbbNaOTsNLbyhtan8EAisvLE2E+W3J3BJpX4d/rBiX0aN3hZM q7FzCMnOENrrUZk5JW2/iGRGjuop2UsJqcJpLkc73/FHvie5cJx4iOWHLR6GbOrf9Hvsy9J0KY8 mdjjzJSG3xkRmoD11Ti5JDkFfeJq5PJ/I1i8= X-Received: by 2002:a37:a643:: with SMTP id p64mr9171253qke.214.1592679155361; Sat, 20 Jun 2020 11:52:35 -0700 (PDT) X-Received: by 2002:a37:a643:: with SMTP id p64mr9171236qke.214.1592679155078; Sat, 20 Jun 2020 11:52:35 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id b53sm10601172qtc.65.2020.06.20.11.52.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jun 2020 11:52:34 -0700 (PDT) From: "Valdis =?utf-8?Q?Kl=c4=93tnieks?=" X-Google-Original-From: "Valdis =?utf-8?Q?Kl=c4=93tnieks?=" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Masahiro Yamada , Michal Marek cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: kbuild: separate kerneldoc warnings from compiler warnings Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 20 Jun 2020 14:52:33 -0400 Message-ID: <591473.1592679153@turing-police> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch introduces a new build flag 'K=1' which controls whether kerneldoc warnings should be issued, separating them from the compiler warnings that W= controls. Signed-off-by: Valdis Kletnieks diff --git a/Makefile b/Makefile index 29abe44ada91..b1c0f9484a66 100644 --- a/Makefile +++ b/Makefile @@ -1605,6 +1605,7 @@ PHONY += help @echo ' (sparse by default)' @echo ' make C=2 [targets] Force check of all c source with $$CHECK' @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections' + @echo ' make K=1 [targets] Warn about problems in kerneldoc comments' @echo ' make W=n [targets] Enable extra build checks, n=1,2,3 where' @echo ' 1: warnings which may be relevant and do not occur too often' @echo ' 2: warnings which occur quite often but may still be relevant' diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 2e8810b7e5ed..9bcb77f5a5f1 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -100,7 +100,7 @@ else ifeq ($(KBUILD_CHECKSRC),2) cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< endif -ifneq ($(KBUILD_EXTRA_WARN),) +ifneq ($(KBUILD_KDOC_WARN),) cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< endif diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 4aea7cf71d11..3fd5881c91b0 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -17,6 +17,12 @@ endif export KBUILD_EXTRA_WARN +ifeq ("$(origin K)", "command line") + KBUILD_KDOC_WARN := $(K) +endif + +export KBUILD_KDOC_WARN + # # W=1 - warnings which may be relevant and do not occur too often #