Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bitfield issue in SMBus header #9

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/smbus_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/// This bit shall be set to 1b. The value enables MCTP to be differentiated from IPMI over SMBus and IPMB (IPMI over I2C) protocols.
pub source_read_write, set_source_read_write: 24, 24;
/// For the local SMBus link, the slave address of the source device.
pub source_slave_addr, set_source_slave_addr: 30, 25;
pub source_slave_addr, set_source_slave_addr: 31, 25;
}

impl MCTPSMBusHeader<[u8; 4]> {
Expand Down Expand Up @@ -86,7 +86,7 @@
}
}

impl<'a, 'b> MCTPHeader for MCTPSMBusPacket<'a, 'b> {

Check warning on line 89 in src/smbus_proto.rs

View workflow job for this annotation

GitHub Actions / ci-check

the following explicit lifetimes could be elided: 'a, 'b
/// Return the number of bytes used by the packet.
fn len(&self) -> usize {
let mut size = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/smbus_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ mod tests {
#[test]
fn test_generate_smbus_header() {
const DEST_ID: u8 = 0x23;
const SOURCE_ID: u8 = 0x23;
const SOURCE_ID: u8 = 0x44;

let ctx = MCTPSMBusContextResponse::new(SOURCE_ID);

Expand Down
Loading