Re: [net-next: PATCH 11/12] net: dsa: mv88e6xxx: switch to device_/fwnode_ APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux