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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241101144641.512e2ed5@jic23-huawei>
Date: Fri, 1 Nov 2024 14:46:41 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Angelo Dureghello <angelo@...nel-space.org>, Lars-Peter Clausen
 <lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>, Nuno
 Sá <nuno.sa@...log.com>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Olivier Moysan <olivier.moysan@...s.st.com>,
 linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>, Angelo
 Dureghello <adureghello@...libre.com>, Conor Dooley
 <conor.dooley@...rochip.com>, <lkp@...el.com>
Subject: Re: [PATCH v9 0/8] iio: add support for the ad3552r AXI DAC IP

On Thu, 31 Oct 2024 21:26:26 +0000
Jonathan Cameron <jic23@...nel.org> wrote:

> On Tue, 29 Oct 2024 14:08:15 -0500
> David Lechner <dlechner@...libre.com> wrote:
> 
> > On 10/28/24 4:45 PM, Angelo Dureghello wrote:  
> > > Purpose is to add ad3552r AXI DAC (fpga-based) support.
> > > 
> > > The "ad3552r" AXI IP, a variant of the generic "DAC" AXI IP,
> > > has been created to reach the maximum speed (33MUPS) supported
> > > from the ad3552r. To obtain the maximum transfer rate, a custom
> > > IP core module has been implemented with a QSPI interface with
> > > DDR (Double Data Rate) mode.
> > > 
> > > The design is actually using the DAC backend since the register
> > > map is the same of the generic DAC IP, except for some customized
> > > bitfields. For this reason, a new "compatible" has been added
> > > in adi-axi-dac.c.
> > > 
> > > Also, backend has been extended with all the needed functions
> > > for this use case, keeping the names gneric.
> > > 
> > > The following patch is actually applying to linux-iio/testing.
> > > 
> > > ---    
> > Reviewed-by: David Lechner <dlechner@...libre.com>
> >   
> 
> Series applied with 2 tweaks as called out in replies to individual
> patches. Pushed out initially as testing for 0-day to see if there
> are any issues my (admittedly now very lazy) build tests didn't find.
 [jic23-iio:testing 104/113]  drivers/iio/dac/ad3552r-hs.c:400:17: warning: variable 'goffs' is  uninitialized when used here

was a report from 0-day. 
I 'think' the fix (based on v6 which is last time anything set this)
is the following and that's what I'll push out for now.

If it should be something else send me a patch on top of my testing branch
so I can quickly apply it.

I've also dropped the explicit select of ADI_AXI_DAC as you can only do that
if you also carry all it's dependencies. (another 0-day report)

Thanks as ever to the lkp team for their incredibly useful service!



diff --git a/drivers/iio/dac/ad3552r-hs.c b/drivers/iio/dac/ad3552r-hs.c
index 97dfc598aec6..7a5b277ee370 100644
--- a/drivers/iio/dac/ad3552r-hs.c
+++ b/drivers/iio/dac/ad3552r-hs.c
@@ -295,7 +295,6 @@ static int ad3552r_hs_setup_custom_gain(struct ad3552r_hs_state *st,
 
 static int ad3552r_hs_setup(struct ad3552r_hs_state *st)
 {
-       s16 goffs;
        u16 id;
        u16 gain = 0, offset = 0;
        u32 ch, val, range;
@@ -397,7 +396,7 @@ static int ad3552r_hs_setup(struct ad3552r_hs_state *st)
                        gain = ad3552r_calc_custom_gain(st->ch_data[ch].p,
                                                st->ch_data[ch].n,
                                                st->ch_data[ch].gain_offset);
-                       offset = abs(goffs);
+                       offset = abs(st->ch_data[ch].gain_offset);
 
                        st->ch_data[ch].range_override = 1;


> 
> Thanks,
> 
> Jonathan
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ