From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 001E4C3A5A9 for ; Wed, 4 Sep 2019 13:45:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5F812339E for ; Wed, 4 Sep 2019 13:44:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730364AbfIDNo6 (ORCPT ); Wed, 4 Sep 2019 09:44:58 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6648 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730193AbfIDNo6 (ORCPT ); Wed, 4 Sep 2019 09:44:58 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E8D62AD8F65EA95B1582; Wed, 4 Sep 2019 21:44:52 +0800 (CST) Received: from [127.0.0.1] (10.202.227.238) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 21:44:42 +0800 Subject: Re: [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code To: YueHaibing , , References: <20190904130256.24704-1-yuehaibing@huawei.com> CC: , From: John Garry Message-ID: Date: Wed, 4 Sep 2019 14:44:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20190904130256.24704-1-yuehaibing@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: YueHaibing Acked-by: John Garry > --- > 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; > >