From 02f684079cd8305bd016e38221e0551ca82a11aa Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 13 Mar 2022 21:11:07 -0700 Subject: [PATCH] Kernel: Rename locker variables in BMIDEChannel so they aren't shadowed This class already has variables named m_lock, and it's also strange that locals are named with the `m_` prefix. So lets fix that to make the code more readable. Found by PVS-Studio. --- Kernel/Storage/ATA/BMIDEChannel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Storage/ATA/BMIDEChannel.cpp b/Kernel/Storage/ATA/BMIDEChannel.cpp index 1612f3bc8d..b87b9c8854 100644 --- a/Kernel/Storage/ATA/BMIDEChannel.cpp +++ b/Kernel/Storage/ATA/BMIDEChannel.cpp @@ -153,7 +153,7 @@ void BMIDEChannel::ata_write_sectors(bool slave_request, u16 capabilities) VERIFY(!m_current_request.is_null()); VERIFY(m_current_request->block_count() <= 256); - SpinlockLocker m_lock(m_request_lock); + SpinlockLocker locker(m_request_lock); dbgln_if(PATA_DEBUG, "BMIDEChannel::ata_write_sectors ({} x {})", m_current_request->block_index(), m_current_request->block_count()); prdt().offset = m_dma_buffer_page->paddr().get(); @@ -201,7 +201,7 @@ void BMIDEChannel::ata_read_sectors(bool slave_request, u16 capabilities) VERIFY(!m_current_request.is_null()); VERIFY(m_current_request->block_count() <= 256); - SpinlockLocker m_lock(m_request_lock); + SpinlockLocker locker(m_request_lock); dbgln_if(PATA_DEBUG, "BMIDEChannel::ata_read_sectors ({} x {})", m_current_request->block_index(), m_current_request->block_count()); // Note: This is a fix for a quirk for an IDE controller on ICH7 machine.