diff options
Diffstat (limited to 'kernel/ethosu_inference.c')
-rw-r--r-- | kernel/ethosu_inference.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/kernel/ethosu_inference.c b/kernel/ethosu_inference.c index 5c57074..b985e75 100644 --- a/kernel/ethosu_inference.c +++ b/kernel/ethosu_inference.c @@ -15,7 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, you can access it online at * http://www.gnu.org/licenses/gpl-2.0.html. - * */ /**************************************************************************** @@ -426,7 +425,6 @@ void ethosu_inference_rsp(struct ethosu_mailbox *mailbox, struct device *dev = mailbox->dev; struct ethosu_mailbox_msg *msg; struct ethosu_inference *inf; - int ret; int i; msg = ethosu_mailbox_find(mailbox, msg_id, @@ -442,27 +440,14 @@ void ethosu_inference_rsp(struct ethosu_mailbox *mailbox, inf = container_of(msg, typeof(*inf), msg); if (rsp->status == ETHOSU_CORE_STATUS_OK && - inf->ofm_count <= ETHOSU_CORE_BUFFER_MAX) { - uint32_t i; - + inf->ofm_count <= ETHOSU_CORE_BUFFER_MAX) inf->status = ETHOSU_UAPI_STATUS_OK; - - for (i = 0; i < inf->ofm_count; i++) { - struct ethosu_buffer *ofm = inf->ofm[i]; - - ret = ethosu_buffer_resize( - ofm, ofm->size + rsp->ofm_size[i], - ofm->offset); - if (ret) - inf->status = ETHOSU_UAPI_STATUS_ERROR; - } - } else if (rsp->status == ETHOSU_CORE_STATUS_REJECTED) { + else if (rsp->status == ETHOSU_CORE_STATUS_REJECTED) inf->status = ETHOSU_UAPI_STATUS_REJECTED; - } else if (rsp->status == ETHOSU_CORE_STATUS_ABORTED) { + else if (rsp->status == ETHOSU_CORE_STATUS_ABORTED) inf->status = ETHOSU_UAPI_STATUS_ABORTED; - } else { + else inf->status = ETHOSU_UAPI_STATUS_ERROR; - } if (inf->status == ETHOSU_UAPI_STATUS_OK) { for (i = 0; i < ETHOSU_CORE_PMU_MAX; i++) { |