From patchwork Thu Apr 26 14:45:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Pimentel X-Patchwork-Id: 905104 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="NwnFNq5Z"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40X0HZ1NXPz9ry1 for ; Fri, 27 Apr 2018 00:46:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756198AbeDZOqA (ORCPT ); Thu, 26 Apr 2018 10:46:00 -0400 Received: from smtprelay.synopsys.com ([198.182.37.59]:59867 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754727AbeDZOqA (ORCPT ); Thu, 26 Apr 2018 10:46:00 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id D6D291E04CE for ; Thu, 26 Apr 2018 16:45:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1524753959; bh=w96hGM1/j35UZ+oAlWfB2Nsg8tWs2ozxjSf04uYlaso=; h=From:To:Cc:Subject:Date:From; b=NwnFNq5ZY8H3oxnCGvsQh4I/+EODzx3BB+xhXcfLm0o8uFktMSN1ZcWWq8mVbPwjy qPVPvijErJSNsxrZfP29X2DRa+2QXpSlngpxQcMN/gg6imjoQCK9Zl2pCAwzcO7QiR QPynmxBbBB1QFP0Cvuf4gnF0jzxymil/NsUedGKyYn6+jpBq94eLHDGPYhJFLGBHPX Cu2s+jWHlx+uA+rffmLxBYPF2PTM4pea8uL4VoBtM3aa2M760CXiyhAS4OBdwYAViU xeSAtVP+fGWcyDnFTlEyU0UIAA/WKBkUAGw/JZbafi7//fZ52vjebpuTzTZ0C54vJr 8VGgaIc23DdpA== Received: from pt02.synopsys.com (pt02.synopsys.com [10.107.23.240]) by mailhost.synopsys.com (Postfix) with ESMTP id C420E3368; Thu, 26 Apr 2018 07:45:57 -0700 (PDT) Received: from UbuntuMate-64Bits.internal.synopsys.com (gustavo-e7480.internal.synopsys.com [10.107.25.102]) by pt02.synopsys.com (Postfix) with ESMTP id 2621E3D6A1; Thu, 26 Apr 2018 15:45:57 +0100 (WEST) From: Gustavo Pimentel To: bhelgaas@google.com, lorenzo.pieralisi@arm.com, jesper.nilsson@axis.com Cc: linux-pci@vger.kernel.org, gustavo.pimentel@synopsys.com Subject: [PATCH v2] PCI: dwc: artpec6: Use devm_ioremap_resource instead of devm_ioremap_resource Date: Thu, 26 Apr 2018 15:45:55 +0100 Message-Id: <999c344268cf8617b3a48822f30d36f759357cc9.1524753344.git.gustavo.pimentel@synopsys.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org This fix aims to replace the use of devm_ioremap() by devm_ioremap_resource() already discussed on [1]. [1] -> https://lkml.kernel.org/r/20180120001645.GA21343@lenoch Signed-off-by: Gustavo Pimentel Acked-by: Jesper Nilsson --- Change v1->v2: - Changed URL defined on patch description to be as specified in Documentation/process/submitting-patches.rst drivers/pci/dwc/pcie-artpec6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/dwc/pcie-artpec6.c b/drivers/pci/dwc/pcie-artpec6.c index e66cede..321b56c 100644 --- a/drivers/pci/dwc/pcie-artpec6.c +++ b/drivers/pci/dwc/pcie-artpec6.c @@ -463,9 +463,9 @@ static int artpec6_add_pcie_ep(struct artpec6_pcie *artpec6_pcie, ep->ops = &pcie_ep_ops; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi2"); - pci->dbi_base2 = devm_ioremap(dev, res->start, resource_size(res)); - if (!pci->dbi_base2) - return -ENOMEM; + pci->dbi_base2 = devm_ioremap_resource(dev, res); + if (IS_ERR(pci->dbi_base2)) + return PTR_ERR(pci->dbi_base2); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space"); if (!res)