]> asedeno.scripts.mit.edu Git - linux.git/commit
greybus: refactor gb_connection_recv()
authorAlex Elder <elder@linaro.org>
Wed, 19 Nov 2014 18:27:17 +0000 (12:27 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 19 Nov 2014 18:43:56 +0000 (10:43 -0800)
commitd37b1db13f8b5f3ad27aff5aa487b4ea2a298aa4
tree57dcf59e1d117f4e6b05fd4451f080c49e3470cc
parent8fc71a73363f742c70ef5d570b795583124efd29
greybus: refactor gb_connection_recv()

Define two helper functions to break down handling of a received
message.  One is used to handle receiving an incoming request
message, the other for a response message.

Three other changes are made:
    - We verify message size recorded in the message header does not
      exceed the amount of data that's arriving.
    - We no longer warn if a request' recorded message size differs
      from the number of bytes that have arrived.
    - We now record the operation id for an incoming request.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c