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]
Date: Tue, 12 Mar 2024 12:22:27 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Subbaraya Sundeep <sbhatta@...vell.com>, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, 
 sgoutham@...vell.com, lcherian@...vell.com, gakula@...vell.com,
 hkelam@...vell.com,  naveenm@...vell.com, horms@...nel.org
Subject: Re: [net PATCH 1/5] octeontx2: Detect the mbox up or down message
 via register

On Tue, 2024-03-12 at 00:46 +0530, Subbaraya Sundeep wrote:
> +bool otx2_mbox_wait_for_zero(struct otx2_mbox *mbox, int devid)
> +{
> +	u64 data;
> +
> +	data = readq((void __iomem *)mbox->reg_base +
> +		     (mbox->trigger | (devid << mbox->tr_shift)));
> +
> +	/* If data is non-zero wait for ~1ms and return to caller
> +	 * whether data has changed to zero or not after the wait.
> +	 */
> +
> +	if (data)
> +		usleep_range(950, 1000);
> +	else
> +		return true;

Since you have to repost,

	if (!data)
		return true;

	usleep_range(950, 1000);


will be more readable


Side note: this quite huge for a 'net' patch: it would be nice (but not
mandatory) if you could break it in smaller pieces or consider a 'net-
next' target. In the latter case, please note that 'net-next' is
currently closed for the merge window.

Cheers,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ