Everywhere: Fix spelling of "offsetted"

This word is actually pretty awkward in context, but this patch merely
fixes the spelling instead of finding a better word.
This commit is contained in:
Andreas Kling 2021-11-20 17:10:57 +01:00
parent daef7e2c71
commit 9387271049
Notes: sideshowbarker 2024-07-18 00:53:58 +09:00
10 changed files with 33 additions and 33 deletions

View file

@ -131,22 +131,22 @@ void disable_bus_mastering(Address address)
write16(address, PCI::RegisterOffset::COMMAND, value);
}
static void write8_offseted(Address address, u32 field, u8 value) { Access::the().write8_field(address, field, value); }
static void write16_offseted(Address address, u32 field, u16 value) { Access::the().write16_field(address, field, value); }
static void write32_offseted(Address address, u32 field, u32 value) { Access::the().write32_field(address, field, value); }
static u8 read8_offseted(Address address, u32 field) { return Access::the().read8_field(address, field); }
static u16 read16_offseted(Address address, u32 field) { return Access::the().read16_field(address, field); }
static u32 read32_offseted(Address address, u32 field) { return Access::the().read32_field(address, field); }
static void write8_offsetted(Address address, u32 field, u8 value) { Access::the().write8_field(address, field, value); }
static void write16_offsetted(Address address, u32 field, u16 value) { Access::the().write16_field(address, field, value); }
static void write32_offsetted(Address address, u32 field, u32 value) { Access::the().write32_field(address, field, value); }
static u8 read8_offsetted(Address address, u32 field) { return Access::the().read8_field(address, field); }
static u16 read16_offsetted(Address address, u32 field) { return Access::the().read16_field(address, field); }
static u32 read32_offsetted(Address address, u32 field) { return Access::the().read32_field(address, field); }
size_t get_BAR_space_size(Address address, u8 bar_number)
{
// See PCI Spec 2.3, Page 222
VERIFY(bar_number < 6);
u8 field = to_underlying(PCI::RegisterOffset::BAR0) + (bar_number << 2);
u32 bar_reserved = read32_offseted(address, field);
write32_offseted(address, field, 0xFFFFFFFF);
u32 space_size = read32_offseted(address, field);
write32_offseted(address, field, bar_reserved);
u32 bar_reserved = read32_offsetted(address, field);
write32_offsetted(address, field, 0xFFFFFFFF);
u32 space_size = read32_offsetted(address, field);
write32_offsetted(address, field, bar_reserved);
space_size &= 0xfffffff0;
space_size = (~space_size) + 1;
return space_size;
@ -156,15 +156,15 @@ void raw_access(Address address, u32 field, size_t access_size, u32 value)
{
VERIFY(access_size != 0);
if (access_size == 1) {
write8_offseted(address, field, value);
write8_offsetted(address, field, value);
return;
}
if (access_size == 2) {
write16_offseted(address, field, value);
write16_offsetted(address, field, value);
return;
}
if (access_size == 4) {
write32_offseted(address, field, value);
write32_offsetted(address, field, value);
return;
}
VERIFY_NOT_REACHED();
@ -172,32 +172,32 @@ void raw_access(Address address, u32 field, size_t access_size, u32 value)
u8 Capability::read8(u32 field) const
{
return read8_offseted(m_address, m_ptr + field);
return read8_offsetted(m_address, m_ptr + field);
}
u16 Capability::read16(u32 field) const
{
return read16_offseted(m_address, m_ptr + field);
return read16_offsetted(m_address, m_ptr + field);
}
u32 Capability::read32(u32 field) const
{
return read32_offseted(m_address, m_ptr + field);
return read32_offsetted(m_address, m_ptr + field);
}
void Capability::write8(u32 field, u8 value)
{
write8_offseted(m_address, m_ptr + field, value);
write8_offsetted(m_address, m_ptr + field, value);
}
void Capability::write16(u32 field, u16 value)
{
write16_offseted(m_address, m_ptr + field, value);
write16_offsetted(m_address, m_ptr + field, value);
}
void Capability::write32(u32 field, u32 value)
{
write32_offseted(m_address, m_ptr + field, value);
write32_offsetted(m_address, m_ptr + field, value);
}
}

View file

@ -169,7 +169,7 @@ ErrorOr<size_t> FramebufferDevice::vertical_offset(size_t head) const
MutexLocker locker(m_buffer_offset_lock);
return m_y_offset;
}
ErrorOr<bool> FramebufferDevice::vertical_offseted(size_t head) const
ErrorOr<bool> FramebufferDevice::vertical_offsetted(size_t head) const
{
// Note: This FramebufferDevice class doesn't support multihead setup.
// We take care to verify this at the GenericFramebufferDevice::ioctl method

View file

@ -40,7 +40,7 @@ public:
virtual ErrorOr<size_t> height(size_t head) const override;
virtual ErrorOr<size_t> width(size_t head) const override;
virtual ErrorOr<size_t> vertical_offset(size_t head) const override;
virtual ErrorOr<bool> vertical_offseted(size_t head) const override;
virtual ErrorOr<bool> vertical_offsetted(size_t head) const override;
private:
virtual ErrorOr<void> set_head_resolution(size_t head, size_t width, size_t height, size_t pitch) override;

View file

@ -81,9 +81,9 @@ ErrorOr<void> GenericFramebufferDevice::ioctl(OpenFileDescription&, unsigned req
TRY(copy_from_user(&head_vertical_buffer_offset, user_head_vertical_buffer_offset));
TRY(verify_head_index(head_vertical_buffer_offset.head_index));
if (head_vertical_buffer_offset.offseted < 0 || head_vertical_buffer_offset.offseted > 1)
if (head_vertical_buffer_offset.offsetted < 0 || head_vertical_buffer_offset.offsetted > 1)
return Error::from_errno(EINVAL);
TRY(set_head_buffer(head_vertical_buffer_offset.head_index, head_vertical_buffer_offset.offseted));
TRY(set_head_buffer(head_vertical_buffer_offset.head_index, head_vertical_buffer_offset.offsetted));
return {};
}
case FB_IOCTL_GET_HEAD_VERTICAL_OFFSET_BUFFER: {
@ -92,7 +92,7 @@ ErrorOr<void> GenericFramebufferDevice::ioctl(OpenFileDescription&, unsigned req
TRY(copy_from_user(&head_vertical_buffer_offset, user_head_vertical_buffer_offset));
TRY(verify_head_index(head_vertical_buffer_offset.head_index));
head_vertical_buffer_offset.offseted = TRY(vertical_offseted(head_vertical_buffer_offset.head_index));
head_vertical_buffer_offset.offsetted = TRY(vertical_offsetted(head_vertical_buffer_offset.head_index));
return copy_to_user(user_head_vertical_buffer_offset, &head_vertical_buffer_offset);
}
case FB_IOCTL_FLUSH_HEAD_BUFFERS: {

View file

@ -51,7 +51,7 @@ protected:
virtual ErrorOr<size_t> height(size_t head) const = 0;
virtual ErrorOr<size_t> width(size_t head) const = 0;
virtual ErrorOr<size_t> vertical_offset(size_t head) const = 0;
virtual ErrorOr<bool> vertical_offseted(size_t head) const = 0;
virtual ErrorOr<bool> vertical_offsetted(size_t head) const = 0;
virtual ErrorOr<void> set_head_resolution(size_t head, size_t width, size_t height, size_t pitch) = 0;
virtual ErrorOr<void> set_head_buffer(size_t head, bool second_buffer) = 0;

View file

@ -63,7 +63,7 @@ ErrorOr<size_t> FramebufferDevice::vertical_offset(size_t head) const
VERIFY(head == 0);
return 0;
}
ErrorOr<bool> FramebufferDevice::vertical_offseted(size_t head) const
ErrorOr<bool> FramebufferDevice::vertical_offsetted(size_t head) const
{
// Note: This FramebufferDevice class doesn't support multihead setup.
// We take care to verify this at the GenericFramebufferDevice::ioctl method

View file

@ -55,7 +55,7 @@ private:
virtual ErrorOr<size_t> height(size_t head) const override;
virtual ErrorOr<size_t> width(size_t head) const override;
virtual ErrorOr<size_t> vertical_offset(size_t head) const override;
virtual ErrorOr<bool> vertical_offseted(size_t head) const override;
virtual ErrorOr<bool> vertical_offsetted(size_t head) const override;
virtual ErrorOr<void> set_head_resolution(size_t head, size_t width, size_t height, size_t pitch) override;
virtual ErrorOr<void> set_head_buffer(size_t head, bool second_buffer) override;

View file

@ -45,7 +45,7 @@ struct FBHeadResolution {
struct FBHeadVerticalOffset {
int head_index;
int offseted;
int offsetted;
};
struct FBRect {

View file

@ -121,10 +121,10 @@ constexpr unsigned encoded_device(unsigned major, unsigned minor)
inline char offset_character_with_number(char base_char, u8 offset)
{
char offseted_char = base_char;
VERIFY(static_cast<size_t>(offseted_char) + static_cast<size_t>(offset) < 256);
offseted_char += offset;
return offseted_char;
char offsetted_char = base_char;
VERIFY(static_cast<size_t>(offsetted_char) + static_cast<size_t>(offset) < 256);
offsetted_char += offset;
return offsetted_char;
}
static void create_devfs_block_device(String name, mode_t mode, unsigned major, unsigned minor)

View file

@ -395,7 +395,7 @@ void Screen::set_buffer(int index)
FBHeadVerticalOffset offset;
memset(&offset, 0, sizeof(FBHeadVerticalOffset));
if (index == 1)
offset.offseted = 1;
offset.offsetted = 1;
int rc = fb_set_head_vertical_offset_buffer(m_framebuffer_fd, &offset);
VERIFY(rc == 0);
}