[U-Boot] [RFC PATCH 3/3 V2] stdio/device: rework function naming convention

Wolfgang Denk wd at denx.de
Sat May 9 19:32:29 CEST 2009


Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <1241863009-26036-3-git-send-email-plagnioj at jcrosoft.com> you wrote:
> actually the console API use the following naming convention

Please look up the difference in meaning between "actually" and "cur-
rently"; I think you usually mean "currently" when you say "actually".


This patch should preceed the previous one, where you already use the
new, not yet introduced "stdio_" naming scheme.

> ======Extract======
> typedef struct device_t;
> 
> int	device_register (device_t * dev);
> int	devices_init (void);
> int	device_deregister(char *devname);
> struct list_head* device_get_list(void);
> device_t* device_get_by_name(char* name);
> device_t* device_clone(device_t *dev);
> =======
> 
> which is not console dependent and is confusing

I think this explanation is confusing, too, as I don't know whjat you
mean by "console dependent".

> ---
> v2:
> use stdio_ instead of console_
> check all ubifs update

???? What has ubifs to do with that? UBI is nowhere mentioned in this
patch at all.

> -	device_t kbddev ;
> +	stdio_device_t kbddev ;

stdio_device_t is too long; please use "stdio_dev instead of
stdio_device.

> -#include <devices.h>
> +#include <stdio.h>

NAK. This is unacceptable. <stdio.h> has a standardized meaning, and
what you are doing here is something completely different. You might
call this stdio_dev.h or similar, but stdio.h cannot be accepted.
 
> -#if defined(CONFIG_SPLASH_SCREEN) && !defined(CONFIG_SYS_DEVICE_NULLDEV)
> -#define	CONFIG_SYS_DEVICE_NULLDEV	1
> +#if defined(CONFIG_SPLASH_SCREEN) && !defined(CONFIG_SYS_STDIO_NULLDEV)
> +#define	CONFIG_SYS_STDIO_NULLDEV	1
>  #endif

I'm not happy about the CONFIG_SYS_STDIO_NULLDEV; the "NULL device" is
actually a more general concept and not limited to the stdio handling.
Please do not put a "STDIO" in this name.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Perfection is reached, not when there is no longer anything  to  add,
but when there is no longer anything to take away.
                                           - Antoine de Saint-Exupery


More information about the U-Boot mailing list