diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-12 14:08:41 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-12 15:22:35 +0100 |
commit | f432f104fcc22f03989895bcdb842a609b4706da (patch) | |
tree | 073695edeede620394fc214a6c5e420474dbd424 | |
parent | 18e1d246b7ab7e81ac257c8bc03aafc26163aeb2 (diff) | |
download | serenity-f432f104fcc22f03989895bcdb842a609b4706da.zip |
Kernel: Convert klog() => AK::Format in SB16
-rw-r--r-- | Kernel/Devices/SB16.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Kernel/Devices/SB16.cpp b/Kernel/Devices/SB16.cpp index 2110e1aa2b..64457c17e4 100644 --- a/Kernel/Devices/SB16.cpp +++ b/Kernel/Devices/SB16.cpp @@ -122,7 +122,7 @@ UNMAP_AFTER_INIT void SB16::initialize() auto data = dsp_read(); if (data != 0xaa) { - klog() << "SB16: sb not ready"; + dbgln("SB16: SoundBlaster not ready"); return; } @@ -131,9 +131,9 @@ UNMAP_AFTER_INIT void SB16::initialize() m_major_version = dsp_read(); auto vmin = dsp_read(); - klog() << "SB16: found version " << m_major_version << "." << vmin; + dmesgln("SB16: Found version {}.{}", m_major_version, vmin); set_irq_register(SB16_DEFAULT_IRQ); - klog() << "SB16: IRQ " << get_irq_line(); + dmesgln("SB16: IRQ {}", get_irq_line()); } void SB16::set_irq_register(u8 irq_number) @@ -255,9 +255,8 @@ KResultOr<size_t> SB16::write(FileDescription&, size_t, const UserOrKernelBuffer return ENOMEM; } -#if SB16_DEBUG - klog() << "SB16: Writing buffer of " << length << " bytes"; -#endif + dbgln_if(SB16_DEBUG, "SB16: Writing buffer of {} bytes", length); + VERIFY(length <= PAGE_SIZE); const int BLOCK_SIZE = 32 * 1024; if (length > BLOCK_SIZE) { |