Hi Simon,

On Mon, 17 Nov 2014 09:22:19 +0000
Simon Glass <s...@chromium.org> wrote:
> > --- a/drivers/core/device.c
> > +++ b/drivers/core/device.c
> > @@ -157,11 +157,9 @@ int device_bind_by_name(struct udevice *parent, bool 
> > pre_reloc_only,
> >  {
> >         struct driver *drv;
> >
> > -       drv = lists_driver_lookup_name(info->name);
> > +       drv = __lists_driver_lookup_name(info->name, pre_reloc_only);
> 
> This patch looks good, except that I would prefer
> lists_driver_lookup_name_prereloc() to __lists_driver_lookup_name().
> The __ seems like an internal compiler name to me. So can you rename
> it?

Indeed. I think __ should be used carefully especially when it comes to
host programs, but I think we can play it by ear in standalone binaries
such as the kernel and U-boot code.

I often see "__" prefixes in Linux and in my understanding,
__foo() is a "use it carefully" version or locally used interface of foo()
(for example, when the resources are not protected by spinlocks, etc.).
So, I often use it when I cannot invent a good func name.

Hmm, lists_driver_lookup_name_prereloc() is already too long
and __prereloc is a bit misleading because it is used both before and after 
relocation,
isn't it?


Best Regards
Masahiro Yamada

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to