Merge pull request #89581 from Wenfeng-GAO/simplify

simplify code in topologymanager
This commit is contained in:
Kubernetes Prow Robot
2020-04-02 23:07:46 -07:00
committed by GitHub
2 changed files with 2 additions and 8 deletions

View File

@@ -35,10 +35,7 @@ func (p *restrictedPolicy) Name() string {
}
func (p *restrictedPolicy) canAdmitPodResult(hint *TopologyHint) bool {
if !hint.Preferred {
return false
}
return true
return hint.Preferred
}
func (p *restrictedPolicy) Merge(providersHints []map[string][]TopologyHint) (TopologyHint, bool) {

View File

@@ -40,10 +40,7 @@ func (p *singleNumaNodePolicy) Name() string {
}
func (p *singleNumaNodePolicy) canAdmitPodResult(hint *TopologyHint) bool {
if !hint.Preferred {
return false
}
return true
return hint.Preferred
}
// Return hints that have valid bitmasks with exactly one bit set.