From: Masahiro Yamada Date: Fri, 12 Sep 2014 20:25:59 +0900 Subject: [U-Boot] A minor question on a Driver Model function Message-ID: <20140912202559.58E5.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, I have a qustion about lists_driver_lookup_name() function. for (entry = drv; entry != drv + n_ents; entry++) { if (strncmp(name, entry->name, len)) continue; /* Full match */ if (len == strlen(entry->name)) return entry; } Why is this not like follows? for (entry = drv; entry != drv + n_ents; entry++) { if (!strcmp(name, entry->name)) return entry; } It seems equivalent to the former and simpler. Am I missing something? Best Regards Masahiro Yamada