[U-Boot] [RFC PATCH] console/device: rework function naming
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Sun May 3 20:42:26 CEST 2009
On 20:41 Sun 03 May , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
>
> In message <1241371349-2140-1-git-send-email-plagnioj at jcrosoft.com> you wrote:
> > actually the console API use the following naming convention
> >
> > ---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
> > instead of using device_XX
> >
> > we now switch to console_XX and console_device_t
>
> Please be careful. "console" is a name (or prefex) that is already
> taken, and there are other (globally visible) identifiers, so con-
> fusion might become a problem - see for example overwrite_console(),
> console_changed(), console_buffer[], get_console_port(),
> console_init_f(), env-var console_nr, consoles[], next_cons_choice(),
> console_assign(), console, console_init(), console_dev,
> default_serial_console, cur_console, console_chan, ... etc. etc.
>
> Also, we have common/console.c with lots of console_* names.
>
> Actually there is even a direct name conflict - console_init() is
> already in use (in board/netphone/phone_console.c), and your patch
> fails to resolve this conflict.
it does, it's call consoles_init()
>
>
> Maybe "stdio" would be a better choice than "console" here?
why not
I'll wait other comment before write the true patch
Best Regards,
J.
More information about the U-Boot
mailing list