From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20151023124812.GA4588@lst.de> References: <1445603558-27693-1-git-send-email-daniel.baluta@intel.com> <1445603558-27693-2-git-send-email-daniel.baluta@intel.com> <20151023124812.GA4588@lst.de> Date: Fri, 23 Oct 2015 17:09:47 +0300 Message-ID: Subject: Re: [PATCH v9 1/5] configfs: Allow dynamic group creation From: Daniel Baluta To: Christoph Hellwig Cc: Daniel Baluta , Jonathan Cameron , Joel Becker , "linux-iio@vger.kernel.org" , linux-fsdevel@vger.kernel.org, Lars-Peter Clausen , Hartmut Knaack , Linux Kernel Mailing List , "octavian.purdila@intel.com" , Paul Bolle , patrick.porlan@intel.com, Adriana Reus , constantin.musca@intel.com, marten@intuitiveaerial.com, Cristina Georgiana Opriceana , Peter Meerwald , viro@zeniv.linux.org.uk, Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: Christoph, one question. See below. On Fri, Oct 23, 2015 at 3:48 PM, Christoph Hellwig wrote: > Hi Daniel, > > all these functions look great, but can you also move your new > iio_sw_trigger_type_configfs_register/unregister functions to the > core code as those are the wrappers that everyone would have to write, > e.g. something like: > > int configfs_register_default_group(struct config_group *parent_group, > const char *name, struct config_item_type *item_type) > { > struct config_group *group; > > group = kzalloc(sizeof(*group), GFP_KERNEL); > if (!group) > return -ENOMEM; > config_group_init_type_name(group, name, item_type); Until this point this is the implementation of configfs_alloc_group. We have two options: 1) Remove configfs_alloc_group/configfs_free_group as people will directly use our new configfs_register_default_group that does the allocation. 2) Keep configfs_alloc/group/configfs_gree_group and use it here. I'm in favour of 1) variant, as it makes little sense to have a wrapper over kmalloc + config_group_init_type_name. thanks, Daniel.