Skip to contentSkip to conversation

iio: imu: lsm6dsx: Fix mount matrix retrieval

PATCH In review Alejandro Tafalla 3 participants 6 messages Jul 14, 2023 – Jul 23, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 iio: imu: lsm6dsx: Fix mount matrix retrieval

The function lsm6dsx_get_acpi_mount_matrix should return an error when ACPI support is not enabled to allow executing iio_read_mount_matrix in the probe function.

Fixes dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")

---
Changes in v3:
- Removed unneeded check for err == -EOPNOTSUPP.

Changes in v2:
- Use of error codes instead of true/false

 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +1 -1
index 6a18b363cf73..b6e6b1df8a61 100644
@@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
 static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
 					  struct iio_mount_matrix *orientation)
 {
-	return false;
+	return -EOPNOTSUPP;
 }
 
 #endif
Signature · 1 line
2.41.0
maintainer
#1 lore raw
Quoted 6 lines · On Fri, 14 Jul 2023 17:31:26 +0200 Alejandro Tafalla <[email protected]> wrote:

The function lsm6dsx_get_acpi_mount_matrix should return an error when ACPI support is not enabled to allow executing iio_read_mount_matrix in the probe function.

Fixes dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")

I can fix it up whilst applying if no other issues, but there must not be a blank line here. All tags need to be in a single block for some tooling that is used with the kernel tree (and some of the checking scripts warn about this so it won't get applied with the blank line here).

Quoted 24 lines

---
Changes in v3:
- Removed unneeded check for err == -EOPNOTSUPP.

Changes in v2:
- Use of error codes instead of true/false

 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +1 -1
index 6a18b363cf73..b6e6b1df8a61 100644
@@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
 static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
 					  struct iio_mount_matrix *orientation)
 {
-	return false;
+	return -EOPNOTSUPP;
 }
 
 #endif
#2 lore raw
Quoted 8 lines · On sábado, 15 de julio de 2023 19:35:15 (CEST) Jonathan Cameron wrote:

On Fri, 14 Jul 2023 17:31:26 +0200

Quoted 5 lines · Alejandro Tafalla

The function lsm6dsx_get_acpi_mount_matrix should return an error when ACPI
support is not enabled to allow executing iio_read_mount_matrix in the probe function.

Quoted 6 lines
Quoted 1 line
Fixes dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")

I can fix it up whilst applying if no other issues, but there must not be a blank line here. All tags need to be in a single block for some tooling that is used with the kernel tree (and some of the checking scripts warn about this so it won't get applied with the blank line here).

Okay, i'll keep it in mind for new patches. Thank you.

Quoted 21 lines
Quoted 21 lines

---
Changes in v3:
- Removed unneeded check for err == -EOPNOTSUPP.

Changes in v2:
- Use of error codes instead of true/false

 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index 6a18b363cf73..b6e6b1df8a61 100644

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +0 -0
@@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct

device *dev,>
static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,

Quoted 1 line
Quoted 1 line

struct

iio_mount_matrix *orientation)

Quoted 9 lines
Quoted 9 lines

{

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +1 -1
-	return false;
+	return -EOPNOTSUPP;
 
 }
 
 #endif
maintainer
#3 lore raw
Quoted 9 lines · On Mon, 17 Jul 2023 23:17:10 +0200 Alejandro Tafalla <[email protected]> wrote:
Quoted 8 lines · On sábado, 15 de julio de 2023 19:35:15 (CEST) Jonathan Cameron wrote:

On Fri, 14 Jul 2023 17:31:26 +0200

Quoted 5 lines · Alejandro Tafalla

The function lsm6dsx_get_acpi_mount_matrix should return an error when ACPI
support is not enabled to allow executing iio_read_mount_matrix in the probe function.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Fixes dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")

I can fix it up whilst applying if no other issues, but there must not be a blank line here. All tags need to be in a single block for some tooling that is used with the kernel tree (and some of the checking scripts warn about this so it won't get applied with the blank line here).

Okay, i'll keep it in mind for new patches. Thank you.

Np.

Just waiting for Lorenzo to have time to take a final look.

Jonathan

Quoted 36 lines
Quoted 21 lines
Quoted 21 lines

---
Changes in v3:
- Removed unneeded check for err == -EOPNOTSUPP.

Changes in v2:
- Use of error codes instead of true/false

 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index 6a18b363cf73..b6e6b1df8a61 100644

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +0 -0
@@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct

device *dev,>
static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,

Quoted 1 line
Quoted 1 line

struct

iio_mount_matrix *orientation)

Quoted 9 lines
Quoted 9 lines

{

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +1 -1
-	return false;
+	return -EOPNOTSUPP;
 
 }
 
 #endif  
maintainer Acked-by
#4 lore raw
Quoted 18 lines · Jonathan Cameron
Quoted 16 lines · Alejandro Tafalla
Quoted 14 lines · On sábado, 15 de julio de 2023 19:35:15 (CEST) Jonathan Cameron wrote:

On Fri, 14 Jul 2023 17:31:26 +0200

Quoted 6 lines · Alejandro Tafalla

The function lsm6dsx_get_acpi_mount_matrix should return an error when ACPI
support is not enabled to allow executing iio_read_mount_matrix in the probe function.

Fixes dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")

I can fix it up whilst applying if no other issues, but there must not be a blank line here. All tags need to be in a single block for some tooling that is used with the kernel tree (and some of the checking scripts warn about this so it won't get applied with the blank line here).

Quoted 4 lines
Quoted 1 line

Okay, i'll keep it in mind for new patches. Thank you.

Np.

Just waiting for Lorenzo to have time to take a final look.

I am fine with this patch.

Quoted 40 lines

Jonathan

Quoted 36 lines
Quoted 21 lines
Quoted 21 lines

---
Changes in v3:
- Removed unneeded check for err == -EOPNOTSUPP.

Changes in v2:
- Use of error codes instead of true/false

 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index 6a18b363cf73..b6e6b1df8a61 100644

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +0 -0
@@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct

device *dev,>
static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,

Quoted 1 line
Quoted 1 line

struct

iio_mount_matrix *orientation)

Quoted 9 lines
Quoted 9 lines

{

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +1 -1
-	return false;
+	return -EOPNOTSUPP;
 
 }
 
 #endif  
maintainer
#5 lore raw
Quoted 19 lines · On Thu, 20 Jul 2023 23:27:53 +0200 Lorenzo Bianconi <[email protected]> wrote:
Quoted 18 lines · Jonathan Cameron
Quoted 16 lines · Alejandro Tafalla
Quoted 14 lines · On sábado, 15 de julio de 2023 19:35:15 (CEST) Jonathan Cameron wrote:

On Fri, 14 Jul 2023 17:31:26 +0200

Quoted 6 lines · Alejandro Tafalla

The function lsm6dsx_get_acpi_mount_matrix should return an error when ACPI
support is not enabled to allow executing iio_read_mount_matrix in the probe function.

Fixes dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval")

I can fix it up whilst applying if no other issues, but there must not be a blank line here. All tags need to be in a single block for some tooling that is used with the kernel tree (and some of the checking scripts warn about this so it won't get applied with the blank line here).

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

Okay, i'll keep it in mind for new patches. Thank you.

Np.

Just waiting for Lorenzo to have time to take a final look.

I am fine with this patch.

Ah. My filters broke so I'd lost this. Thankfully b4 picked it up and made me go look for where the missing emails had gone. All recovered now and the ack picked up.

Thanks,

Jonathan

Quoted 40 lines
Quoted 40 lines

Jonathan

Quoted 36 lines
Quoted 21 lines
Quoted 21 lines

---
Changes in v3:
- Removed unneeded check for err == -EOPNOTSUPP.

Changes in v2:
- Use of error codes instead of true/false

 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index 6a18b363cf73..b6e6b1df8a61 100644

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +0 -0
@@ -2687,7 +2687,7 @@ static int lsm6dsx_get_acpi_mount_matrix(struct

device *dev,>
static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,

Quoted 1 line
Quoted 1 line

struct

iio_mount_matrix *orientation)

Quoted 9 lines
Quoted 9 lines

{

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +1 -1
-	return false;
+	return -EOPNOTSUPP;
 
 }
 
 #endif