[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya+CiaFial3Z+9n2@smile.fi.intel.com>
Date: Tue, 7 Dec 2021 17:49:29 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>,
Rajmohan Mani <rajmohan.mani@...el.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Andreas Noever <andreas.noever@...il.com>,
Michael Jamet <michael.jamet@...el.com>,
Yehezkel Bernat <YehezkelShB@...il.com>
Subject: Re: [PATCH v1 1/1] thunderbolt: Do not dereference fwnode in struct
device
On Tue, Dec 07, 2021 at 05:41:43PM +0200, Andy Shevchenko wrote:
> In order to make the underneath API easier to change in the future,
> prevent users from dereferencing fwnode from struct device.
> Instead, use the specific dev_fwnode() API for that.
...
> /* It needs to reference this NHI */
> - if (nhi->pdev->dev.fwnode != args.fwnode)
> + if (dev_fwnode(&nhi->pdev->dev) != args.fwnode)
Alternatively:
if (!device_match_fwnode(&nhi->pdev->dev, args.fwnode))
Tell me. which one you prefer.
> goto out_put;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists