mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-06 12:06:49 +00:00
dragonball: Fix clippy repr_packed_without_abi
Fix `repr_packed_without_abi` clippy warning as suggested by rust 1.85.1. ```console error: item uses `packed` representation without ABI-qualification --> dbs_pci/src/msi.rs:468:1 | 466 | #[repr(packed)] | ------ `packed` representation set here 467 | #[derive(Clone, Copy, Default, PartialEq)] 468 | / pub struct MsiState { 469 | | msg_ctl: u16, 470 | | msg_addr_lo: u32, 471 | | msg_addr_hi: u32, 472 | | msg_data: u16, 473 | | mask_bits: u32, 474 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi = note: `-D clippy::repr-packed-without-abi` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::repr_packed_without_abi)]` ``` Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
parent
e8be3c13fb
commit
1bbedb8def
@ -5,7 +5,7 @@
|
||||
// RSDP (Root System Description Pointer) is a data structure used in the ACPI programming interface.
|
||||
use vm_memory::ByteValued;
|
||||
|
||||
#[repr(packed)]
|
||||
#[repr(Rust, packed)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
pub struct Rsdp {
|
||||
pub signature: [u8; 8],
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Copyright (c) 2023 Alibaba Cloud
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#[repr(packed)]
|
||||
#[repr(Rust, packed)]
|
||||
pub struct GenericAddress {
|
||||
pub address_space_id: u8,
|
||||
pub register_bit_width: u8,
|
||||
|
@ -463,7 +463,7 @@ impl PciCapability for MsiCap {
|
||||
}
|
||||
|
||||
/// Struct to manage PCI Message Signalled Interrupt controller working state.
|
||||
#[repr(packed)]
|
||||
#[repr(Rust, packed)]
|
||||
#[derive(Clone, Copy, Default, PartialEq)]
|
||||
pub struct MsiState {
|
||||
msg_ctl: u16,
|
||||
|
@ -32,7 +32,7 @@ pub const MSIX_TABLE_ENTRIES_MODULO: u64 = 16;
|
||||
/// This struct is the shadow copy of the PCI MSI-x capability. Guest device drivers read from/write
|
||||
/// to this struct. There's another struct MsixState, which maintains the working state about the
|
||||
/// PCI MSI-x controller.
|
||||
#[repr(packed)]
|
||||
#[repr(Rust, packed)]
|
||||
#[derive(Clone, Copy, Default, PartialEq)]
|
||||
pub struct MsixCap {
|
||||
// Capability ID
|
||||
|
Loading…
Reference in New Issue
Block a user