mbox series

[0/2] iio: adc: ad*: Fix comparisons using memcmp

Message ID cover.1738258777.git.u.kleine-koenig@baylibre.com (mailing list archive)
Headers show
Series iio: adc: ad*: Fix comparisons using memcmp | expand

Message

Uwe Kleine-König Jan. 30, 2025, 5:45 p.m. UTC
Hello,

I recently sent a patch fixing a bad coding pattern in the ad7124
driver; see
https://lore.kernel.org/linux-iio/20250124160124.435520-2-u.kleine-koenig@baylibre.com/.

The same pattern is used for ad4130 and ad7173. This series fixes these
two drivers in the same way. As for the ad7124 driver this didn't break
in production and if the memcmp comparison wrongly returns false,
nothing bad happens. Only usage of the resources isn't optimal then but
that is probably nothing a user would notice. So there is no urge here.

Still it's the correct thing to do to drop the comparison using memcmp
and compare member-by-member instead.

Best regards
Uwe

Uwe Kleine-König (2):
  iio: adc: ad4130: Fix comparison of channel setups
  iio: adc: ad7173: Fix comparison of channel configs

 drivers/iio/adc/ad4130.c | 33 +++++++++++++++++++++++++++++++--
 drivers/iio/adc/ad7173.c | 15 ++++++++++++---
 2 files changed, 43 insertions(+), 5 deletions(-)

base-commit: a13f6e0f405ed0d3bcfd37c692c7d7fa3c052154