ams: globally prefer R_RETURN to return for ams::Result

This commit is contained in:
Michael Scire 2022-03-26 14:48:33 -07:00
parent dd78ede99f
commit bbf22b4c60
325 changed files with 1955 additions and 1993 deletions

View file

@ -130,20 +130,20 @@ namespace ams::i2c {
Result Send(const I2cSession &session, const void *src, size_t src_size, TransactionOption option) {
const ams::sf::InAutoSelectBuffer buf(src, src_size);
return GetInterface(session)->Send(buf, option);
R_RETURN(GetInterface(session)->Send(buf, option));
}
Result Receive(void *dst, size_t dst_size, const I2cSession &session, TransactionOption option) {
const ams::sf::OutAutoSelectBuffer buf(dst, dst_size);
return GetInterface(session)->Receive(buf, option);
R_RETURN(GetInterface(session)->Receive(buf, option));
}
Result ExecuteCommandList(void *dst, size_t dst_size, const I2cSession &session, const void *src, size_t src_size) {
const ams::sf::OutAutoSelectBuffer buf(dst, dst_size);
const ams::sf::InPointerArray<i2c::I2cCommand> arr(static_cast<const i2c::I2cCommand *>(src), src_size);
return GetInterface(session)->ExecuteCommandList(buf, arr);
R_RETURN(GetInterface(session)->ExecuteCommandList(buf, arr));
}
void SetRetryPolicy(const I2cSession &session, int max_retry_count, int retry_interval_us) {