From patchwork Mon Nov 20 22:39:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darren Hart X-Patchwork-Id: 10067403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7BE05603FA for ; Mon, 20 Nov 2017 22:40:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DD4E293B5 for ; Mon, 20 Nov 2017 22:40:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62A7129483; Mon, 20 Nov 2017 22:40:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E87DC293B5 for ; Mon, 20 Nov 2017 22:40:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390AbdKTWjt (ORCPT ); Mon, 20 Nov 2017 17:39:49 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:60364 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751253AbdKTWjr (ORCPT ); Mon, 20 Nov 2017 17:39:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Bk6TiMMmzoQqv2nnrhDCY2LQrdwWkoRr+cfha/vQDLo=; b=EhpxHhyI0UYTN5qMhVklXsi3o G6XBO8wW4q+Da2wE+a5XdmO3CKA5R1S9K4H89bnG/TZG9kAgfEVK6kC6qkTq5AlS9mOdf/FzbDyRK 0Nvza5MspojFQ2qdnsnCRlbxY7LM2U0AKonY8f+/RlURQ7Hk6sqZeX0AG6nNNOK3o+3+uQVr6ezhp SkzOw4Y9+3PWVfx5gyJkISKEGgetB3ghs9lorJ5EOCtcu/S9/cWkF0jUbsVLmlULWRQF4ku7WgZIm 6rVWbr1qmPhICVeYv83y9oEs3L44enM4QNSXNfrIZFnAYMEOzoPZNqnE5zyRwcQ4bvtY44K1RDoyF i2Zna6J5A==; Received: from dvhart by bombadil.infradead.org with local (Exim 4.87 #1 (Red Hat Linux)) id 1eGujC-0007RR-VI; Mon, 20 Nov 2017 22:39:46 +0000 From: Darren Hart To: LKML Cc: "Darren Hart (VMware)" , "Yann E. MORIN" , Masahiro Yamada , Michal Marek , Jonathan Corbet , linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 1/2] Documentation/kbuild: Add guidance for the use of default Date: Mon, 20 Nov 2017 14:39:33 -0800 Message-Id: <575ec3811e20371ab691cfb9611c31be48e5cc90.1511217248.git.dvhart@infradead.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Darren Hart (VMware)" Document the preference [1] for new CONFIG options to "default n" (or not use default at all) in order to minimizes changes to the config, especially to avoid "make oldconfig" growing unnecessarily from release to release. Document the exceptions where it is acceptable to use "default y/m" for new CONFIG options. 1. https://lkml.org/lkml/2017/11/18/257 Cc: "Yann E. MORIN" Cc: Masahiro Yamada Cc: Michal Marek Cc: Jonathan Corbet Cc: linux-kbuild@vger.kernel.org Cc: linux-doc@vger.kernel.org Signed-off-by: Darren Hart (VMware) --- Documentation/kbuild/kconfig-language.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index 262722d..688e41e 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt @@ -77,6 +77,27 @@ applicable everywhere (see syntax). Optionally, dependencies only for this default value can be added with "if". + The default value deliberately defaults to 'n' in order to avoid bloating the + build. With few exceptions, new config options should not change this. The + intent is for "make oldconfig" to add as little as possible to the config from + release to release. + + Note: + Things that merit "default y/m" include: + + a) A new Kconfig option for something that used to always be built + should be "default y". + + b) A new gatekeeping Kconfig option that hides/shows other Kconfig + options (but does not generate any code of its own), should be + "default y" so people will see those other options. + + c) Sub-driver behavior or similar options for a driver that is + "default n". This allows you to provide sane defaults. + + d) Hardware or infrastructure that everybody expects, such as CONFIG_NET + or CONFIG_BLOCK. These are rare exceptions. + - type definition + default value: "def_bool"/"def_tristate" ["if" ] This is a shorthand notation for a type definition plus a value.