greybus: kill gb_operation_gbuf_complete()
It's possible this function was destined to do something important, but at this point it's pretty pointless. Get rid of it. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
parent
ea590d5cbd
commit
b37716f672
@ -152,49 +152,6 @@ out:
|
|||||||
gb_operation_complete(operation);
|
gb_operation_complete(operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Buffer completion function. We get notified whenever any buffer
|
|
||||||
* completes. For outbound messages, this tells us that the message
|
|
||||||
* has been sent. For inbound messages, it means the data has
|
|
||||||
* landed in the buffer and is ready to be processed.
|
|
||||||
*
|
|
||||||
* Either way, we don't do anything. We don't really care when an
|
|
||||||
* outbound message has been sent, and for incoming messages we
|
|
||||||
* we'll be done with everything we need to do before we mark it
|
|
||||||
* finished.
|
|
||||||
*
|
|
||||||
* XXX We may want to record that a request is (or is no longer) in flight.
|
|
||||||
*/
|
|
||||||
static void gb_operation_gbuf_complete(struct gbuf *gbuf)
|
|
||||||
{
|
|
||||||
if (gbuf->status) {
|
|
||||||
struct gb_operation *operation = gbuf->operation;
|
|
||||||
struct gb_operation_msg_hdr *header;
|
|
||||||
int id;
|
|
||||||
int type;
|
|
||||||
|
|
||||||
if (gbuf == operation->request)
|
|
||||||
header = operation->request->transfer_buffer;
|
|
||||||
else if (gbuf == operation->response)
|
|
||||||
header = operation->response->transfer_buffer;
|
|
||||||
else
|
|
||||||
header = NULL;
|
|
||||||
|
|
||||||
if (header) {
|
|
||||||
id = le16_to_cpu(header->id);
|
|
||||||
type = header->type;
|
|
||||||
} else {
|
|
||||||
id = -1;
|
|
||||||
type = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
gb_connection_err(operation->connection,
|
|
||||||
"operation %d type %d gbuf error %d",
|
|
||||||
id, type, gbuf->status);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Either this operation contains an incoming request, or its
|
* Either this operation contains an incoming request, or its
|
||||||
* response has arrived. An incoming request will have a null
|
* response has arrived. An incoming request will have a null
|
||||||
@ -204,7 +161,6 @@ static void gb_operation_gbuf_complete(struct gbuf *gbuf)
|
|||||||
static void gb_operation_recv_work(struct work_struct *recv_work)
|
static void gb_operation_recv_work(struct work_struct *recv_work)
|
||||||
{
|
{
|
||||||
struct gb_operation *operation;
|
struct gb_operation *operation;
|
||||||
struct gbuf *gbuf;
|
|
||||||
bool incoming_request;
|
bool incoming_request;
|
||||||
|
|
||||||
operation = container_of(recv_work, struct gb_operation, recv_work);
|
operation = container_of(recv_work, struct gb_operation, recv_work);
|
||||||
@ -212,13 +168,6 @@ static void gb_operation_recv_work(struct work_struct *recv_work)
|
|||||||
if (incoming_request)
|
if (incoming_request)
|
||||||
gb_operation_request_handle(operation);
|
gb_operation_request_handle(operation);
|
||||||
gb_operation_complete(operation);
|
gb_operation_complete(operation);
|
||||||
|
|
||||||
/* We're finished with the buffer we read into */
|
|
||||||
if (incoming_request)
|
|
||||||
gbuf = operation->request;
|
|
||||||
else
|
|
||||||
gbuf = operation->response;
|
|
||||||
gb_operation_gbuf_complete(gbuf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user