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: <Z_alpFoaQQUlWdfo@smile.fi.intel.com>
Date: Wed, 9 Apr 2025 19:51:48 +0300
From: Andy Shevchenko <andy@...nel.org>
To: Angelo Dureghello <adureghello@...libre.com>
Cc: Nuno Sa <nuno.sa@...log.com>, Lars-Peter Clausen <lars@...afoo.de>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	Jonathan Cameron <jic23@...nel.org>,
	David Lechner <dlechner@...libre.com>, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v2 2/2] iio: dac: adi-axi-dac: use unique bus free check

On Wed, Apr 09, 2025 at 11:16:55AM +0200, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@...libre.com>
> 
> Use a unique function for the bus free check by polling, to reduce
> duplicated code. An error is always thrown in case of timeout.

...

> +static int axi_dac_wait_bus_free(struct axi_dac_state *st)
> +{
> +	u32 val;
> +	int ret;
> +
> +	ret = regmap_read_poll_timeout(st->regmap, AXI_DAC_UI_STATUS_REG, val,
> +		FIELD_GET(AXI_DAC_UI_STATUS_IF_BUSY, val) == -1, 10,
> +		100 * KILO);

Same comment as in the previous patch. Okay, it seems more than in the single
case. Perhaps to change that as well here?

> +	if (ret == -ETIMEDOUT)
> +		dev_err(st->dev, "AXI bus timeout\n");

Why do you need this? The error code will go to the user space at the end? If
yes, it will be enough to have it printed there, no?

> +	return ret;
> +}


-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ