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] [day] [month] [year] [list]
Message-ID: <e4d2fa14701092977daa844cf25e7dd7@dev.tdt.de>
Date: Fri, 26 Sep 2025 14:31:28 +0200
From: Florian Eckert <fe@....tdt.de>
To: Jiri Slaby <jirislaby@...nel.org>
Cc: gregkh@...uxfoundation.org, kumaravel.thiagarajan@...rochip.com,
	tharunkumar.pasumarthi@...rochip.com,
	andriy.shevchenko@...ux.intel.com, pnewman@...necttech.com,
	angelogioacchino.delregno@...labora.com, peterz@...radead.org,
	yujiaoliang@...o.com, arnd@...nel.org, cang1@...e.co.uk,
	macro@...am.me.uk, schnelle@...ux.ibm.com,
	Eckert.Florian@...glemail.com, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org
Subject: Re: [PATCH] serial: 8250_pcilib: Replace deprecated PCI functions

>> Signed-off-by: Florian Eckert <fe@....tdt.de>
> ...
>> --- a/drivers/tty/serial/8250/8250_pci.c
>> +++ b/drivers/tty/serial/8250/8250_pci.c
>> @@ -165,7 +165,15 @@ static int
>>   setup_port(struct serial_private *priv, struct uart_8250_port *port,
>>   	   u8 bar, unsigned int offset, int regshift)
>>   {
>> -	return serial8250_pci_setup_port(priv->dev, port, bar, offset, 
>> regshift);
>> +	void __iomem *iomem = NULL;
>> +
>> +	if (pci_resource_flags(priv->dev, bar) & IORESOURCE_MEM) {
>> +		iomem = pcim_iomap(priv->dev, bar, 0);
>> +		if (IS_ERR(iomem))
>> +			return -ENOMEM;
> 
> Why not to propagate the error?

Most other calls in the kernel of this function return
-ENOMEM on error. Therefore, I thought that this is the
correct return value. I can fix that in v2 if you like.
Let me know what you prefer.

> 
> Other than that, LGTM.

Thanks for the review :-)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ