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:   Tue, 15 May 2018 14:53:13 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Dinh Nguyen <dinguyen@...nel.org>, linux-clk@...r.kernel.org
Cc:     dinguyen@...nel.org, mturquette@...libre.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] clk: socfpga: stratix10: use platform driver APIs

Quoting Dinh Nguyen (2018-05-02 07:28:32)
> +       struct resource *res;
>         void __iomem *base;
>  
> -       base = of_iomap(np, 0);
> -       if (!base) {
> +       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +       base = devm_ioremap_resource(dev, res);
> +       if (IS_ERR(base)) {
>                 pr_err("%s: failed to map clock registers\n", __func__);
> -               goto err;
> +               return ERR_CAST(base);
>         }
>  
> -       clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL);
> +       clk_data = devm_kzalloc(dev, sizeof(*clk_data), GFP_KERNEL);
>         if (!clk_data)
> -               goto err;
> +               return ERR_CAST(clk_data);

I had to make these ERR_PTR(-ENOMEM), but otherwise I applied this to
clk-next.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ