code cleanup

This commit is contained in:
alu
2026-08-06 09:21:49 -07:00
parent aa114e4f73
commit 0998633e5c
3 changed files with 20 additions and 38 deletions
+2 -1
View File
@@ -53,6 +53,7 @@ func (r *SysDriver) ReadClockSensors() ([]ClockSensor, error) {
clockSensors = append(clockSensors, ClockSensor{
path: path,
number: coreID,
Name: fmt.Sprintf("core %d", coreID),
FrequencyGHz: khz / 1000000.0, // Convert KHz to GHz
})
@@ -60,7 +61,7 @@ func (r *SysDriver) ReadClockSensors() ([]ClockSensor, error) {
// Guarantee numerical order by core ID
sort.Slice(clockSensors, func(i, j int) bool {
return clockSensors[i].Name < clockSensors[j].Name
return clockSensors[i].number < clockSensors[j].number
})
return clockSensors, nil