Lines Matching refs:result
110 * Set an operation's result.
116 * At that point nobody should be looking at the result until the
119 * The first time the result gets set after the request has been
120 * sent, that result "sticks." That is, if two concurrent threads
121 * race to set the result, the first one wins. The return value
122 * tells the caller whether its result was recorded; if not the
125 * The result value -EILSEQ is reserved to signal an implementation
128 * the result to -EBADR, and attempts to do so result in a warning,
129 * and -EILSEQ is used instead. Similarly, the only valid result
132 * operation result.
134 static bool gb_operation_result_set(struct gb_operation *operation, int result)
139 if (result == -EINPROGRESS) {
142 * in flight. It should be the first result value
150 operation->errno = result;
160 * The first result value set after a request has been sent
161 * will be the final result of the operation. Subsequent
162 * attempts to set the result are ignored.
164 * Note that -EBADR is a reserved "initial state" result
165 * value. Attempts to set this value result in a warning,
166 * and the result code is set to -EILSEQ instead.
168 if (WARN_ON(result == -EBADR))
169 result = -EILSEQ; /* Nobody should be setting -EBADR */
174 operation->errno = result; /* First and final result */
182 int result = operation->errno;
184 WARN_ON(result == -EBADR);
185 WARN_ON(result == -EINPROGRESS);
187 return result;
265 * result should be -EINPROGRESS at this point.
267 * For outgoing requests, the operation result value should have
270 * and its result is available.
335 * The result field in a request message must be
342 header->result = 0;
714 * can fetch the result of the operation using gb_operation_result() if
738 * non-atomic (workqueue) context when the final result
791 * error is detected. The return value is the result of the
820 * it can simply supply the result errno; this function will
835 /* Record the result */
837 dev_err(&connection->hd->dev, "request result already set\n");
852 operation->response->header->result = gb_operation_errno_map(errno);
885 * operation is unidrectional, record the result of the operation and
984 errno = gb_operation_status_map(header->result);