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:   Thu, 10 Aug 2023 13:32:41 +0100
From:   Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To:     Komal Bajaj <quic_kbajaj@...cinc.com>, agross@...nel.org,
        andersson@...nel.org, konrad.dybcio@...aro.org, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        srinivas.kandagatla@...aro.org
Cc:     linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] soc: qcom: Add LLCC support for multi channel DDR

On 10/08/2023 07:11, Komal Bajaj wrote:
> +	ret = nvmem_cell_read_u8(&pdev->dev, "multi-chan-ddr", cfg_index);
> +	if (ret == -ENOENT || ret == -EOPNOTSUPP) {
> +		if (num_config != DEF_NUM_CFG)
> +			return -EINVAL;

In other words if multi-chan-ddr is not present in the dts and the 
num_config != 1 return -EINVAL

You can just as easily say if (num_config > 1) and drop the define from 
this code.

> +		*cfg_index = DEF_NUM_CFG - 1;
> +		return 0;

*cfg_index = 0;

For example if #define DEF_NUM_CFG 0x20 then taking the last index of it 
would be 100% wrong.

Please kill that define.

---
bod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ