Skip to contentSkip to conversation

iio: gyro: mpu3050: Explicity make a 'poison' value big endian

PATCH In review [email protected] 2 participants 3 messages Oct 13, 2019 – Oct 18, 2019

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 iio: gyro: mpu3050: Explicity make a 'poison' value big endian

From: Jonathan Cameron <[email protected]>

This clearly has no actual affect but it does show sparse and similar static analysers that we are doing this intentionally.

CHECK drivers/iio/gyro/mpu3050-core.c
drivers/iio/gyro/mpu3050-core.c:546:48: warning: incorrect type in assignment (different base types)
drivers/iio/gyro/mpu3050-core.c:546:48: expected restricted __be16 <noident>
drivers/iio/gyro/mpu3050-core.c:546:48: got int

---
 drivers/iio/gyro/mpu3050-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/gyro/mpu3050-core.c +1 -1
index 80154bca18b6..8e908a749f95 100644
@@ -543,7 +543,7 @@ static irqreturn_t mpu3050_trigger_handler(int irq, void *p)
 				toread = bytes_per_datum;
 				offset = 1;
 				/* Put in some dummy value */
-				fifo_values[0] = 0xAAAA;
+				fifo_values[0] = cpu_to_be16(0xAAAA);
 			}
 
 			ret = regmap_bulk_read(mpu3050->map,
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Sun, Oct 13, 2019 at 12:05 PM <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

This clearly has no actual affect but it does show sparse and similar static analysers that we are doing this intentionally.

Quoted 7 lines

CHECK drivers/iio/gyro/mpu3050-core.c
drivers/iio/gyro/mpu3050-core.c:546:48: warning: incorrect type in assignment (different base types)
drivers/iio/gyro/mpu3050-core.c:546:48: expected restricted __be16 <noident>
drivers/iio/gyro/mpu3050-core.c:546:48: got int

Yours,
Linus Walleij

author maintainer Applied
#2 lore raw
Quoted 12 lines · On Wed, 16 Oct 2019 14:19:46 +0200 Linus Walleij <[email protected]>…
Quoted 10 lines · On Sun, Oct 13, 2019 at 12:05 PM <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

This clearly has no actual affect but it does show sparse and similar static analysers that we are doing this intentionally.

CHECK drivers/iio/gyro/mpu3050-core.c
drivers/iio/gyro/mpu3050-core.c:546:48: warning: incorrect type in assignment (different base types)
drivers/iio/gyro/mpu3050-core.c:546:48: expected restricted __be16 <noident>
drivers/iio/gyro/mpu3050-core.c:546:48: got int

Quoted 7 lines
Quoted 2 lines

Yours,
Linus Walleij

Applied. Thanks,

Jonathan