From ab76f0a25078eed1d4a027ef46822e050193814c Mon Sep 17 00:00:00 2001 From: Gerwin Klein Date: Thu, 24 Mar 2022 08:43:35 +1100 Subject: [PATCH] aarch64 haskell: prefer "maybe" over "case" More clear and concise. Signed-off-by: Gerwin Klein --- spec/haskell/src/SEL4/Kernel/VSpace/AARCH64.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/haskell/src/SEL4/Kernel/VSpace/AARCH64.hs b/spec/haskell/src/SEL4/Kernel/VSpace/AARCH64.hs index 2b48f3aac..f9908794e 100644 --- a/spec/haskell/src/SEL4/Kernel/VSpace/AARCH64.hs +++ b/spec/haskell/src/SEL4/Kernel/VSpace/AARCH64.hs @@ -288,9 +288,7 @@ deleteASID asid pt = do Just poolPtr -> do ASIDPool pool <- getObject poolPtr let maybeEntry = pool!(asid .&. mask asidLowBits) - let maybeRoot = case maybeEntry of -- FIXME AARCH64: surely there is option.map - Just (ASIDPoolVSpace vmID p) -> Just p - Nothing -> Nothing + let maybeRoot = maybe Nothing (Just . apVSpace) maybeEntry when (maybeRoot == Just pt) $ do invalidateTLBByASID asid invalidateASIDEntry asid