1. 22 Nov, 2014 1 commit
    • Alex Elder's avatar
      greybus: use errno for operation result · 23383def
      Alex Elder authored
      An in-core operation structure tracks the progress of an operation.
      Currently it holds a result field that was intended to take the
      status value that arrives in an operation response message header.
      
      But operations can fail for reasons other than that, and it's
      inconvenient to try to represent those using the operation status
      codes.
      
      So change the operation->result field to be an int, and switch to
      storing negative errno values in it.  Rename it "errno" to make
      it obvious how to interpret the value.
      
      This patch makes another change, which simplifies the protocol drivers
      a lot.  It's being done as part of this patch because it affects all
      the same code as the above change does.  If desired I can split this
      into two separate patches.
      
      If a caller makes a synchronous gb_operation_request_send() request
      (i.e., no callback function is supplied), and the operation request
      and response messages were transferred successfully, have
      gb_operation_request_send() return the result of the request (i.e.,
      operation->errno).  This allows the caller (or more generally, any
      caller of gb_request_wait() to avoid having to look at this field
      for every successful send.
      
      Any caller that does an asynchronous request will of course need
      to look at request->errno in the callback function to see the
      result of the operation.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      23383def
  2. 21 Nov, 2014 10 commits
  3. 20 Nov, 2014 12 commits
  4. 19 Nov, 2014 11 commits
  5. 18 Nov, 2014 6 commits