Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753840AbbGFIco (ORCPT ); Mon, 6 Jul 2015 04:32:44 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:33639 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751215AbbGFIcl (ORCPT ); Mon, 6 Jul 2015 04:32:41 -0400 MIME-Version: 1.0 From: Valentin Rothberg Date: Mon, 6 Jul 2015 10:32:11 +0200 Message-ID: Subject: Kconfig symbols: coding style: naming convention in Make and CPP syntax To: Linus Torvalds , Greg KH , Paul Bolle , hengelein Stefan , Andreas Ruprecht , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, akpm@linux-foundation.org, sfr@canb.auug.org.au, apw@canonical.com, joe@perches.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1489 Lines: 31 Hi, Kconfig symbols in Make and CPP syntax are prefixed with 'CONFIG_' and suffixed with '_MODULE' in case of modules. Static analysis tools like scripts/checkkconfigsymbols.py, the Undertaker tools [1] or Paul's perl monster rely on the assumption that 'CONFIG_' prefixed symbols must be defined somewhere in a Kconfig file. Sadly, this naming convention is not explicitly written down in any documentation file. Hence there are more than 250 cases in the source where 'CONFIG_' prefixed symbols are defined outside Kconfig (e.g., #define CONFIG_IRQ_REQ [..] in drivers/pcmcia/cs_internal.h). To give an example, 65 of such cases are newly introduced with the gigantic AMD driver mentioned in Linus' v4.2-rc1 log. Since the naming convention is not made explicit, it can be hard to convince people of not using the 'CONFIG_' prefix. So here is my question/proposal: Do you agree on making the 'CONFIG_' naming convention explicit (e.g., in Documentation/CodingStyle)? It would simplify the life of people who check git trees for Kconfig issues and report them, because a pointer to an explicit rule is more convincing than explaining how Kbuild transforms a .config file. Kind regards, Valentin [1] https://undertaker.cs.fau.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/