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: <261e118d-529b-0ce0-5524-d24d767fa92f@opensource.cirrus.com>
Date:   Mon, 20 Nov 2023 15:46:26 +0000
From:   Maciej Strozek <mstrozek@...nsource.cirrus.com>
To:     Mark Brown <broonie@...nel.org>
CC:     James Schulman <james.schulman@...rus.com>,
        David Rhodes <david.rhodes@...rus.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        <alsa-devel@...a-project.org>, <patches@...nsource.cirrus.com>,
        <linux-sound@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] ASoC: cs43130: Allow driver to work without IRQ
 connection

W dniu 20/11/2023 o 14:40, Mark Brown pisze:
> On Mon, Nov 20, 2023 at 02:17:34PM +0000, Maciej Strozek wrote:
>> +		if (to_poll == &cs43130->xtal_rdy) {
>> +			offset = 0;
>> +			flag = CS43130_XTAL_RDY_INT;
>> +		} else if (to_poll == &cs43130->pll_rdy) {
>> +			offset = 0;
>> +			flag = CS43130_PLL_RDY_INT;
>> +		} else if (to_poll == &cs43130->hpload_evt) {
>> +			offset = 3;
>> +			flag = CS43130_HPLOAD_NO_DC_INT | CS43130_HPLOAD_UNPLUG_INT |
>> +				CS43130_HPLOAD_OOR_INT | CS43130_HPLOAD_AC_INT |
>> +				CS43130_HPLOAD_DC_INT | CS43130_HPLOAD_ON_INT |
>> +				CS43130_HPLOAD_OFF_INT;
>> +		} else {
>> +			return 0;
>> +		}
> 
> Is it a bug to call this function without to_poll set to something
> known?  This will just silently ignore it which seems wrong and is
> inconsitent with the handling in the interrupt case which will wait for
> the the completion to be signalled and report a timeout on error.
> 

In interrupt case 0 means timeout (and calling function should expect 0 
as error/timeout), so the only inconsistency I see is in not waiting 
before returning a timeout, but that would be needlessly wasting time?
Do you think adding a debug print or a comment would help here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ