Skip to content

Commit 9e6a182

Browse files
ericcurtinjoergroedel
authored andcommitted
iommu: dart: DART_T8110_ERROR range should be 0 to 5
This was detected by smatch as one "else if" statement could never be reached. Confirmed bit order by comparing with python implementation [1]. drivers/iommu/apple-dart.c:991 apple_dart_t8110_irq() warn: duplicate check 'error_code == ((((1))) << (3))' (previous on line 989) Link: AsahiLinux/m1n1@96b2d584feec1e3f7bfa [1] Fixes: d8bcc87 ("iommu: dart: Add t8110 DART support") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Eric Curtin <[email protected]> Reviewed-by: Sven Peter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent cf5c1c8 commit 9e6a182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/apple-dart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@
111111

112112
#define DART_T8110_ERROR_MASK 0x104
113113

114-
#define DART_T8110_ERROR_READ_FAULT BIT(4)
115-
#define DART_T8110_ERROR_WRITE_FAULT BIT(3)
114+
#define DART_T8110_ERROR_READ_FAULT BIT(5)
115+
#define DART_T8110_ERROR_WRITE_FAULT BIT(4)
116116
#define DART_T8110_ERROR_NO_PTE BIT(3)
117117
#define DART_T8110_ERROR_NO_PMD BIT(2)
118118
#define DART_T8110_ERROR_NO_PGD BIT(1)

0 commit comments

Comments
 (0)