Commit 766d1bdc authored by Jakub Kicinski's avatar Jakub Kicinski

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.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents ac3ad195 d77e7ece
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment