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]
Message-ID: <CAHp75VcvrM0qLQE-04UZEkxbAvkE-MNSN7RGC7mPxj+1hoUyTw@mail.gmail.com>
Date:   Thu, 16 Dec 2021 16:59:44 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Akhil R <akhilrajeev@...dia.com>
Cc:     Wolfram Sang <wsa@...nel.org>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Christian Koenig <christian.koenig@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Dmitry Osipenko <digetx@...il.com>,
        Laxman Dewangan <ldewangan@...dia.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Jon Hunter <jonathanh@...dia.com>,
        linux-i2c <linux-i2c@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-tegra <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH 2/2] i2c: smbus: Use device_ functions instead of of_

On Thu, Dec 16, 2021 at 3:14 PM Akhil R <akhilrajeev@...dia.com> wrote:
>
> Change of_ functions to device_ for firmware agnostic usage.

of_*()
device_*()

> This allows to have smbus_alert interrupt without any changes
> in the controller drivers using ACPI table.

...

> -       irq = of_property_match_string(adapter->dev.of_node, "interrupt-names",
> -                                      "smbus_alert");
> +       irq = device_property_match_string(adapter->dev.parent, "interrupt-names",
> +                                          "smbus_alert");

Hmm... Adapter device node is not the same as the node for its parent.
Do you have some code that propagates of_node from parent to child?

I.o.w. I would expect to see

       irq = device_property_match_string(&adapter->dev, "interrupt-names",

here.

>         if (irq == -EINVAL || irq == -ENODATA)
>                 return 0;
>         else if (irq < 0)

TBH the entire code smells. "Interesting" way of getting an optional
named interrupt.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ