Skip to content

Makefile: update versions & FPGA: fix naked return error from linter #1477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 20, 2023
Merged
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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ BUILDTAGS ?= ""
BUILDER ?= "docker"
EXTRA_BUILD_ARGS ?= ""

CERT_MANAGER_VERSION ?= v1.12.0
CONTROLLER_GEN_VERSION ?= v0.12.0
GOLANGCI_LINT_VERSION ?= v1.52.2
CERT_MANAGER_VERSION ?= v1.12.2
CONTROLLER_GEN_VERSION ?= v0.12.1
GOLANGCI_LINT_VERSION ?= v1.53.3
KIND_VERSION ?= v0.19.0
GOLICENSES_VERSION ?= v1.6.0
# Default bundle image tag
Expand Down
10 changes: 5 additions & 5 deletions cmd/fpga_tool/fpga_tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func validateFlags(cmd, bitstream, device string, port uint) error {
func installBitstream(fname string, dryRun, force, quiet bool) (err error) {
info, err := bitstream.Open(fname)
if err != nil {
return
return err
}
defer info.Close()

Expand All @@ -129,7 +129,7 @@ func installBitstream(fname string, dryRun, force, quiet bool) (err error) {

if dryRun {
fmt.Println("Dry-run: no copying performed")
return
return nil
}
}

Expand Down Expand Up @@ -285,21 +285,21 @@ func printFpgaPort(f fpga.Port, quiet bool) (err error) {

pci, err := f.GetPCIDevice()
if err != nil {
return
return err
}

printPCIeInfo(pci, quiet)

fme, err := f.GetFME()
if err != nil {
return
return err
}

fmt.Printf("FME Name : %s\n", fme.GetName())

num, err := f.GetPortID()
if err != nil {
return
return err
}

fmt.Printf("Port Id : %d\n", num)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: acceleratorfunctions.fpga.intel.com
spec:
group: fpga.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: fpgaregions.fpga.intel.com
spec:
group: fpga.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: dlbdeviceplugins.deviceplugin.intel.com
spec:
group: deviceplugin.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: dsadeviceplugins.deviceplugin.intel.com
spec:
group: deviceplugin.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: fpgadeviceplugins.deviceplugin.intel.com
spec:
group: deviceplugin.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: gpudeviceplugins.deviceplugin.intel.com
spec:
group: deviceplugin.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: iaadeviceplugins.deviceplugin.intel.com
spec:
group: deviceplugin.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: qatdeviceplugins.deviceplugin.intel.com
spec:
group: deviceplugin.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: sgxdeviceplugins.deviceplugin.intel.com
spec:
group: deviceplugin.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: acceleratorfunctions.fpga.intel.com
spec:
group: fpga.intel.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
name: fpgaregions.fpga.intel.com
spec:
group: fpga.intel.com
Expand Down
8 changes: 4 additions & 4 deletions pkg/fpga/dfl_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (f *DflPort) GetFME() (fme FME, err error) {

pci, err := f.GetPCIDevice()
if err != nil {
return
return nil, err
}

if pci.PhysFn != nil {
Expand All @@ -417,17 +417,17 @@ func (f *DflPort) GetFME() (fme FME, err error) {
}

if err = readFilesInDirectory(fileMap, filepath.Join(pci.SysFsPath, dflFpgaFmeGlobPCI)); err != nil {
return
return nil, err
}

realDev, err := filepath.EvalSymlinks(filepath.Join("/dev/char", dev))
if err != nil {
return
return nil, err
}

fme, err = NewDflFME(realDev)
if err != nil {
return
return nil, err
}

f.FME = fme
Expand Down
8 changes: 4 additions & 4 deletions pkg/fpga/intel_fpga_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func (f *IntelFpgaPort) GetFME() (fme FME, err error) {

pci, err := f.GetPCIDevice()
if err != nil {
return
return nil, err
}

if pci.PhysFn != nil {
Expand All @@ -421,17 +421,17 @@ func (f *IntelFpgaPort) GetFME() (fme FME, err error) {
"dev": &dev,
}
if err = readFilesInDirectory(fileMap, filepath.Join(pci.SysFsPath, intelFpgaFmeGlobPCI)); err != nil {
return
return nil, err
}

realDev, err := filepath.EvalSymlinks(filepath.Join("/dev/char", dev))
if err != nil {
return
return nil, err
}

fme, err = NewIntelFpgaFME(realDev)
if err != nil {
return
return nil, err
}

f.FME = fme
Expand Down