[PATCH 04/10] pci: devres: make devres region requests consistent

andy.shevchenko at gmail.com andy.shevchenko at gmail.com
Tue Jan 16 21:29:32 UTC 2024


Mon, Jan 15, 2024 at 03:46:15PM +0100, Philipp Stanner kirjoitti:
> Now that pure managed region request functions are available, the
> implementation of the hybrid-functions which are only sometimes managed
> can be made more consistent and readable by wrapping those
> always-managed functions.
> 
> Implement a new pcim_ function for exclusively requested regions.
> Have the pci_request / release functions call their pcim_ counterparts.
> Remove the now surplus region_mask from the devres struct.

...

> +	if (pci_is_managed(pdev)) {
> +		if (exclusive == IORESOURCE_EXCLUSIVE)
> +			return pcim_request_region_exclusive(pdev, bar, res_name);
> +		else

Redundant 'else'

> +			return pcim_request_region(pdev, bar, res_name);
> +	}

-- 
With Best Regards,
Andy Shevchenko




More information about the dri-devel mailing list