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: <aCXlWoPm2XVA5m7M@smile.fi.intel.com>
Date: Thu, 15 May 2025 16:00:10 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Philipp Stanner <phasta@...nel.org>
Cc: Jonathan Corbet <corbet@....net>, Bjorn Helgaas <bhelgaas@...gle.com>,
	Mark Brown <broonie@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Zijun Hu <quic_zijuhu@...cinc.com>,
	Yang Yingliang <yangyingliang@...wei.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org
Subject: Re: [PATCH 4/7] PCI: Remove request_flags relict from devres

On Thu, May 15, 2025 at 02:46:02PM +0200, Philipp Stanner wrote:
> pcim_request_region_exclusive(), the only user in PCI devres that needed
> exclusive region requests, has been removed.
> 
> All features related to exclusive requests can, therefore, be removed,
> too. Remove them.

...

>  int pcim_request_region(struct pci_dev *pdev, int bar, const char *name)
>  {
> -	return _pcim_request_region(pdev, bar, name, 0);
> +	int ret;
> +	struct pcim_addr_devres *res;
> +
> +	if (!pci_bar_index_is_valid(bar))
> +		return -EINVAL;
> +
> +	res = pcim_addr_devres_alloc(pdev);
> +	if (!res)
> +		return -ENOMEM;
> +	res->type = PCIM_ADDR_DEVRES_TYPE_REGION;
> +	res->bar = bar;
> +
> +	ret = __pcim_request_region(pdev, bar, name, 0);

> +	if (ret != 0) {

While at it, drop the  ' != 0' part?

> +		pcim_addr_devres_free(res);
> +		return ret;
> +	}
> +
> +	devres_add(&pdev->dev, res);
> +	return 0;
>  }

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ