Merge branch 'tools-ynl-gen-fix-glitches-found-by-chuck'
Jakub Kicinski says: ==================== tools: ynl-gen: fix glitches found by Chuck A handful of fixes Chuck run into while trying to define the family for crypto handshakes. ==================== Link: https://lore.kernel.org/r/20230223183141.1422857-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
766d1bdceb
|
@ -0,0 +1 @@
|
|||
__pycache__/
|
|
@ -3,7 +3,6 @@
|
|||
import collections
|
||||
import importlib
|
||||
import os
|
||||
import traceback
|
||||
import yaml
|
||||
|
||||
|
||||
|
@ -234,8 +233,7 @@ class SpecFamily(SpecElement):
|
|||
resolved.append(elem)
|
||||
|
||||
if len(resolved) == 0:
|
||||
traceback.print_exception(last_exception)
|
||||
raise Exception("Could not resolve any spec element, infinite loop?")
|
||||
raise last_exception
|
||||
|
||||
def new_attr_set(self, elem):
|
||||
return SpecAttrSet(self, elem)
|
||||
|
|
|
@ -546,7 +546,7 @@ class Struct:
|
|||
max_val = 0
|
||||
self.attr_max_val = None
|
||||
for name, attr in self.attr_list:
|
||||
if attr.value > max_val:
|
||||
if attr.value >= max_val:
|
||||
max_val = attr.value
|
||||
self.attr_max_val = attr
|
||||
self.attrs[name] = attr
|
||||
|
|
Loading…
Reference in New Issue