[PATCH 02/62] mtd: introduce mtd_device_(un)register()

Artem Bityutskiy dedekind1 at gmail.com
Mon May 23 11:17:03 EDT 2011


On Mon, 2011-05-23 at 10:22 +0100, Jamie Iles wrote:
> +/**
> + * mtd_device_register() - register an MTD device
> + *
> + * Register an MTD device with the system and optionally, a number of
> + * partitions.  If nr_parts is 0 then the whole device is registered,
> + * otherwise only the partitions are registered.  To register both the full
> + * device *and* the partitions, call mtd_device_register() twice, once with
> + * nr_parts == 0 and once equal to the number of partitions.
> + *
> + * @master	The MTD device to register.
> + * @parts	The partitions to register - only valid if nr_parts > 0.
> + * @nr_parts	The number of partitions in parts.  If zero then the full
> + *		MTD device is registered.
> + */
> +extern int mtd_device_register(struct mtd_info *master,
> +			       const struct mtd_partition *parts,
> +			       int nr_parts);

It does make sense to describe the function in the "interface" file, but
in the kernel we add the kernel-doc comments above the function
implementation, this is just the established practice. You may find some
examples where the description is in the .h file, but this is rare (yes,
the kernel is fare from being consistent).

So please, move the descriptive comments to mtdcore.c.

Also, please, check the kernel-doc comments buy feeding your file to
scripts kernel-doc and make sure it does not generate errors or
warnings. 

Please, do not re-send all patches, just this one, if possible. Note, if
something requires a minor conflict resolution - I can do this.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list