1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

usb_device: Fix up whitespace

Drop unnecessary spaces and indent with tabs, as per the coding style.

TEST=Build with `make distclean && make VERSION=none -j` with and
     without this patch, the flashrom executable does not change.

Change-Id: I200ace750dbe3c8d99f792d70a85b2ebd4e5b0ce
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/51115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Angel Pons
2021-02-28 12:40:07 +01:00
parent 89261cc922
commit 9635cb4d91
2 changed files with 21 additions and 21 deletions

View File

@ -224,12 +224,12 @@ int usb_device_find(struct usb_match const *match, struct usb_device **devices)
ret = LIBUSB(libusb_get_device_descriptor(list[i], ret = LIBUSB(libusb_get_device_descriptor(list[i],
&descriptor)); &descriptor));
if (ret != 0) { if (ret != 0) {
msg_perr("USB: Failed to get device descriptor"); msg_perr("USB: Failed to get device descriptor");
free(*devices); free(*devices);
*devices = NULL; *devices = NULL;
return ret; return ret;
} }
if (check_match(&match->vid, descriptor.idVendor) && if (check_match(&match->vid, descriptor.idVendor) &&
check_match(&match->pid, descriptor.idProduct) && check_match(&match->pid, descriptor.idProduct) &&
@ -279,8 +279,8 @@ int usb_device_show(char const *prefix, struct usb_device *device)
ret = usb_device_open(device); ret = usb_device_open(device);
if (ret != 0) { if (ret != 0) {
msg_perr("USB: Failed to open device\n"); msg_perr("USB: Failed to open device\n");
return ret; return ret;
} }
ret = LIBUSB(libusb_get_device_descriptor(device->device, &descriptor)); ret = LIBUSB(libusb_get_device_descriptor(device->device, &descriptor));

View File

@ -41,21 +41,21 @@
* flashrom recognizes. It also displays additional libusb specific * flashrom recognizes. It also displays additional libusb specific
* information about the failure. * information about the failure.
*/ */
#define LIBUSB(expression) \ #define LIBUSB(expression) \
({ \ ({ \
int libusb_error__ = (expression); \ int libusb_error__ = (expression); \
\ \
if (libusb_error__ < 0) { \ if (libusb_error__ < 0) { \
msg_perr("libusb error: %s:%d %s\n", \ msg_perr("libusb error: %s:%d %s\n", \
__FILE__, \ __FILE__, \
__LINE__, \ __LINE__, \
libusb_error_name(libusb_error__)); \ libusb_error_name(libusb_error__)); \
libusb_error__ = LIBUSB_ERROR(libusb_error__); \ libusb_error__ = LIBUSB_ERROR(libusb_error__); \
} else { \ } else { \
libusb_error__ = 0; \ libusb_error__ = 0; \
} \ } \
\ \
libusb_error__; \ libusb_error__; \
}) })
/* /*
@ -64,7 +64,7 @@
*/ */
static inline bool usb_device_is_libusb_error(int error_code) static inline bool usb_device_is_libusb_error(int error_code)
{ {
return (0x20000 <= error_code && error_code < 0x20064); return (0x20000 <= error_code && error_code < 0x20064);
} }
/* /*