Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp732408ybe; Wed, 4 Sep 2019 07:01:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9o0tJ2aMeMZ3xOS1Hp/6FyL9Fsv/Nb0PneTQgSdYzGz8mXWzmSycH04OE5W/mDRLIFrJB X-Received: by 2002:a63:607:: with SMTP id 7mr34985857pgg.240.1567605689385; Wed, 04 Sep 2019 07:01:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605689; cv=none; d=google.com; s=arc-20160816; b=faeanDgoeysXr9NwPhELAK11sid3Pam/HGMCkII6YJLEjexgnhBx3JuyPUAtelOhLo R8Kp8GiMuWkblIYIcNNaBXrjSY17hjah5Z35BDVfc28bctVSaa+LE1I2JdDFaW1x+xjw zmRCNWRZujj/h3ViByDVCZh5M4p+FGAG7027Ec7BHkU5hQMw5lVhaK5CkW9z1vAInj+q kNTrPER5tqS4msKb1NTlkoO2lXmabNqBy/hTk7G42AECKl5mqT2s2OasbMArf4mZmRLD al3IH38MQU1iS9uVNNNqBmFtn9mVcwEC/QQ6keGQMl19BXjhkIIYVZBzHd6PZSlUuNZU c6Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=6fFfsQ+czYG97IYGASldUdBVIFSTXv3FfHBqxpPiVfQ=; b=GHyFLlbfohpVw6dVCC4lK96D4q/+FXNL4o7T5t9WlPq8gH6/Q0rOTHdGlyTesUEGYJ Vg29wr+lIx7NRyyDEeutSzSJUQUMCDCbj/aA3wTROk82xU//rwXSB1ItLNzih2oSHNL6 HC3ABkFa0fJ40hWqiFp+88Mjmk3s9p+lD5M637iX3ID+mo/7TN9ri8f5i/AMA1g5jdI0 hk58S3x0VUZeYLL0NPxu0nN9jLg/q8KHFEwxevoMLtr1zBKXUlyQpDQM/mtC4cgXkw9Z ZCr2nLyJidvi71aom/afaV6nxwYikjnDJgqAcGeKrTUhCk8gSFYVUySbZa1cJfljz5UV pkkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si17407413plo.298.2019.09.04.07.01.12; Wed, 04 Sep 2019 07:01:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730684AbfIDOAE (ORCPT + 99 others); Wed, 4 Sep 2019 10:00:04 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6652 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730648AbfIDOAD (ORCPT ); Wed, 4 Sep 2019 10:00:03 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8E759E7B11A11781131B; Wed, 4 Sep 2019 21:59:55 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 21:59:48 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 07/36] spi: bcm63xx-hsspi: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:58:49 +0800 Message-ID: <20190904135918.25352-8-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190904135918.25352-1-yuehaibing@huawei.com> References: <20190904135918.25352-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/spi/spi-bcm63xx-hsspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 373cb53..c6836a9 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -330,7 +330,6 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) { struct spi_master *master; struct bcm63xx_hsspi *bs; - struct resource *res_mem; void __iomem *regs; struct device *dev = &pdev->dev; struct clk *clk, *pll_clk = NULL; @@ -341,8 +340,7 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) if (irq < 0) return irq; - res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(dev, res_mem); + regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) return PTR_ERR(regs); -- 2.7.4