Skip to content

iio: adc: ad*: Fix comparisons using memcmp

Uwe Kleine-König linux-iio 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iio: adc: ad4130: Fix comparison of channel setupsdrivers/iio/adc/ad4130.c+31 -24 replies
2/2iio: adc: ad7173: Fix comparison of channel configsdrivers/iio/adc/ad7173.c+12 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

Hello,

I recently sent a patch fixing a bad coding pattern in the ad7124 driver; see
https://lore.kernel.org/linux-iio/[email protected]/.

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

Signature · 1 line
2.47.1