[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YrC1ymfSJ3nxWw4B@smile.fi.intel.com>
Date: Mon, 20 Jun 2022 21:00:42 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Marcin Wojtas <mw@...ihalf.com>
Cc: linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
netdev@...r.kernel.org, rafael@...nel.org, lenb@...nel.org,
andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
olteanv@...il.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, linux@...linux.org.uk,
hkallweit1@...il.com, gjb@...ihalf.com, jaz@...ihalf.com,
tn@...ihalf.com, Samer.El-Haj-Mahmoud@....com,
upstream@...ihalf.com
Subject: Re: [net-next: PATCH 11/12] net: dsa: mv88e6xxx: switch to
device_/fwnode_ APIs
On Mon, Jun 20, 2022 at 05:02:24PM +0200, Marcin Wojtas wrote:
> In order to support both ACPI and DT, modify the generic
> DSA code to use device_/fwnode_ equivalent routines.
> No functional change is introduced by this patch.
...
> int err;
>
> - if (!np && !pdata)
> + if (!fwnode && !pdata)
> return -EINVAL;
Sounds like redundant check
if (pdata)
...
else
compat_info = ...
if (!compat_info)
return -EINVAL
?
> - if (np)
> - compat_info = of_device_get_match_data(dev);
> + if (fwnode)
> + compat_info = device_get_match_data(dev);
>
> if (pdata) {
Missed 'else' even in the original code (see above)?
> compat_info = pdata_device_get_match_data(dev);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists