From ec3a1043e57c9acc9eb10d3681ca66215a52b0c6 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Sun, 4 Oct 2020 17:47:54 -0700 Subject: [PATCH] simplify create_args --- src/soc/decoder/isa/caller.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index bf84e05a..9252bfef 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -61,10 +61,7 @@ REG_SORT_ORDER = { def create_args(reglist, extra=None): - regset = OrderedSet(reglist) - retval = [] - for reg in regset: - retval.append(reg) + retval = list(OrderedSet(reglist)) retval.sort(key=lambda reg: REG_SORT_ORDER[reg]) if extra is not None: return [extra] + retval -- 2.30.2