greybus: get rid of gbuf->actual_length

Right now, the actual_length field of a gbuf is only ever assigned,
never used.  We now fill gbufs only with operation messages, and
they encode within them the amount of space "actually used" in a
buffer in a request-specific way.  As a result, there's no need
for the gbuf->actual_length field, so we can remove it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h
index 834cbaa..175bd00 100644
--- a/drivers/staging/greybus/greybus.h
+++ b/drivers/staging/greybus/greybus.h
@@ -130,7 +130,6 @@
 	int status;
 	void *transfer_buffer;
 	u32 transfer_buffer_length;
-	u32 actual_length;
 
 	bool outbound;			/* AP-relative data direction */
 
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c
index 24707f6..720cc76 100644
--- a/drivers/staging/greybus/operation.c
+++ b/drivers/staging/greybus/operation.c
@@ -351,8 +351,6 @@
 		goto err_cache;
 	operation->request_payload = operation->request->transfer_buffer +
 					sizeof(struct gb_operation_msg_hdr);
-	/* We always use the full request buffer */
-	operation->request->actual_length = request_size;
 
 	if (outgoing) {
 		type |= GB_OPERATION_TYPE_RESPONSE;
@@ -443,9 +441,6 @@
  */
 int gb_operation_response_send(struct gb_operation *operation)
 {
-	/* XXX
-	 * Caller needs to have set operation->response->actual_length
-	 */
 	gb_operation_remove(operation);
 	gb_operation_destroy(operation);
 
@@ -502,7 +497,6 @@
 	}
 
 	memcpy(gbuf->transfer_buffer, data, msg_size);
-	gbuf->actual_length = msg_size;
 
 	/* The rest will be handled in work queue context */
 	queue_work(gb_operation_recv_workqueue, &operation->recv_work);