From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 3 May 2009 20:42:26 +0200 Subject: [U-Boot] [RFC PATCH] console/device: rework function naming In-Reply-To: <20090503184110.30C0683420E8@gemini.denx.de> References: <1241371349-2140-1-git-send-email-plagnioj@jcrosoft.com> <20090503184110.30C0683420E8@gemini.denx.de> Message-ID: <20090503184226.GY25959@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 20:41 Sun 03 May , Wolfgang Denk wrote: > Dear Jean-Christophe PLAGNIOL-VILLARD, > > In message <1241371349-2140-1-git-send-email-plagnioj@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.