Skip to content

Commit 47febd5

Browse files
committed
make linter happy
1 parent 9769357 commit 47febd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/epp/scheduling/plugins/prefix/plugin.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (m *Plugin) PostSchedule(ctx *types.SchedulingContext, res *types.Result) {
130130
func (m *Plugin) Score(ctx *types.SchedulingContext, pods []types.Pod) map[types.Pod]float64 {
131131
state := ctx.GetPluginState(types.PluginName(m.Name())).(SchedulingContextState)
132132
total := len(state.PrefixHashes)
133-
podScoreFunc := func(ctx *types.SchedulingContext, pod types.Pod) float64 {
133+
podScoreFunc := func(pod types.Pod) float64 {
134134
if total == 0 {
135135
return 0
136136
}
@@ -140,7 +140,7 @@ func (m *Plugin) Score(ctx *types.SchedulingContext, pods []types.Pod) map[types
140140

141141
scores := make(map[types.Pod]float64, len(pods))
142142
for _, pod := range pods {
143-
scores[pod] = podScoreFunc(ctx, pod)
143+
scores[pod] = podScoreFunc(pod)
144144
}
145145
return scores
146146
}
@@ -191,8 +191,8 @@ func hashPrompt(ctx *types.SchedulingContext, cacheBlockSize int, maxPrefixBlock
191191
for i := 0; i+cacheBlockSize <= len(prompt); i += cacheBlockSize {
192192
block := prompt[i : i+cacheBlockSize]
193193
prevBlockHash := res[len(res)-1]
194-
toHash := append(block, toBytes(prevBlockHash)...)
195-
res = append(res, BlockHash(xxhash.Sum64(toHash)))
194+
block = append(block, toBytes(prevBlockHash)...)
195+
res = append(res, BlockHash(xxhash.Sum64(block)))
196196
}
197197
return res
198198
}

0 commit comments

Comments
 (0)