From: Jacob Lifshay Date: Mon, 5 Oct 2020 00:47:54 +0000 (-0700) Subject: simplify create_args X-Git-Tag: 24jan2021_ls180~241 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec3a1043e57c9acc9eb10d3681ca66215a52b0c6;p=soc.git simplify create_args --- 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