mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
Kernel/AHCI: Fix shift of 1
This makes the 1 in the shift unsigned. This also changes the is_set_at parameter to be a u8.
This commit is contained in:
parent
f17b4e561f
commit
e9b7d58d10
1 changed files with 4 additions and 4 deletions
|
@ -144,8 +144,8 @@ public:
|
|||
|
||||
void set_at(u8 index) const
|
||||
{
|
||||
VERIFY(((1 << index) & m_bit_mask) != 0);
|
||||
m_bitfield = m_bitfield | ((1 << index) & m_bit_mask);
|
||||
VERIFY(((1u << index) & m_bit_mask) != 0);
|
||||
m_bitfield = m_bitfield | ((1u << index) & m_bit_mask);
|
||||
}
|
||||
|
||||
void set_all() const
|
||||
|
@ -153,9 +153,9 @@ public:
|
|||
m_bitfield = m_bitfield | (0xffffffff & m_bit_mask);
|
||||
}
|
||||
|
||||
bool is_set_at(u32 port_index) const
|
||||
bool is_set_at(u8 port_index) const
|
||||
{
|
||||
return m_bitfield & ((1 << port_index) & m_bit_mask);
|
||||
return m_bitfield & ((1u << port_index) & m_bit_mask);
|
||||
}
|
||||
|
||||
bool is_zeroed() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue