Edward O'Callaghan has uploaded this change for review.

View Change

raiden_debug_spi.c: Fix indents to be consistent

Change-Id: I414d6e5fcb590a006dd53fa93df80ec2a765c5d1
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M raiden_debug_spi.c
1 file changed, 40 insertions(+), 40 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/08/39308/1
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c
index 84b99ab..08db583 100644
--- a/raiden_debug_spi.c
+++ b/raiden_debug_spi.c
@@ -151,12 +151,12 @@
int ret;

if (write_count > MAX_PACKET_SIZE - PACKET_HEADER_SIZE) {
- msg_perr("Raiden: invalid write_count of %d\n", write_count);
+ msg_perr("Raiden: Invalid write_count of %d\n", write_count);
return SPI_INVALID_LENGTH;
}

if (read_count > MAX_PACKET_SIZE - PACKET_HEADER_SIZE) {
- msg_perr("Raiden: invalid read_count of %d\n", read_count);
+ msg_perr("Raiden: Invalid read_count of %d\n", read_count);
return SPI_INVALID_LENGTH;
}

@@ -166,11 +166,11 @@
memcpy(buffer + PACKET_HEADER_SIZE, write_buffer, write_count);

ret = LIBUSB(libusb_bulk_transfer(device->handle,
- out_endpoint,
+ out_endpoint,
buffer,
- write_count + PACKET_HEADER_SIZE,
- &transferred,
- TRANSFER_TIMEOUT_MS));
+ write_count + PACKET_HEADER_SIZE,
+ &transferred,
+ TRANSFER_TIMEOUT_MS));
if (ret != 0) {
msg_perr("Raiden: OUT transfer failed\n"
" write_count = %d\n"
@@ -186,11 +186,11 @@
}

ret = LIBUSB(libusb_bulk_transfer(device->handle,
- in_endpoint,
+ in_endpoint,
buffer,
- read_count + PACKET_HEADER_SIZE,
- &transferred,
- TRANSFER_TIMEOUT_MS));
+ read_count + PACKET_HEADER_SIZE,
+ &transferred,
+ TRANSFER_TIMEOUT_MS));
if (ret != 0) {
msg_perr("Raiden: IN transfer failed\n"
" write_count = %d\n"
@@ -201,7 +201,7 @@

if ((unsigned) transferred != read_count + PACKET_HEADER_SIZE) {
msg_perr("Raiden: Read failure (read %d, expected %d)\n",
- transferred, read_count + PACKET_HEADER_SIZE);
+ transferred, read_count + PACKET_HEADER_SIZE);
return 0x10002;
}

@@ -281,16 +281,16 @@
static int shutdown(void * data)
{
int ret = LIBUSB(libusb_control_transfer(
- device->handle,
- LIBUSB_ENDPOINT_OUT |
- LIBUSB_REQUEST_TYPE_VENDOR |
- LIBUSB_RECIPIENT_INTERFACE,
- RAIDEN_DEBUG_SPI_REQ_DISABLE,
- 0,
- device->interface_descriptor->bInterfaceNumber,
- NULL,
- 0,
- TRANSFER_TIMEOUT_MS));
+ device->handle,
+ LIBUSB_ENDPOINT_OUT |
+ LIBUSB_REQUEST_TYPE_VENDOR |
+ LIBUSB_RECIPIENT_INTERFACE,
+ RAIDEN_DEBUG_SPI_REQ_DISABLE,
+ 0,
+ device->interface_descriptor->bInterfaceNumber,
+ NULL,
+ 0,
+ TRANSFER_TIMEOUT_MS));
if (ret != 0) {
msg_perr("Raiden: Failed to disable SPI bridge\n");
return ret;
@@ -368,15 +368,15 @@
device = current;

if (find_endpoints(device, &in_endpoint, &out_endpoint)) {
- msg_pdbg("Raiden: Failed to find valid endpoints on device");
- usb_device_show(" ", current);
- goto loop_end;
+ msg_pdbg("Raiden: Failed to find valid endpoints on device");
+ usb_device_show(" ", current);
+ goto loop_end;
}

if (usb_device_claim(device)) {
- msg_pdbg("Raiden: Failed to claim USB device");
- usb_device_show(" ", current);
- goto loop_end;
+ msg_pdbg("Raiden: Failed to claim USB device");
+ usb_device_show(" ", current);
+ goto loop_end;
}

if (!serial) {
@@ -395,9 +395,9 @@
}

rc = libusb_get_string_descriptor_ascii(device->handle,
- descriptor.iSerialNumber,
- dev_serial,
- sizeof(dev_serial));
+ descriptor.iSerialNumber,
+ dev_serial,
+ sizeof(dev_serial));
if (rc < 0) {
LIBUSB(rc);
} else {
@@ -427,16 +427,16 @@
free_dev_list(&current);

ret = LIBUSB(libusb_control_transfer(
- device->handle,
- LIBUSB_ENDPOINT_OUT |
- LIBUSB_REQUEST_TYPE_VENDOR |
- LIBUSB_RECIPIENT_INTERFACE,
- request_enable,
- 0,
- device->interface_descriptor->bInterfaceNumber,
- NULL,
- 0,
- TRANSFER_TIMEOUT_MS));
+ device->handle,
+ LIBUSB_ENDPOINT_OUT |
+ LIBUSB_REQUEST_TYPE_VENDOR |
+ LIBUSB_RECIPIENT_INTERFACE,
+ request_enable,
+ 0,
+ device->interface_descriptor->bInterfaceNumber,
+ NULL,
+ 0,
+ TRANSFER_TIMEOUT_MS));
if (ret != 0) {
msg_perr("Raiden: Failed to enable SPI bridge\n");
return ret;

To view, visit change 39308. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I414d6e5fcb590a006dd53fa93df80ec2a765c5d1
Gerrit-Change-Number: 39308
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-MessageType: newchange