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: <408b4046-12bc-40d0-aaf4-adced4033946@sirena.org.uk>
Date: Mon, 24 Jun 2024 16:29:02 +0100
From: Mark Brown <broonie@...nel.org>
To: Witold Sadowski <wsadowski@...vell.com>
Cc: linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org,
	devicetree@...r.kernel.org, robh@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
	pthombar@...ence.com
Subject: Re: [PATCH v9 6/9] spi: cadence: Add Marvell xfer operation support

On Wed, Jun 19, 2024 at 07:17:12AM -0700, Witold Sadowski wrote:

> +		while (t->len) {
> +
> +			current_cycle_count = t->len > max_len ? max_len : t->len;

cycle_count seems like a weird name?

In general please try to avoid overusing the ternery operator, it
doesn't help legibility.  Just write normal conditional statements, or
in this case use max().

> +				cdns_xspi->current_xfer_qword += current_cycle_count /
> +								 MRVL_XFER_QWORD_BYTECOUNT;
> +				if (current_cycle_count % MRVL_XFER_QWORD_BYTECOUNT)
> +					cdns_xspi->current_xfer_qword++;
> +
> +				cdns_xspi->current_xfer_qword %= MRVL_XFER_QWORD_COUNT;
> +			}
> +			cs_change = t->cs_change;
> +			t->len -= current_cycle_count;
> +		}
> +	}

This loop doesn't implement any of the delay stuff, ideally it either
would or would reject transfers that request transfers.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ