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: <aX3VMloJdfsrLh9i@smile.fi.intel.com>
Date: Sat, 31 Jan 2026 12:10:58 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: abdurrahman@...thop.ai
Cc: Michal Simek <michal.simek@....com>, Andi Shyti <andi.shyti@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v7 1/6] i2c: xiic: skip input clock setup on non-OF
 systems

On Thu, Jan 29, 2026 at 09:43:13PM +0000, Abdurrahman Hussain via B4 Relay wrote:

> The xiic driver supports operation without explicit clock configuration
> when clocks cannot be specified via firmware, such as on ACPI-based
> systems. This behavior is implemented in xiic_setclk(), which returns
> early when either i2c_clk or input_clk are zero.

...

> -	i2c->clk = devm_clk_get_enabled(&pdev->dev, NULL);
> -	if (IS_ERR(i2c->clk))
> -		return dev_err_probe(&pdev->dev, PTR_ERR(i2c->clk),
> -				     "failed to enable input clock.\n");
> +	if (is_of_node(dev->fwnode)) {

Avoid dereferencing fwnode. Use dev_fwnode() API.

> +		i2c->clk = devm_clk_get_enabled(dev, NULL);
> +		if (IS_ERR(i2c->clk))
> +			return dev_err_probe(&pdev->dev, PTR_ERR(i2c->clk),
> +					"failed to enable input clock.\n");
> +	}

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ