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: Mon, 19 Feb 2024 22:37:37 +0200
From: andy.shevchenko@...il.com
To: Dylan Hung <dylan_hung@...eedtech.com>
Cc: alexandre.belloni@...tlin.com, jk@...econstruct.com.au, joel@....id.au,
	u.kleine-koenig@...gutronix.de, gustavoars@...nel.org,
	krzysztof.kozlowski@...aro.org, zenghuchen@...gle.com,
	matt@...econstruct.com.au, linux-i3c@...ts.infradead.org,
	linux-kernel@...r.kernel.org, BMC-SW@...eedtech.com
Subject: Re: [PATCH] i3c: dw: Disable IBI IRQ depends on hot-join and SIR
 enabling

Fri, Jan 19, 2024 at 01:45:47PM +0800, Dylan Hung kirjoitti:
> Disable IBI IRQ signal and status only when hot-join and SIR enabling of
> all target devices attached to the bus are disabled.

> Fixes: e389b1d72a62 ("i3c: dw: Add support for in-band interrupts")
> 
> Signed-off-by: Dylan Hung <dylan_hung@...eedtech.com>

Tag block is not supposed to have blank lines.

..

> @@ -1163,8 +1163,10 @@ static void dw_i3c_master_set_sir_enabled(struct dw_i3c_master *master,
>  		global = reg == 0xffffffff;
>  		reg &= ~BIT(idx);
>  	} else {
> -		global = reg == 0;
> +		bool hj_rejected = !!(readl(master->regs + DEVICE_CTRL) & DEV_CTRL_HOT_JOIN_NACK);

'!!()' is redundant.

> +
>  		reg |= BIT(idx);
> +		global = (reg == 0xffffffff) && hj_rejected;
>  	}

Moreover, you can refactor a bit both branches, like

	bool hj_rejected = true;
	...
	if (...) {
		...
	} else {
		hj_rejected = readl(master->regs + DEVICE_CTRL) & DEV_CTRL_HOT_JOIN_NACK;
		...
	}
	global = (reg == 0xffffffff) && hj_rejected;


-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ