소스 검색

Kernel: Make a helper in the Intel graphics driver return StringView

Andreas Kling 3 년 전
부모
커밋
07599b48de
1개의 변경된 파일25개의 추가작업 그리고 25개의 파일을 삭제
  1. 25 25
      Kernel/Graphics/Intel/NativeGraphicsAdapter.cpp

+ 25 - 25
Kernel/Graphics/Intel/NativeGraphicsAdapter.cpp

@@ -217,57 +217,57 @@ void IntelNativeGraphicsAdapter::enable_vga_plane()
     VERIFY(m_modeset_lock.is_locked());
 }
 
-[[maybe_unused]] static inline const char* convert_register_index_to_string(IntelGraphics::RegisterIndex index)
+[[maybe_unused]] static StringView convert_register_index_to_string(IntelGraphics::RegisterIndex index)
 {
     switch (index) {
     case IntelGraphics::RegisterIndex::PipeAConf:
-        return "PipeAConf";
+        return "PipeAConf"sv;
     case IntelGraphics::RegisterIndex::PipeBConf:
-        return "PipeBConf";
+        return "PipeBConf"sv;
     case IntelGraphics::RegisterIndex::GMBusData:
-        return "GMBusData";
+        return "GMBusData"sv;
     case IntelGraphics::RegisterIndex::GMBusStatus:
-        return "GMBusStatus";
+        return "GMBusStatus"sv;
     case IntelGraphics::RegisterIndex::GMBusCommand:
-        return "GMBusCommand";
+        return "GMBusCommand"sv;
     case IntelGraphics::RegisterIndex::GMBusClock:
-        return "GMBusClock";
+        return "GMBusClock"sv;
     case IntelGraphics::RegisterIndex::DisplayPlaneAControl:
-        return "DisplayPlaneAControl";
+        return "DisplayPlaneAControl"sv;
     case IntelGraphics::RegisterIndex::DisplayPlaneALinearOffset:
-        return "DisplayPlaneALinearOffset";
+        return "DisplayPlaneALinearOffset"sv;
     case IntelGraphics::RegisterIndex::DisplayPlaneAStride:
-        return "DisplayPlaneAStride";
+        return "DisplayPlaneAStride"sv;
     case IntelGraphics::RegisterIndex::DisplayPlaneASurface:
-        return "DisplayPlaneASurface";
+        return "DisplayPlaneASurface"sv;
     case IntelGraphics::RegisterIndex::DPLLDivisorA0:
-        return "DPLLDivisorA0";
+        return "DPLLDivisorA0"sv;
     case IntelGraphics::RegisterIndex::DPLLDivisorA1:
-        return "DPLLDivisorA1";
+        return "DPLLDivisorA1"sv;
     case IntelGraphics::RegisterIndex::DPLLControlA:
-        return "DPLLControlA";
+        return "DPLLControlA"sv;
     case IntelGraphics::RegisterIndex::DPLLControlB:
-        return "DPLLControlB";
+        return "DPLLControlB"sv;
     case IntelGraphics::RegisterIndex::DPLLMultiplierA:
-        return "DPLLMultiplierA";
+        return "DPLLMultiplierA"sv;
     case IntelGraphics::RegisterIndex::HTotalA:
-        return "HTotalA";
+        return "HTotalA"sv;
     case IntelGraphics::RegisterIndex::HBlankA:
-        return "HBlankA";
+        return "HBlankA"sv;
     case IntelGraphics::RegisterIndex::HSyncA:
-        return "HSyncA";
+        return "HSyncA"sv;
     case IntelGraphics::RegisterIndex::VTotalA:
-        return "VTotalA";
+        return "VTotalA"sv;
     case IntelGraphics::RegisterIndex::VBlankA:
-        return "VBlankA";
+        return "VBlankA"sv;
     case IntelGraphics::RegisterIndex::VSyncA:
-        return "VSyncA";
+        return "VSyncA"sv;
     case IntelGraphics::RegisterIndex::PipeASource:
-        return "PipeASource";
+        return "PipeASource"sv;
     case IntelGraphics::RegisterIndex::AnalogDisplayPort:
-        return "AnalogDisplayPort";
+        return "AnalogDisplayPort"sv;
     case IntelGraphics::RegisterIndex::VGADisplayPlaneControl:
-        return "VGADisplayPlaneControl";
+        return "VGADisplayPlaneControl"sv;
     default:
         VERIFY_NOT_REACHED();
     }