From: Eric Curtin <ecurtin@redhat.com> To: asahi@lists.linux.dev Cc: Eric Curtin <ecurtin@redhat.com>, Dan Carpenter <error27@gmail.com>, Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev>, Alyssa Rosenzweig <alyssa@rosenzweig.io>, Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, linux-arm-kernel@lists.infradead.org (moderated list:ARM/APPLE MACHINE SUPPORT), iommu@lists.linux.dev (open list:IOMMU SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] iommu: dart: DART_T8110_ERROR range should be 0 to 5 Date: Mon, 30 Jan 2023 16:53:50 +0000 [thread overview] Message-ID: <20230130165350.58533-1-ecurtin@redhat.com> (raw) 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: https://github.com/AsahiLinux/m1n1/commit/96b2d584feec1e3f7bfa [1] Fixes: d8bcc870d99d ("iommu: dart: Add t8110 DART support") Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Eric Curtin <ecurtin@redhat.com> --- drivers/iommu/apple-dart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index efe877842f72..3adacf4094d7 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -112,15 +112,15 @@ #define DART_T8110_ERROR_MASK 0x104 -#define DART_T8110_ERROR_READ_FAULT BIT(4) -#define DART_T8110_ERROR_WRITE_FAULT BIT(3) +#define DART_T8110_ERROR_READ_FAULT BIT(5) +#define DART_T8110_ERROR_WRITE_FAULT BIT(4) #define DART_T8110_ERROR_NO_PTE BIT(3) #define DART_T8110_ERROR_NO_PMD BIT(2) #define DART_T8110_ERROR_NO_PGD BIT(1) #define DART_T8110_ERROR_NO_TTBR BIT(0) #define DART_T8110_ERROR_ADDR_LO 0x170 -#define DART_T8110_ERROR_ADDR_HI 0x174 +#define DART_T8110_ERROR_ADDR_HI 0x175 #define DART_T8110_PROTECT 0x200 #define DART_T8110_UNPROTECT 0x204 -- 2.39.1
WARNING: multiple messages have this Message-ID (diff)
From: Eric Curtin <ecurtin@redhat.com> To: asahi@lists.linux.dev Cc: Eric Curtin <ecurtin@redhat.com>, Dan Carpenter <error27@gmail.com>, Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev>, Alyssa Rosenzweig <alyssa@rosenzweig.io>, Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, linux-arm-kernel@lists.infradead.org (moderated list:ARM/APPLE MACHINE SUPPORT), iommu@lists.linux.dev (open list:IOMMU SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] iommu: dart: DART_T8110_ERROR range should be 0 to 5 Date: Mon, 30 Jan 2023 16:53:50 +0000 [thread overview] Message-ID: <20230130165350.58533-1-ecurtin@redhat.com> (raw) 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: https://github.com/AsahiLinux/m1n1/commit/96b2d584feec1e3f7bfa [1] Fixes: d8bcc870d99d ("iommu: dart: Add t8110 DART support") Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Eric Curtin <ecurtin@redhat.com> --- drivers/iommu/apple-dart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index efe877842f72..3adacf4094d7 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -112,15 +112,15 @@ #define DART_T8110_ERROR_MASK 0x104 -#define DART_T8110_ERROR_READ_FAULT BIT(4) -#define DART_T8110_ERROR_WRITE_FAULT BIT(3) +#define DART_T8110_ERROR_READ_FAULT BIT(5) +#define DART_T8110_ERROR_WRITE_FAULT BIT(4) #define DART_T8110_ERROR_NO_PTE BIT(3) #define DART_T8110_ERROR_NO_PMD BIT(2) #define DART_T8110_ERROR_NO_PGD BIT(1) #define DART_T8110_ERROR_NO_TTBR BIT(0) #define DART_T8110_ERROR_ADDR_LO 0x170 -#define DART_T8110_ERROR_ADDR_HI 0x174 +#define DART_T8110_ERROR_ADDR_HI 0x175 #define DART_T8110_PROTECT 0x200 #define DART_T8110_UNPROTECT 0x204 -- 2.39.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-01-30 16:53 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-30 16:53 Eric Curtin [this message] 2023-01-30 16:53 ` [PATCH] iommu: dart: DART_T8110_ERROR range should be 0 to 5 Eric Curtin 2023-01-30 18:16 ` Sven Peter 2023-01-30 18:16 ` Sven Peter 2023-01-30 18:16 ` Sven Peter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230130165350.58533-1-ecurtin@redhat.com \ --to=ecurtin@redhat.com \ --cc=alyssa@rosenzweig.io \ --cc=asahi@lists.linux.dev \ --cc=error27@gmail.com \ --cc=iommu@lists.linux.dev \ --cc=joro@8bytes.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=marcan@marcan.st \ --cc=robin.murphy@arm.com \ --cc=sven@svenpeter.dev \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.