summaryrefslogtreecommitdiff
path: root/fs/btrfs/tree-checker.c
diff options
context:
space:
mode:
authorJoel Fernandes <joelagnelf@nvidia.com>2025-10-08 20:47:32 -0400
committerAlexandre Courbot <acourbot@nvidia.com>2025-10-16 08:04:46 +0900
commit1d5cffebd930d61588c32198f85fbe541ab97b8f (patch)
tree95cac78222204c50860ec59148631696b545dc89 /fs/btrfs/tree-checker.c
parentf7a33a67c50c92589b046e69b9075b7d28d31f87 (diff)
gpu: nova-core: vbios: Rework BiosImage to be simpler
Currently, the BiosImage type in vbios code is implemented as a type-wrapping enum with the sole purpose of implementing a type that is common to all specific image types. To make this work, macros were used to overcome limitations of using enums. Ugly match statements were also required to route methods from the enum type to the specific image type. Simplify the code by just creating the common BiosImage type in the iterator, and then converting it to specific image type after. This works well since all the methods common to different BiosImage are called only during the iteration and not later. Should we need to call these common methods later, we can use AsRef and traits, but for now not doing so gives us a nice ~50 negative line delta versus the existing code and is a lot simpler. Also remove the now obsolete BiosImage enum type. Cc: Benno Lossin <lossin@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Message-ID: <20251009004732.2287050-1-joelagnelf@nvidia.com>
Diffstat (limited to 'fs/btrfs/tree-checker.c')
0 files changed, 0 insertions, 0 deletions