mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Cai,Huoqing" <caihuoqing@baidu.com>
To: "Cai,Huoqing" <caihuoqing@baidu.com>
Cc: John Garry <john.garry@huawei.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] scsi: hisi_sas: Make use of the helper function devm_platform_ioremap_resource()
Date: Wed, 29 Sep 2021 02:53:43 +0000	[thread overview]
Message-ID: <88820f7dabff4561be5bfe0362f70c14@baidu.com> (raw)
In-Reply-To: <20210901085207.31254-1-caihuoqing@baidu.com>

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@baidu.com>
> Sent: 2021年9月1日 16:52
> To: Cai,Huoqing
> Cc: John Garry; James E.J. Bottomley; Martin K. Petersen; linux-
> scsi@vger.kernel.org; linux-kernel@vger.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@baidu.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


      reply	other threads:[~2021-09-29  2:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  8:52 Cai Huoqing
2021-09-29  2:53 ` Cai,Huoqing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88820f7dabff4561be5bfe0362f70c14@baidu.com \
    --to=caihuoqing@baidu.com \
    --cc=jejb@linux.ibm.com \
    --cc=john.garry@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®