All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] iommu: dart: DART_T8110_ERROR range should be 0 to 5
@ 2023-02-01 12:42 ` Eric Curtin
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Curtin @ 2023-02-01 12:42 UTC (permalink / raw)
  To: asahi
  Cc: Eric Curtin, Dan Carpenter, Hector Martin, Sven Peter,
	Alyssa Rosenzweig, Joerg Roedel, Will Deacon, Robin Murphy,
	moderated list:ARM/APPLE MACHINE SUPPORT,
	open list:IOMMU SUBSYSTEM, open list

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
---
Changes in v2: Remove DART_T8110_ERROR_ADDR_HI change
---
 drivers/iommu/apple-dart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index 42666617803d..fd09abe8d29e 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -111,8 +111,8 @@
 
 #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)
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] iommu: dart: DART_T8110_ERROR range should be 0 to 5
@ 2023-02-01 12:42 ` Eric Curtin
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Curtin @ 2023-02-01 12:42 UTC (permalink / raw)
  To: asahi
  Cc: Eric Curtin, Dan Carpenter, Hector Martin, Sven Peter,
	Alyssa Rosenzweig, Joerg Roedel, Will Deacon, Robin Murphy,
	moderated list:ARM/APPLE MACHINE SUPPORT,
	open list:IOMMU SUBSYSTEM, open list

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
---
Changes in v2: Remove DART_T8110_ERROR_ADDR_HI change
---
 drivers/iommu/apple-dart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index 42666617803d..fd09abe8d29e 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -111,8 +111,8 @@
 
 #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)
-- 
2.39.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] iommu: dart: DART_T8110_ERROR range should be 0 to 5
  2023-02-01 12:42 ` Eric Curtin
@ 2023-02-01 17:00   ` Sven Peter
  -1 siblings, 0 replies; 6+ messages in thread
From: Sven Peter @ 2023-02-01 17:00 UTC (permalink / raw)
  To: Eric Curtin, asahi
  Cc: Dan Carpenter, Hector Martin, Alyssa Rosenzweig, Joerg Roedel,
	Will Deacon, Robin Murphy,
	moderated list:ARM/APPLE MACHINE SUPPORT,
	open list:IOMMU SUBSYSTEM, open list

Hi,

On Wed, Feb 1, 2023, at 13:42, Eric Curtin wrote:
> 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

You're missing a ">" here but I hope Joerg can fix that when
merging it!

> ---
> Changes in v2: Remove DART_T8110_ERROR_ADDR_HI change
> ---

Reviewed-by: Sven Peter <sven@svenpeter.dev>


Thanks,


Sven

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] iommu: dart: DART_T8110_ERROR range should be 0 to 5
@ 2023-02-01 17:00   ` Sven Peter
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Peter @ 2023-02-01 17:00 UTC (permalink / raw)
  To: Eric Curtin, asahi
  Cc: Dan Carpenter, Hector Martin, Alyssa Rosenzweig, Joerg Roedel,
	Will Deacon, Robin Murphy,
	moderated list:ARM/APPLE MACHINE SUPPORT,
	open list:IOMMU SUBSYSTEM, open list

Hi,

On Wed, Feb 1, 2023, at 13:42, Eric Curtin wrote:
> 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

You're missing a ">" here but I hope Joerg can fix that when
merging it!

> ---
> Changes in v2: Remove DART_T8110_ERROR_ADDR_HI change
> ---

Reviewed-by: Sven Peter <sven@svenpeter.dev>


Thanks,


Sven

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] iommu: dart: DART_T8110_ERROR range should be 0 to 5
  2023-02-01 12:42 ` Eric Curtin
@ 2023-02-03 10:12   ` Joerg Roedel
  -1 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2023-02-03 10:12 UTC (permalink / raw)
  To: Eric Curtin
  Cc: asahi, Dan Carpenter, Hector Martin, Sven Peter,
	Alyssa Rosenzweig, Will Deacon, Robin Murphy,
	moderated list:ARM/APPLE MACHINE SUPPORT,
	open list:IOMMU SUBSYSTEM, open list

On Wed, Feb 01, 2023 at 12:42:58PM +0000, Eric Curtin wrote:
> 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
                                   Missing char ^

Fixed that and applied the patch, thanks. Please use checkpatch next
time.

Regards,

	Joerg
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] iommu: dart: DART_T8110_ERROR range should be 0 to 5
@ 2023-02-03 10:12   ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2023-02-03 10:12 UTC (permalink / raw)
  To: Eric Curtin
  Cc: asahi, Dan Carpenter, Hector Martin, Sven Peter,
	Alyssa Rosenzweig, Will Deacon, Robin Murphy,
	moderated list:ARM/APPLE MACHINE SUPPORT,
	open list:IOMMU SUBSYSTEM, open list

On Wed, Feb 01, 2023 at 12:42:58PM +0000, Eric Curtin wrote:
> 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
                                   Missing char ^

Fixed that and applied the patch, thanks. Please use checkpatch next
time.

Regards,

	Joerg
 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-03 10:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 12:42 [PATCH v2] iommu: dart: DART_T8110_ERROR range should be 0 to 5 Eric Curtin
2023-02-01 12:42 ` Eric Curtin
2023-02-01 17:00 ` Sven Peter
2023-02-01 17:00   ` Sven Peter
2023-02-03 10:12 ` Joerg Roedel
2023-02-03 10:12   ` Joerg Roedel

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.