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:   Thu, 27 Oct 2022 08:50:34 -0400
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Yinbo Zhu <zhuyinbo@...ngson.cn>,
        Linus Walleij <linus.walleij@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        zhanghongchen <zhanghongchen@...ngson.cn>
Subject: Re: [PATCH v3 1/2] pinctrl: pinctrl-loongson2: add pinctrl driver
 support

On 27/10/2022 04:20, Yinbo Zhu wrote:
> You can find these code has a change in this code conext.  I have a 
> feedback on this code.  but I mistakenly thought helper is dev_err_probe.
>          res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>          pctrl->reg_base = devm_ioremap_resource(dev, res);
>          if (IS_ERR(pctrl->reg_base))
> -               return PTR_ERR(pctrl->reg_base);
> +               return dev_err_probe(pctrl->dev, PTR_ERR(pctrl->reg_base),
> +                               "unable to map I/O memory");
> 
>          raw_spin_lock_init(&pctrl->lock);
> 
>>
>> There is a helper combining two calls into one. Grep for it in headers
>> and use it.
>>
> You said is that use "devm_platform_get_and_ioremap_resource" as a 
> helper? sorry, I will do it.

I believe the helper is devm_platform_ioremap_resource(), but I never
remember the names so just check in the sources.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ