Re: [U-Boot] [PATCH 4/4] dm: simplify the loop in lists_driver_lookup_name()

2014-10-09 Thread Simon Glass
On 28 September 2014 12:49, Igor Grinberg wrote: > Hi Masahiro, Simon, > > On 09/28/14 18:22, Simon Glass wrote: >> Hi Masahiro, >> >> On 28 September 2014 07:52, Masahiro Yamada >> wrote: >>> if (strncmp(name, entry->name, len)) >>> continue; >>> >>> /* Full matc

Re: [U-Boot] [PATCH 4/4] dm: simplify the loop in lists_driver_lookup_name()

2014-09-28 Thread Igor Grinberg
Hi Masahiro, Simon, On 09/28/14 18:22, Simon Glass wrote: > Hi Masahiro, > > On 28 September 2014 07:52, Masahiro Yamada wrote: >> if (strncmp(name, entry->name, len)) >> continue; >> >> /* Full match */ >> if (len == strlen(entry->name)) >>

Re: [U-Boot] [PATCH 4/4] dm: simplify the loop in lists_driver_lookup_name()

2014-09-28 Thread Simon Glass
Hi Masahiro, On 28 September 2014 07:52, Masahiro Yamada wrote: > if (strncmp(name, entry->name, len)) > continue; > > /* Full match */ > if (len == strlen(entry->name)) > return entry; > > is equivalent to: > > if (!strcmp(name, ent

Re: [U-Boot] [PATCH 4/4] dm: simplify the loop in lists_driver_lookup_name()

2014-09-28 Thread Simon Glass
Hi Masahiro, On 28 September 2014 07:52, Masahiro Yamada wrote: > if (strncmp(name, entry->name, len)) > continue; > > /* Full match */ > if (len == strlen(entry->name)) > return entry; > > is equivalent to: > > if (!strcmp(name, ent

[U-Boot] [PATCH 4/4] dm: simplify the loop in lists_driver_lookup_name()

2014-09-28 Thread Masahiro Yamada
if (strncmp(name, entry->name, len)) continue; /* Full match */ if (len == strlen(entry->name)) return entry; is equivalent to: if (!strcmp(name, entry->name)) return entry; The latter is simpler. Signed-off-by: Ma