mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +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
Notes:
sideshowbarker
2024-07-18 11:32:58 +09:00
Author: https://github.com/ElectrodeYT Commit: https://github.com/SerenityOS/serenity/commit/e9b7d58d105 Pull-request: https://github.com/SerenityOS/serenity/pull/8244 Reviewed-by: https://github.com/IdanHo
|
@ -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…
Reference in a new issue