[efi] Use efi_handle_name() instead of efi_devpath_text() where applicable

Using efi_devpath_text() is marginally more efficient if we already
have the device path protocol available, but the mild increase in
efficiency is not worth compromising the clarity of the pattern:

  DBGC ( device, "THING %p %s ...", device, efi_handle_name ( device ) );

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2014-07-31 11:21:09 +01:00
parent 2e0821b9ed
commit 60891f699a
4 changed files with 43 additions and 47 deletions

View File

@@ -291,15 +291,14 @@ static int efipci_start ( struct efi_device *efidev ) {
EFI_OPEN_PROTOCOL_EXCLUSIVE ),
pci ) ) != 0 ) {
DBGC ( device, "EFIPCI %p %s could not open PCI device: %s\n",
device, efi_devpath_text ( efidev->path ),
strerror ( rc ) );
device, efi_handle_name ( device ), strerror ( rc ) );
goto err_open;
}
/* Find driver */
if ( ( rc = pci_find_driver ( pci ) ) != 0 ) {
DBGC ( device, "EFIPCI %p %s has no driver\n",
device, efi_devpath_text ( efidev->path ) );
device, efi_handle_name ( device ) );
goto err_find_driver;
}
@@ -310,12 +309,12 @@ static int efipci_start ( struct efi_device *efidev ) {
/* Probe driver */
if ( ( rc = pci_probe ( pci ) ) != 0 ) {
DBGC ( device, "EFIPCI %p %s could not probe driver \"%s\": "
"%s\n", device, efi_devpath_text ( efidev->path ),
"%s\n", device, efi_handle_name ( device ),
pci->id->name, strerror ( rc ) );
goto err_probe;
}
DBGC ( device, "EFIPCI %p %s using driver \"%s\"\n", device,
efi_devpath_text ( efidev->path ), pci->id->name );
DBGC ( device, "EFIPCI %p %s using driver \"%s\"\n",
device, efi_handle_name ( device ), pci->id->name );
efidev_set_drvdata ( efidev, pci );
return 0;