summaryrefslogtreecommitdiff
path: root/Kernel/Bus
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-01-12 23:57:45 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-01-13 00:20:08 -0800
commit618f1234636bb668b0eab39b9ec7d88660c1cca1 (patch)
tree156a2a5abed9a7a5589e307575147298fcf78a91 /Kernel/Bus
parent792b8ca13ca13e6ea5dfa51280ce5c83164fd656 (diff)
downloadserenity-618f1234636bb668b0eab39b9ec7d88660c1cca1.zip
Kernel: Use StringView instead of String in RingBuffer's constructor
This String was being copied into a KString internally anyways.
Diffstat (limited to 'Kernel/Bus')
-rw-r--r--Kernel/Bus/VirtIO/Console.cpp4
-rw-r--r--Kernel/Bus/VirtIO/ConsolePort.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Bus/VirtIO/Console.cpp b/Kernel/Bus/VirtIO/Console.cpp
index 9c291a0581..de4f2779bc 100644
--- a/Kernel/Bus/VirtIO/Console.cpp
+++ b/Kernel/Bus/VirtIO/Console.cpp
@@ -123,8 +123,8 @@ void Console::handle_queue_update(u16 queue_index)
void Console::setup_multiport()
{
- m_control_receive_buffer = make<Memory::RingBuffer>("VirtIOConsole control receive queue", CONTROL_BUFFER_SIZE);
- m_control_transmit_buffer = make<Memory::RingBuffer>("VirtIOConsole control transmit queue", CONTROL_BUFFER_SIZE);
+ m_control_receive_buffer = make<Memory::RingBuffer>("VirtIOConsole control receive queue"sv, CONTROL_BUFFER_SIZE);
+ m_control_transmit_buffer = make<Memory::RingBuffer>("VirtIOConsole control transmit queue"sv, CONTROL_BUFFER_SIZE);
auto& queue = get_queue(CONTROL_RECEIVEQ);
SpinlockLocker queue_lock(queue.lock());
diff --git a/Kernel/Bus/VirtIO/ConsolePort.cpp b/Kernel/Bus/VirtIO/ConsolePort.cpp
index 7e3bd0792a..78149e2380 100644
--- a/Kernel/Bus/VirtIO/ConsolePort.cpp
+++ b/Kernel/Bus/VirtIO/ConsolePort.cpp
@@ -17,8 +17,8 @@ ConsolePort::ConsolePort(unsigned port, VirtIO::Console& console)
, m_console(console)
, m_port(port)
{
- m_receive_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Receive", RINGBUFFER_SIZE);
- m_transmit_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Transmit", RINGBUFFER_SIZE);
+ m_receive_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Receive"sv, RINGBUFFER_SIZE);
+ m_transmit_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Transmit"sv, RINGBUFFER_SIZE);
m_receive_queue = m_port == 0 ? 0 : m_port * 2 + 2;
m_transmit_queue = m_port == 0 ? 1 : m_port * 2 + 3;
}