Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1254630

Re: [PATCH v9 1/5] configfs: Allow dynamic group creation

From Daniel Baluta <daniel.baluta@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v9 1/5] configfs: Allow dynamic group creation
Date 2015-10-23 16:10 +0200
Message-ID <qmLcC-3EL-9@gated-at.bofh.it> (permalink)
References <qmJNw-1va-5@gated-at.bofh.it> <qmJNw-1va-23@gated-at.bofh.it> <qmJXb-1GX-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Christoph, one question. See below.

On Fri, Oct 23, 2015 at 3:48 PM, Christoph Hellwig <hch@lst.de> 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.
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v9 1/5] configfs: Allow dynamic group creation Daniel Baluta <daniel.baluta@intel.com> - 2015-10-23 14:40 +0200
  Re: [PATCH v9 1/5] configfs: Allow dynamic group creation Christoph Hellwig <hch@lst.de> - 2015-10-23 14:50 +0200
    Re: [PATCH v9 1/5] configfs: Allow dynamic group creation Daniel Baluta <daniel.baluta@intel.com> - 2015-10-23 15:10 +0200
    Re: [PATCH v9 1/5] configfs: Allow dynamic group creation Daniel Baluta <daniel.baluta@intel.com> - 2015-10-23 16:10 +0200

csiph-web