All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: YueHaibing <yuehaibing@huawei.com>, <jejb@linux.ibm.com>,
	<martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code
Date: Wed, 4 Sep 2019 14:44:38 +0100	[thread overview]
Message-ID: <adab136f-330e-1ce5-2a43-f2e19ed7e92d@huawei.com> (raw)
In-Reply-To: <20190904130256.24704-1-yuehaibing@huawei.com>

On 04/09/2019 14:02, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: John Garry <john.garry@huawei.com>

> ---
>  drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index d60eaaa..d34e398 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -2579,8 +2579,7 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct platform_device *pdev,
>  		goto err_out;
>  	}
>
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	hisi_hba->regs = devm_ioremap_resource(dev, res);
> +	hisi_hba->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(hisi_hba->regs))
>  		goto err_out;
>
>



  reply	other threads:[~2019-09-04 13:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 13:02 [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-09-04 13:44 ` John Garry [this message]
2019-09-07 20:41 ` Martin K. Petersen

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=adab136f-330e-1ce5-2a43-f2e19ed7e92d@huawei.com \
    --to=john.garry@huawei.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yuehaibing@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.