From: Masahiro Yamada Date: Mon, 17 Nov 2014 20:49:29 +0900 Subject: [U-Boot] [PATCH 6/8] dm: core: look up drivers more efficiently In-Reply-To: References: <1416212385-23800-7-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <20141117204929.7D28.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Mon, 17 Nov 2014 09:22:19 +0000 Simon Glass 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