aarch64 haskell: prefer "maybe" over "case"
More clear and concise. Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
parent
7d4b58f618
commit
ab76f0a250
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue