mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-08 12:56:48 +00:00
Remove unnecessary #[inline] attributes
This commit is contained in:
parent
e81053b9dc
commit
95744692a5
@ -421,7 +421,6 @@ pub struct Descriptor {
|
||||
|
||||
type DescriptorPtr<'a> = SafePtr<Descriptor, &'a DmaCoherent, TRightSet<TRights![Dup, Write]>>;
|
||||
|
||||
#[inline]
|
||||
fn set_dma_buf<T: DmaBuf>(desc_ptr: &DescriptorPtr, buf: &T) {
|
||||
// TODO: skip the empty dma buffer or just return error?
|
||||
debug_assert_ne!(buf.len(), 0);
|
||||
|
@ -410,7 +410,6 @@ impl Ext2 {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn block_group_of_bid(&self, bid: Ext2Bid) -> Result<(usize, &BlockGroup)> {
|
||||
let block_group_idx = (bid / self.blocks_per_group) as usize;
|
||||
if block_group_idx >= self.block_groups.len() {
|
||||
@ -419,7 +418,6 @@ impl Ext2 {
|
||||
Ok((block_group_idx, &self.block_groups[block_group_idx]))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn block_group_of_ino(&self, ino: u32) -> Result<(usize, &BlockGroup)> {
|
||||
let block_group_idx = ((ino - 1) / self.inodes_per_group) as usize;
|
||||
if block_group_idx >= self.block_groups.len() {
|
||||
@ -428,12 +426,10 @@ impl Ext2 {
|
||||
Ok((block_group_idx, &self.block_groups[block_group_idx]))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn inode_idx(&self, ino: u32) -> u32 {
|
||||
(ino - 1) % self.inodes_per_group
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn block_idx(&self, bid: Ext2Bid) -> Ext2Bid {
|
||||
bid % self.blocks_per_group
|
||||
}
|
||||
|
@ -128,7 +128,6 @@ impl IndirectBlockCache {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn fs(&self) -> Arc<Ext2> {
|
||||
self.fs.upgrade().unwrap()
|
||||
}
|
||||
|
@ -2196,7 +2196,6 @@ impl InodeDesc {
|
||||
blocks
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn size_to_blocks(&self, size: usize) -> Ext2Bid {
|
||||
if self.type_ == InodeType::SymLink && size <= MAX_FAST_SYMLINK_LEN {
|
||||
return 0;
|
||||
|
@ -112,7 +112,6 @@ pub fn set_mask(master_mask: u8, slave_mask: u8) {
|
||||
SLAVE_DATA.write(slave_mask);
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub(crate) fn ack() {
|
||||
MASTER_CMD.write(0x20);
|
||||
}
|
||||
|
@ -70,7 +70,6 @@ impl CapabilityVndrData {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn check_range(&self, offset: u16) -> Result<()> {
|
||||
if self.length < offset {
|
||||
return Err(Error::InvalidArgs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user