lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z-6yLe1GyNsFJlph@debian-BULLSEYE-live-builder-AMD64>
Date: Thu, 3 Apr 2025 13:07:09 -0300
From: Marcelo Schmitt <marcelo.schmitt1@...il.com>
To: Siddharth Menon <simeddon@...il.com>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-staging@...ts.linux.dev, gregkh@...uxfoundation.org,
	jic23@...nel.org, Michael.Hennerich@...log.com, lars@...afoo.de
Subject: Re: [PATCH v5] iio: frequency: ad9832: Use FIELD_PREP macro to set
 bit fields

On 04/02, Siddharth Menon wrote:
> On Sun, 30 Mar 2025 at 21:13, Marcelo Schmitt
> <marcelo.schmitt1@...il.com> wrote:
> > The previous implementation would set ctrl_fp if val == 1 and unset it if val == 0.
> > This patch seems to be doing the reverse (setting ctrl_fp if val == 0, and
> > unsetting it if val != 0). Was the previous implementation potentially buggy?
> 
> My apologies, I seem to have made a mistake here.

No worries. It's okay to change/update device drivers to make them better (e.g.
implement new features, fix bugs). If the proposed change was fixing something,
then it could be put into a separate patch with a Fixes tag. Though, I had
another look at the datasheet and my understanding is that the freq bit (bit 11)
should be set if the user writes 1 to out_altvoltageX_frequencysymbol (ABI
documented in drivers/staging/iio/Documentation/sysfs-bus-iio-dds).
By the way, I now think my suggestion of doing
st->ctrl_fp |= FIELD_PREP(AD9832_FREQ, !!val) was not a good idea since that
wouldn't follow the proposed ABI.
Anyway, it's okay to propose more changes/patches if you want. Just separate the
patches according to their logical change if you make more changes to the driver.

Regards,
Marcelo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ