From 78ee3a96d1cb1534e4748f821e53dee296c9cd2f Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Mon, 28 Oct 2024 15:35:40 +0800 Subject: [PATCH] fix errors --- src/runtime/src/comms.rs | 6 +++--- src/runtime/src/rtio_mgt.rs | 4 ++-- src/satman/src/subkernel.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index bb0ac50..e88beff 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -488,14 +488,14 @@ async fn handle_run_kernel( kernel::Message::RpcRecvRequest(slot) => slot, other => panic!("expected root value slot from core1, not {:?}", other), }; - let remaining_tags = rpc::recv_return(&mut reader, ¤t_tags, slot, &mut |size| { + let remaining_tags = rpc::recv_return(&mut reader, ¤t_tags, slot, &mut |size| -> Result<*mut ()> { if size == 0 { - 0 as *mut () + Ok(0 as *mut ()) } else { let mut control = control.borrow_mut(); control.tx.send(kernel::Message::RpcRecvReply(Ok(size))); match control.rx.recv() { - kernel::Message::RpcRecvRequest(slot) => slot, + kernel::Message::RpcRecvRequest(slot) => Ok(slot), other => { panic!("expected nested value slot from kernel CPU, not {:?}", other) } diff --git a/src/runtime/src/rtio_mgt.rs b/src/runtime/src/rtio_mgt.rs index f62fe75..b4253cc 100644 --- a/src/runtime/src/rtio_mgt.rs +++ b/src/runtime/src/rtio_mgt.rs @@ -55,8 +55,8 @@ pub mod drtio { } } - impl From for Error { - fn from(_error: DrtioError) -> Self { + impl From> for Error { + fn from(_error: DrtioError) -> Self { Error::AuxError } } diff --git a/src/satman/src/subkernel.rs b/src/satman/src/subkernel.rs index a14f939..8da8199 100644 --- a/src/satman/src/subkernel.rs +++ b/src/satman/src/subkernel.rs @@ -9,7 +9,7 @@ use core::{slice, str}; use cslice::AsCSlice; use dma::{Error as DmaError, Manager as DmaManager}; use io::{Cursor, Error as IoError, ProtoWrite, Write}; -use ksupport::{eh_artiq, kernel, rpc}; +use ksupport::{eh_artiq, kernel, rpc, rtio}; use libboard_artiq::{ drtio_routing::RoutingTable, drtioaux,