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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aIhJRp0Y3VsfHabN@pirotess>
Date: Tue, 29 Jul 2025 06:08:38 +0200
From: Ismael Luceno <ismael@...ev.co.uk>
To: Philipp Stanner <phasta@...nel.org>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
	Andrey Utkin <andrey_utkin@...tmail.com>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] media: solo6x10: Replace deprecated PCI functions

On 04/Apr/2025 15:53, Philipp Stanner wrote:
> pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
> Replace them with pcim_iomap_region().
> 
> Signed-off-by: Philipp Stanner <phasta@...nel.org>
> ---
>  drivers/media/pci/solo6x10/solo6x10-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c
> index 6ec1480a6d18..febb2c156cf6 100644
> --- a/drivers/media/pci/solo6x10/solo6x10-core.c
> +++ b/drivers/media/pci/solo6x10/solo6x10-core.c
> @@ -477,10 +477,10 @@ static int solo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  	pci_write_config_byte(pdev, 0x40, 0x00);
>  	pci_write_config_byte(pdev, 0x41, 0x00);
>  
> -	ret = pcim_iomap_regions(pdev, BIT(0), SOLO6X10_NAME);
> +	solo_dev->reg_base = pcim_iomap_region(pdev, 0, SOLO6X10_NAME);
> +	ret = PTR_ERR_OR_ZERO(solo_dev->reg_base);
>  	if (ret)
>  		goto fail_probe;
> -	solo_dev->reg_base = pcim_iomap_table(pdev)[0];
>  
>  	chip_id = solo_reg_read(solo_dev, SOLO_CHIP_OPTION) &
>  				SOLO_CHIP_ID_MASK;

It mostly looks OK, but the error check needs to happen before setting
solo_dev->reg_base, because it's used by free_solo_dev.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ