From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933603AbcHYIlu (ORCPT ); Thu, 25 Aug 2016 04:41:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:52924 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933523AbcHYIls (ORCPT ); Thu, 25 Aug 2016 04:41:48 -0400 Subject: Re: [RFC PATCH 0/5] Add CONFIG symbol as module attribute To: Christoph Hellwig , "Luis R. Rodriguez" References: <1471462023-119645-1-git-send-email-cristina.moraru09@gmail.com> <20160818175505.GM3296@wotan.suse.de> <20160825074313.GC18622@lst.de> Cc: Cristina Moraru , "vegard.nossum@gmail.com" , Valentin Rothberg , Hannes Reinecke , Sam Ravnborg , linux-kernel@vger.kernel.org, teg@jklm.no, kay@vrfy.org, rusty@rustcorp.com.au, akpm@linux-foundation.org, backports@vger.kernel.org, Guenter Roeck , Greg Kroah-Hartman , "rafael.j.wysocki" , Dmitry Torokhov , Takashi Iwai , Mauro Carvalho Chehab , Johannes Berg , Hauke Mehrtens , Paul Bolle , Paul Gortmaker , Alexey Khoroshilov , Sathya Prakash Veerichetty , "Martin K. Petersen" , Laurence Oberman , Johannes Thumshirn , Tejun Heo , Jej B , "Theodore Ts'o" , danijons@student.chalmers.se, Andrzej Wasowski From: Michal Marek Message-ID: Date: Thu, 25 Aug 2016 10:41:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20160825074313.GC18622@lst.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016-08-25 09:43, Christoph Hellwig wrote: > The idea seems useful, but I reallt don't like the 'reverse-engineering' > approach. > > If we want to this properly from the ground up we should just split out > our CONFIG_ SYMBOLS into > > MODULE_* - builds exactly one module (tristate, or maybe also as a built-in > only one, then like a bool) > > CONFIG_* - just bool, MODULE_ may depend on it, too. > > The other nice thing is that we could probably fold most of the Makefiles > into Kconfig using that methods as well, by listing the objectes required > for a module, e.g. > > module NVME_TARGET > tristate "NVMe Target support" > depends on BLOCK > depends on CONFIGFS_FS > name nvmet > objects core.o configfs.o admin-cmd.o io-cmd.o fabrics-cmd.o > objects discovery.o > > module NVME_TARGET_LOOP > tristate "NVMe loopback device support" > depends on BLK_DEV_NVME > depends on NVME_TARGET > select NVME_FABRICS > select SG_POOL > name nvme-loop > objects loop.o It looks nice for the simple case, but as soon as you need something non-standard, you will need to mix a kconfig generated and a manually written Makefile snippet. Michal