Skip to content

Commit 9bb5f30

Browse files
authored
Merge pull request intel#1048 from bart0sh/PR142-get-rid-of-sysfsDir
Get rid of unused sysfsDir parameter
2 parents 89c9dcf + 9d04ce8 commit 9bb5f30

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

cmd/dsa_plugin/dsa_plugin.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import (
2727
const (
2828
// Device plugin settings.
2929
namespace = "dsa.intel.com"
30-
// SysFS directory.
31-
sysfsDir = "/sys/bus/dsa/devices"
3230
// Device directories.
3331
devDir = "/dev/dsa"
3432
// Glob pattern for the state sysfs entry.
@@ -46,7 +44,7 @@ func main() {
4644
os.Exit(1)
4745
}
4846

49-
plugin := idxd.NewDevicePlugin(sysfsDir, statePattern, devDir, sharedDevNum)
47+
plugin := idxd.NewDevicePlugin(statePattern, devDir, sharedDevNum)
5048
if plugin == nil {
5149
klog.Fatal("Cannot create device plugin, please check above error messages.")
5250
}

cmd/iaa_plugin/iaa_plugin.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import (
2727
const (
2828
// Device plugin settings.
2929
namespace = "iaa.intel.com"
30-
// SysFS directory.
31-
sysfsDir = "/sys/bus/iax/devices"
3230
// Device directories.
3331
devDir = "/dev/iax"
3432
// Glob pattern for the state sysfs entry.
@@ -46,7 +44,7 @@ func main() {
4644
os.Exit(1)
4745
}
4846

49-
plugin := idxd.NewDevicePlugin(sysfsDir, statePattern, devDir, sharedDevNum)
47+
plugin := idxd.NewDevicePlugin(statePattern, devDir, sharedDevNum)
5048
if plugin == nil {
5149
klog.Fatal("Cannot create device plugin, please check above error messages.")
5250
}

pkg/idxd/plugin.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,15 @@ type DevicePlugin struct {
4545
scanTicker *time.Ticker
4646
scanDone chan bool
4747
getDevNodes getDevNodesFunc
48-
sysfsDir string
4948
statePattern string
5049
devDir string
5150
charDevDir string
5251
sharedDevNum int
5352
}
5453

5554
// NewDevicePlugin creates DevicePlugin.
56-
func NewDevicePlugin(sysfsDir, statePattern, devDir string, sharedDevNum int) *DevicePlugin {
55+
func NewDevicePlugin(statePattern, devDir string, sharedDevNum int) *DevicePlugin {
5756
return &DevicePlugin{
58-
sysfsDir: sysfsDir,
5957
statePattern: statePattern,
6058
devDir: devDir,
6159
charDevDir: charDevDir,

pkg/idxd/plugin_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func genTest(sysfs, statePattern string, tc testCase) func(t *testing.T) {
220220
}
221221
}
222222

223-
plugin := NewDevicePlugin(sysfs, statePattern, "", tc.sharedDevNum)
223+
plugin := NewDevicePlugin(statePattern, "", tc.sharedDevNum)
224224
plugin.getDevNodes = getFakeDevNodes
225225

226226
notifier := &fakeNotifier{

0 commit comments

Comments
 (0)