Thread (36 messages) 36 messages, 5 authors, 2024-08-20

Re: [PATCH 8/9] vdap: solidrun: Replace deprecated PCI functions

From: Andy Shevchenko <andy@kernel.org>
Date: 2024-08-19 18:37:13
Also in: linux-arm-kernel, linux-block, linux-doc, linux-fpga, linux-gpio, linux-pci, lkml, virtualization

On Mon, Aug 19, 2024 at 09:32:00PM +0300, Andy Shevchenko wrote:
On Mon, Aug 19, 2024 at 06:51:48PM +0200, Philipp Stanner wrote:
...
quoted
 	for (i = 0; i < PCI_STD_NUM_BARS; i++) {
+		if (pci_resource_len(pdev, i)) {
Btw, looking at this you may invert the conditional

	for (i = 0; i < PCI_STD_NUM_BARS; i++) {
		if (!pci_resource_len(pdev, i))
			continue;

It might make patch neater.
quoted
+			psnet->bars[i] = pcim_iomap_region(pdev, i, name);
+			if (IS_ERR(psnet->bars[i])) {
+				SNET_ERR(pdev, "Failed to request and map PCI BARs\n");
+				return PTR_ERR(psnet->bars[i]);
+			}
+		}
quoted
 
Blank line leftover.
quoted
 	}
-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help