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] [day] [month] [year] [list]
Date:   Fri, 29 Apr 2022 16:17:23 +0530
From:   Ashish Mhetre <amhetre@...dia.com>
To:     Dmitry Osipenko <dmitry.osipenko@...labora.com>,
        krzysztof.kozlowski@...aro.org, thierry.reding@...il.com,
        jonathanh@...dia.com, digetx@...il.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, linux-kernel@...r.kernel.org,
        linux-tegra@...r.kernel.org, devicetree@...r.kernel.org
Cc:     vdumpa@...dia.com, Snikam@...dia.com
Subject: Re: [Patch v9 1/4] memory: tegra: Add memory controller channels
 support



On 4/29/2022 2:20 PM, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
> 
> 
> On 4/26/22 10:38, Ashish Mhetre wrote:
>> +static int tegra186_mc_map_regs(struct tegra_mc *mc)
>> +{
>> +     struct platform_device *pdev = to_platform_device(mc->dev);
>> +     unsigned int i;
>> +
>> +     mc->bcast_ch_regs = devm_platform_ioremap_resource_byname(pdev, "broadcast");
>> +     if (IS_ERR(mc->bcast_ch_regs)) {
>> +             if (PTR_ERR(mc->bcast_ch_regs) == -EINVAL) {
>> +                     dev_warn(&pdev->dev, "Broadcast channel is missing, please update your device-tree\n");
>> +                     mc->bcast_ch_regs = NULL;
>> +                     return 0;
>> +             }
>> +             return PTR_ERR(mc->bcast_ch_regs);
>> +     }
>> +
>> +     mc->ch_regs = devm_kcalloc(mc->dev, mc->soc->num_channels,
>> +                                sizeof(*mc->ch_regs), GFP_KERNEL);
>> +     if (!mc->ch_regs)
>> +             return -ENOMEM;
>> +
>> +     for (i = 0; i < mc->soc->num_channels; i++) {
>> +             char name[5];
>> +
>> +             snprintf(name, sizeof(name), "ch%u", i);
>> +             mc->ch_regs[i] = devm_platform_ioremap_resource_byname(pdev, name);
>> +             if (IS_ERR(mc->ch_regs[i]))
>> +                     return PTR_ERR(mc->ch_regs[i]);
>> +     }
>> +
>> +     return 0;
>> +}
>> +
>>   const struct tegra_mc_ops tegra186_mc_ops = {
>>        .probe = tegra186_mc_probe,
>>        .remove = tegra186_mc_remove,
>>        .resume = tegra186_mc_resume,
>>        .probe_device = tegra186_mc_probe_device,
>> +     .map_regs = tegra186_mc_map_regs,
>>   };
> 
> Do we really need the map_regs() callback? Could you please move it to
> the tegra186_mc_probe()? .. Sorry, I haven't noticed this previously.

Okay, I'll update this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ