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: <88820f7dabff4561be5bfe0362f70c14@baidu.com>
Date:   Wed, 29 Sep 2021 02:53:43 +0000
From:   "Cai,Huoqing" <caihuoqing@...du.com>
To:     "Cai,Huoqing" <caihuoqing@...du.com>
CC:     John Garry <john.garry@...wei.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: hisi_sas: Make use of the helper function
 devm_platform_ioremap_resource()

Hello,

Drop this patch.
Because sgpio_regs is optional which is used like this
	if (!hisi_hba->sgpio_regs)
		return -EOPNOTSUPP;

> -----Original Message-----
> From: Cai,Huoqing <caihuoqing@...du.com>
> Sent: 2021年9月1日 16:52
> To: Cai,Huoqing
> Cc: John Garry; James E.J. Bottomley; Martin K. Petersen; linux-
> scsi@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] scsi: hisi_sas: Make use of the helper function
> devm_platform_ioremap_resource()
> 
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
> 
> Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
> ---
>  drivers/scsi/hisi_sas/hisi_sas_main.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c
> b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index 9515c45affa5..0c2309c951ab 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -2649,12 +2649,9 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct
> platform_device *pdev,
>  	if (IS_ERR(hisi_hba->regs))
>  		goto err_out;
> 
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -	if (res) {
> -		hisi_hba->sgpio_regs = devm_ioremap_resource(dev, res);
> -		if (IS_ERR(hisi_hba->sgpio_regs))
> -			goto err_out;
> -	}
> +	hisi_hba->sgpio_regs = devm_platform_ioremap_resource(pdev, 1);
> +	if (IS_ERR(hisi_hba->sgpio_regs))
> +		goto err_out;
> 
>  	if (hisi_sas_alloc(hisi_hba)) {
>  		hisi_sas_free(hisi_hba);
> --
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ