Skip to content

Commit

Permalink
oem/smc: address linter
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Vandermeulen <[email protected]>
  • Loading branch information
Matt1360 committed Oct 15, 2024
1 parent 0e46b21 commit f776189
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions oem/smc/drive.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ func FromDrive(drive *redfish.Drive) (Drive, error) {
// in the Oem sections - certain models and bmc firmwares will mix
// these up, so we check both
smcDrive.indicateTarget = t.Actions.Oem.DriveIndicate.Target
if len(t.Actions.Oem.SmcDriveIndicate.Target) > 0 {
if t.Actions.Oem.SmcDriveIndicate.Target != "" {
smcDrive.indicateTarget = t.Actions.Oem.SmcDriveIndicate.Target
}

return smcDrive, nil
}

// Indicate will set the indicator light activity, true for on, false for off
func (d Drive) Indicate(active bool) error {
func (d *Drive) Indicate(active bool) error {
// Return a common error to let the user try falling back on the normal gofish path
if d.indicateTarget == "" {
return ErrActionNotSupported
Expand Down
2 changes: 1 addition & 1 deletion oem/smc/drive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestSmcDriveOem(t *testing.T) {
}

if smcDrive.Temperature != 33 {
t.Errorf("unexpected oem drive temerature: %d", smcDrive.Temperature)
t.Errorf("unexpected oem drive temperature: %d", smcDrive.Temperature)
}

if smcDrive.indicateTarget != "/redfish/v1/Chassis/NVMeSSD.0.Group.0.StorageBackplane/Drives/Disk.Bay.22/Actions/Oem/Drive.Indicate" {
Expand Down

0 comments on commit f776189

Please sign in to comment.