Re: [PATCH] iio: adc: ad7124: Fix comparison of channel configs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jonathan,

On Sat, Jan 25, 2025 at 02:48:28PM +0000, Jonathan Cameron wrote:
> Fully agree the change makes sense.  Though the floating point example
> is unlikely to bite us in kernel! 
> 
> Did you see an actual failure to match?  If not I'd be tempted
> to take this for next cycle rather than as a fix to rush in.
> I'd be surprised if current code doesn't happen to work.

No, I didn't see a failure, I noticed that while working on the driver
source. Also in this case nothing severe happens. The check might only
result in failure to detect that a setup could be reused and uses a
different one then. In the worst case that increases pressure to rotate
the setup configuration in a timely manner.

David also pointed out in a private conversion that the bool issue
probably isn't relevant because the compiler (at least gcc, didn't check
clang) only uses values 0 and 1 and the padding ideally should be all
zero.

Anyhow, I think comparing the actual byte representation is a bad
pattern that shouldn't be used even if in that case it might work.

So I'm not aware of a problem that would justify getting this in early
as a fix and the next cycle it totally fine.

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux