Remove unnecessary #[inline] attributes

This commit is contained in:
stuuupidcat 2025-05-20 16:13:24 +00:00 committed by Tate, Hongliang Tian
parent e81053b9dc
commit 95744692a5
6 changed files with 0 additions and 9 deletions

View File

@ -421,7 +421,6 @@ pub struct Descriptor {
type DescriptorPtr<'a> = SafePtr<Descriptor, &'a DmaCoherent, TRightSet<TRights![Dup, Write]>>; type DescriptorPtr<'a> = SafePtr<Descriptor, &'a DmaCoherent, TRightSet<TRights![Dup, Write]>>;
#[inline]
fn set_dma_buf<T: DmaBuf>(desc_ptr: &DescriptorPtr, buf: &T) { fn set_dma_buf<T: DmaBuf>(desc_ptr: &DescriptorPtr, buf: &T) {
// TODO: skip the empty dma buffer or just return error? // TODO: skip the empty dma buffer or just return error?
debug_assert_ne!(buf.len(), 0); debug_assert_ne!(buf.len(), 0);

View File

@ -410,7 +410,6 @@ impl Ext2 {
Ok(()) Ok(())
} }
#[inline]
fn block_group_of_bid(&self, bid: Ext2Bid) -> Result<(usize, &BlockGroup)> { fn block_group_of_bid(&self, bid: Ext2Bid) -> Result<(usize, &BlockGroup)> {
let block_group_idx = (bid / self.blocks_per_group) as usize; let block_group_idx = (bid / self.blocks_per_group) as usize;
if block_group_idx >= self.block_groups.len() { if block_group_idx >= self.block_groups.len() {
@ -419,7 +418,6 @@ impl Ext2 {
Ok((block_group_idx, &self.block_groups[block_group_idx])) Ok((block_group_idx, &self.block_groups[block_group_idx]))
} }
#[inline]
fn block_group_of_ino(&self, ino: u32) -> Result<(usize, &BlockGroup)> { fn block_group_of_ino(&self, ino: u32) -> Result<(usize, &BlockGroup)> {
let block_group_idx = ((ino - 1) / self.inodes_per_group) as usize; let block_group_idx = ((ino - 1) / self.inodes_per_group) as usize;
if block_group_idx >= self.block_groups.len() { if block_group_idx >= self.block_groups.len() {
@ -428,12 +426,10 @@ impl Ext2 {
Ok((block_group_idx, &self.block_groups[block_group_idx])) Ok((block_group_idx, &self.block_groups[block_group_idx]))
} }
#[inline]
fn inode_idx(&self, ino: u32) -> u32 { fn inode_idx(&self, ino: u32) -> u32 {
(ino - 1) % self.inodes_per_group (ino - 1) % self.inodes_per_group
} }
#[inline]
fn block_idx(&self, bid: Ext2Bid) -> Ext2Bid { fn block_idx(&self, bid: Ext2Bid) -> Ext2Bid {
bid % self.blocks_per_group bid % self.blocks_per_group
} }

View File

@ -128,7 +128,6 @@ impl IndirectBlockCache {
Ok(()) Ok(())
} }
#[inline]
fn fs(&self) -> Arc<Ext2> { fn fs(&self) -> Arc<Ext2> {
self.fs.upgrade().unwrap() self.fs.upgrade().unwrap()
} }

View File

@ -2196,7 +2196,6 @@ impl InodeDesc {
blocks blocks
} }
#[inline]
fn size_to_blocks(&self, size: usize) -> Ext2Bid { fn size_to_blocks(&self, size: usize) -> Ext2Bid {
if self.type_ == InodeType::SymLink && size <= MAX_FAST_SYMLINK_LEN { if self.type_ == InodeType::SymLink && size <= MAX_FAST_SYMLINK_LEN {
return 0; return 0;

View File

@ -112,7 +112,6 @@ pub fn set_mask(master_mask: u8, slave_mask: u8) {
SLAVE_DATA.write(slave_mask); SLAVE_DATA.write(slave_mask);
} }
#[inline(always)]
pub(crate) fn ack() { pub(crate) fn ack() {
MASTER_CMD.write(0x20); MASTER_CMD.write(0x20);
} }

View File

@ -70,7 +70,6 @@ impl CapabilityVndrData {
Ok(()) Ok(())
} }
#[inline]
fn check_range(&self, offset: u16) -> Result<()> { fn check_range(&self, offset: u16) -> Result<()> {
if self.length < offset { if self.length < offset {
return Err(Error::InvalidArgs); return Err(Error::InvalidArgs);