Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ CMDS := $(shell ls cmd)

Q := @

.PHONY: generate
generate:
$(GO_CMD) generate ./pkg/sst/...

.PHONY: all
all: test build

Expand Down
4 changes: 2 additions & 2 deletions cmd/sst-ctl/cmd_bf.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func enableBF(pkgId ...int) error {
fmt.Printf("Enabling BF for package(s) %v\n", pkgId)
}

if err := sst.EnableBF(pkgId...); err != nil {
if err := sst.EnableBF(pkgId...); err != nil { //nolint:staticcheck // deprecated
return err
}

Expand All @@ -45,7 +45,7 @@ func disableBF(pkgId ...int) error {
fmt.Printf("Disabling BF for package(s) %v\n", pkgId)
}

if err := sst.DisableBF(pkgId...); err != nil {
if err := sst.DisableBF(pkgId...); err != nil { //nolint:staticcheck // deprecated
return err
}

Expand Down
32 changes: 16 additions & 16 deletions cmd/sst-ctl/cmd_cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func subCmdCP(args []string) error {

var packageId int
var pkgs []int
var info *sst.SstPackageInfo
var infomap map[int]*sst.SstPackageInfo
var info *sst.SstPackageInfo //nolint:staticcheck // deprecated
var infomap map[int]*sst.SstPackageInfo //nolint:staticcheck // deprecated
var err error
var priority int

Expand Down Expand Up @@ -80,7 +80,7 @@ func subCmdCP(args []string) error {
}

if reset {
err := sst.ResetCPConfig()
err := sst.ResetCPConfig() //nolint:staticcheck // deprecated
_ = printPackageInfo()
return err
}
Expand Down Expand Up @@ -116,10 +116,10 @@ func subCmdCP(args []string) error {
return fmt.Errorf("CLOS not set, use -clos option")
}

cpu2Clos := make(sst.ClosCPUSet, 1)
cpu2Clos := make(sst.ClosCPUSet, 1) //nolint:staticcheck // deprecated
cpu2Clos[clos] = cpus

if err := sst.ConfigureCP(info, priority, &cpu2Clos); err != nil {
if err := sst.ConfigureCP(info, priority, &cpu2Clos); err != nil { //nolint:staticcheck // deprecated
return err
}

Expand All @@ -132,21 +132,21 @@ func subCmdCP(args []string) error {
return fmt.Errorf("no packages set, invalid value %q", packageIds)
}

closinfo := sst.SstClosInfo{
closinfo := sst.SstClosInfo{ //nolint:staticcheck // deprecated
EPP: epp,
ProportionalPriority: proportionalPriority,
MinFreq: minFreq,
MaxFreq: maxFreq,
DesiredFreq: desiredFreq,
}

infomap, err = sst.GetPackageInfo(pkgs...)
infomap, err = sst.GetPackageInfo(pkgs...) //nolint:staticcheck // deprecated
if err != nil {
return fmt.Errorf("cannot get package info: %w", err)
}

for _, info = range infomap {
if err := sst.ClosSetup(info, clos, &closinfo); err != nil {
if err := sst.ClosSetup(info, clos, &closinfo); err != nil { //nolint:staticcheck // deprecated
return fmt.Errorf("cannot set Clos: %w", err)
}
}
Expand All @@ -160,7 +160,7 @@ func subCmdCP(args []string) error {
if err != nil {
return err
}
infomap, err = sst.GetPackageInfo(pkgs...)
infomap, err = sst.GetPackageInfo(pkgs...) //nolint:staticcheck // deprecated
if err != nil {
return fmt.Errorf("cannot get package info: %w", err)
}
Expand All @@ -171,14 +171,14 @@ func subCmdCP(args []string) error {
if enable {
fmt.Printf("enabling CP for package %d\n", packageId)

err = sst.EnableCP(info)
err = sst.EnableCP(info) //nolint:staticcheck // deprecated
if err != nil {
return err
}
} else if disable {
fmt.Printf("disabling CP for package %d\n", packageId)

err = sst.DisableCP(info)
err = sst.DisableCP(info) //nolint:staticcheck // deprecated
if err != nil {
return err
}
Expand All @@ -195,9 +195,9 @@ func subCmdCP(args []string) error {
return nil
}

func getPackage(packageStr string, cpus utils.IDSet) (map[int]*sst.SstPackageInfo, *sst.SstPackageInfo, []int, error) {
var infomap map[int]*sst.SstPackageInfo
var info *sst.SstPackageInfo
func getPackage(packageStr string, cpus utils.IDSet) (map[int]*sst.SstPackageInfo, *sst.SstPackageInfo, []int, error) { //nolint:staticcheck // deprecated
var infomap map[int]*sst.SstPackageInfo //nolint:staticcheck // deprecated
var info *sst.SstPackageInfo //nolint:staticcheck // deprecated
var packageId int
var err error

Expand All @@ -214,7 +214,7 @@ func getPackage(packageStr string, cpus utils.IDSet) (map[int]*sst.SstPackageInf
if len(pkgs) == 0 {
// User has not specified a package, figure it out from the
// first CPU in the list.
infomap, err = sst.GetPackageInfo()
infomap, err = sst.GetPackageInfo() //nolint:staticcheck // deprecated
if err != nil {
return nil, nil, nil, err
}
Expand All @@ -227,7 +227,7 @@ func getPackage(packageStr string, cpus utils.IDSet) (map[int]*sst.SstPackageInf
}
} else {
// User has specified one package, make sure all the CPUs belong to it.
infomap, err = sst.GetPackageInfo(pkgs...)
infomap, err = sst.GetPackageInfo(pkgs...) //nolint:staticcheck // deprecated
if err != nil {
return nil, nil, nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/sst-ctl/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

func printPackageInfo(pkgId ...int) error {
info, err := sst.GetPackageInfo(pkgId...)
info, err := sst.GetPackageInfo(pkgId...) //nolint:staticcheck // deprecated
if err != nil {
return err
}
Expand Down
Loading