greybus: firmware: break long lines
authorJohan Hovold <johan@hovoldconsulting.com>
Thu, 19 Nov 2015 17:28:00 +0000 (18:28 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 20 Nov 2015 00:07:48 +0000 (16:07 -0800)
Break lines longer than 80 cols, and clean up an error message while at
it.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/firmware.c

index 4e1530f..a95be08 100644 (file)
@@ -88,7 +88,7 @@ static int gb_firmware_get_firmware(struct gb_operation *op)
        struct gb_connection *connection = op->connection;
        struct gb_firmware *firmware = connection->private;
        const struct firmware *fw = firmware->fw;
-       struct gb_firmware_get_firmware_request *firmware_request = op->request->payload;
+       struct gb_firmware_get_firmware_request *firmware_request;
        struct gb_firmware_get_firmware_response *firmware_response;
        struct device *dev = &connection->bundle->dev;
        unsigned int offset, size;
@@ -105,6 +105,7 @@ static int gb_firmware_get_firmware(struct gb_operation *op)
                return -EINVAL;
        }
 
+       firmware_request = op->request->payload;
        offset = le32_to_cpu(firmware_request->offset);
        size = le32_to_cpu(firmware_request->size);
 
@@ -129,7 +130,7 @@ static int gb_firmware_get_firmware(struct gb_operation *op)
 static int gb_firmware_ready_to_boot(struct gb_operation *op)
 {
        struct gb_connection *connection = op->connection;
-       struct gb_firmware_ready_to_boot_request *rtb_request = op->request->payload;
+       struct gb_firmware_ready_to_boot_request *rtb_request;
        struct device *dev = &connection->bundle->dev;
        u8 status;
 
@@ -140,6 +141,7 @@ static int gb_firmware_ready_to_boot(struct gb_operation *op)
                return -EINVAL;
        }
 
+       rtb_request = op->request->payload;
        status = rtb_request->status;
 
        /* Return error if the blob was invalid */
@@ -192,8 +194,10 @@ static int gb_firmware_connection_init(struct gb_connection *connection)
         */
        ret = gb_operation_sync(connection, GB_FIRMWARE_TYPE_AP_READY, NULL, 0,
                                NULL, 0);
-       if (ret)
-               dev_err(&connection->bundle->dev, "Failed to send AP READY (%d)\n", ret);
+       if (ret) {
+               dev_err(&connection->bundle->dev,
+                               "failed to send AP READY: %d\n", ret);
+       }
 
        return 0;
 }