lkml.org 
[lkml]   [2023]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/6] soc: qcom: Add LLCC support for multi channel DDR
From


On 8/10/2023 6:02 PM, Bryan O'Donoghue wrote:
> 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.

Sure, will make the suggested changes.

>
>> +        *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.

Will remove the macro.

>
> ---
> bod

\
 
 \ /
  Last update: 2023-08-24 11:00    [W:0.057 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site