Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: magnetometer: yas530: Move printk %*ph parameters out from stack

Use less stack by modifying %*ph parameters.

While at it, in the function yas530_get_calibration_data(), the debug dump was
extended to 16 elements as this is the size of the calibration data array of
YAS530.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/93b50c20adb1b2acb4cddb1ab25755070edd7c07.1660337264.git.jahau@rocketmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Jakob Hauser and committed by
Jonathan Cameron
bdef8dcf 6e3bfa97

+2 -2
+2 -2
drivers/iio/magnetometer/yamaha-yas530.c
··· 664 664 ret = regmap_bulk_read(yas5xx->map, YAS530_CAL, data, sizeof(data)); 665 665 if (ret) 666 666 return ret; 667 - dev_dbg(yas5xx->dev, "calibration data: %*ph\n", 14, data); 667 + dev_dbg(yas5xx->dev, "calibration data: %16ph\n", data); 668 668 669 669 add_device_randomness(data, sizeof(data)); 670 670 yas5xx->version = data[15] & GENMASK(1, 0); ··· 711 711 ret = regmap_bulk_read(yas5xx->map, YAS530_CAL, data, sizeof(data)); 712 712 if (ret) 713 713 return ret; 714 - dev_dbg(yas5xx->dev, "calibration data: %*ph\n", 14, data); 714 + dev_dbg(yas5xx->dev, "calibration data: %14ph\n", data); 715 715 716 716 /* Sanity check, is this all zeroes? */ 717 717 if (memchr_inv(data, 0x00, 13) == NULL) {