From patchwork Mon Dec 23 18:59:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11308687 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C1A217EE for ; Mon, 23 Dec 2019 18:59:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF751207FF for ; Mon, 23 Dec 2019 18:59:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eb4L4pil" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726879AbfLWS7W (ORCPT ); Mon, 23 Dec 2019 13:59:22 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:56050 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726756AbfLWS7W (ORCPT ); Mon, 23 Dec 2019 13:59:22 -0500 Received: by mail-pj1-f67.google.com with SMTP id d5so139163pjz.5; Mon, 23 Dec 2019 10:59:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=TCR4AR5ucUHlq9yNJFguI2NxlI68W/tsOUZcT+YMNl0=; b=eb4L4pil+JCG+cmdA0+Y497EM/NtrHh8JtUYUrydX0icSwue7g/LT7YybIYtTTcV/M MDaDFzfK3rGsshR2RJN/EE3X86kt4E4btFV3briwaxtCutIASq/3rWfK0hgKIeBr+pCL 1DrjLmswrvXHxs3IvDOhgMcK+NehUow+N4Tv6eZIfMecsqBWCVjOwfJB/B9FMksOPQ/b fk3OA/ihwGFJVxTedK7BuI7EMQMK1YysKr8bZUBHso5sGbkgqhpLR2KssbBPoVEOEyug qB+K4Y29piISqu3qBMy6P1HWvW8dFPImPXFO3HIM7wgp0lRloRUfgj2KHzIbucnt9eu/ uC1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TCR4AR5ucUHlq9yNJFguI2NxlI68W/tsOUZcT+YMNl0=; b=U9Y7nV/SY6xQBlPC97tb8MnkxZBWS/o/pECUDfaZsMimPjH/nsM+yqMC37TtxKupIR 9eQ/GbPAV0Dw9x89c9P8dOXn6XX0ivvCPoz+m/UvHCiKJEiPQR0BubuPo0i0cysTOzTi Ia9Zra1B2+Y9Km5gAbIY+kRhAFj3FSUBkz5fEkx+PjC8ghagmq9Oa3Dw1aCOHG8IHamw DhCO1m7+Bp9zjJfCV2562B27bKamL/jwpcJ3/7JdFbTs/ESfjB9NasJsIsprpnpBKGKV aWUBrB8IybDOCgmVbnH5MvqrbK8YUj4oBNbev4nwcJEU1OUXMqI99EuVvFPKITmYIwlU JTyA== X-Gm-Message-State: APjAAAWTJDrYvrL3cUck96A+WT7Fp25g6raGd/twJqqIQBVDCySF7+SL Dz+VVyvUkXArOw51PFjV9x4= X-Google-Smtp-Source: APXvYqz84TR8y+QXxgUTlt23B6h//l3KypRdsMB1YXrNQMBidJsu/m2w0mjr/wrZCM0wu9iBN7SuOQ== X-Received: by 2002:a17:902:b186:: with SMTP id s6mr32565870plr.333.1577127561141; Mon, 23 Dec 2019 10:59:21 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id r62sm25858012pfc.89.2019.12.23.10.59.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Dec 2019 10:59:20 -0800 (PST) From: Yangtao Li To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org, krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de, mst@redhat.com, jasowang@redhat.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, virtualization@lists.linux-foundation.org Cc: Yangtao Li Subject: [PATCH 1/6] iommu/omap: convert to devm_platform_ioremap_resource Date: Mon, 23 Dec 2019 18:59:12 +0000 Message-Id: <20191223185918.9877-1-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/iommu/omap-iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index be551cc34be4..297c1be7ecb0 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -1175,7 +1175,6 @@ static int omap_iommu_probe(struct platform_device *pdev) int err = -ENODEV; int irq; struct omap_iommu *obj; - struct resource *res; struct device_node *of = pdev->dev.of_node; struct orphan_dev *orphan_dev, *tmp; @@ -1218,8 +1217,7 @@ static int omap_iommu_probe(struct platform_device *pdev) spin_lock_init(&obj->iommu_lock); spin_lock_init(&obj->page_table_lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - obj->regbase = devm_ioremap_resource(obj->dev, res); + obj->regbase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(obj->regbase)) return PTR_ERR(obj->regbase); From patchwork Mon Dec 23 18:59:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11308659 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5CD66138C for ; Mon, 23 Dec 2019 18:59:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B9F820828 for ; Mon, 23 Dec 2019 18:59:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HqLoU5Ov" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbfLWS71 (ORCPT ); Mon, 23 Dec 2019 13:59:27 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:46847 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726756AbfLWS70 (ORCPT ); Mon, 23 Dec 2019 13:59:26 -0500 Received: by mail-pf1-f193.google.com with SMTP id n9so1726802pff.13; Mon, 23 Dec 2019 10:59:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dMVf+vh+cYX5uqjs+l++BphNgREG8uxW+2Ovm+/JNJw=; b=HqLoU5OvR8ugzzxNAKVEVtBkjiqSufaKIUZEDpKdXp94Y/bUt4KrKLTKl5UQqNAl44 KA1fNRoJ6aNwieatce2GqNLQOnq3UaqeJtl909ctqCyPbdF0LXDmaJcS432q9CSkhn4B dtiCTNvUBMjcOk0W2u3xT65sebwLH0CmduWcb75OfItc8DLFy4cAVoitzIDAMhzcNtfg Io5nLgK9BvT4faeoz5v59U2R5s86MLJT3XvGKf64+RHwRrSqizeESPFrxInRHcYca0GM 6LqgvwaDt95S1xY3LDJ6L2k9xpIofsqFoI/ZRs3ID25B6iWoEeKIDGA52xAh1bQzdw9z aAjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dMVf+vh+cYX5uqjs+l++BphNgREG8uxW+2Ovm+/JNJw=; b=HU3amjks5bQfXdBjfJkWJcWIL03cd3XgWHZBUhYjZVrvA1FEWEXEy53QSvQTl9tHTG g/YJbqswuM8e1sDkVJaIscOa2wdlB0rsgBO7p4OSSvk8FMHG/9Pmv3VdNJC8giM6b9mW 90hyOlcAygHOOVIw4utH9cmcQMSNYQuWUFeFsZKv31X0cN9TVpbWuNL2FbQ7RlboCjAp PLOjRK5aRkQSiyOID9e/TaK/rhDvHZMdHooH5NMxfmXL7XrofTjI+HL7ZxJCp/vLb85L 93pP8SMgv9lRH4vQmlmlSdom8nYslaLxuNSSE7KTL1lnQYtT1c+3E/lhYqnRarq1nsPg Leug== X-Gm-Message-State: APjAAAW/RYaAuTHEpDU3BO+EoAmyGSfUM3+zg1znNjJ74CssurRVNDnR t4WpD0pZivhykaaZFIl6qJtuQybArkg= X-Google-Smtp-Source: APXvYqzDhJWagEWSF5CD+5+GERxPnQgzx1vAVm8NgEcWmvblC2Ftuyzdp3PuA5nDZwdfH/7PhfYRpw== X-Received: by 2002:a62:3343:: with SMTP id z64mr32628043pfz.150.1577127565404; Mon, 23 Dec 2019 10:59:25 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id u12sm3892956pfm.165.2019.12.23.10.59.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Dec 2019 10:59:25 -0800 (PST) From: Yangtao Li To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org, krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de, mst@redhat.com, jasowang@redhat.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, virtualization@lists.linux-foundation.org Cc: Yangtao Li Subject: [PATCH 2/6] iommu/exynos: convert to devm_platform_ioremap_resource Date: Mon, 23 Dec 2019 18:59:14 +0000 Message-Id: <20191223185918.9877-3-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com> References: <20191223185918.9877-1-tiny.windzz@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/iommu/exynos-iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 186ff5cc975c..42d8407267ef 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -571,14 +571,12 @@ static int exynos_sysmmu_probe(struct platform_device *pdev) int irq, ret; struct device *dev = &pdev->dev; struct sysmmu_drvdata *data; - struct resource *res; data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); if (!data) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->sfrbase = devm_ioremap_resource(dev, res); + data->sfrbase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(data->sfrbase)) return PTR_ERR(data->sfrbase); From patchwork Mon Dec 23 18:59:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11308663 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA5DC14F6 for ; Mon, 23 Dec 2019 18:59:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 99394207FF for ; Mon, 23 Dec 2019 18:59:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RjgIjnGy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726756AbfLWS72 (ORCPT ); Mon, 23 Dec 2019 13:59:28 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:37150 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbfLWS72 (ORCPT ); Mon, 23 Dec 2019 13:59:28 -0500 Received: by mail-pj1-f68.google.com with SMTP id m13so149308pjb.2; Mon, 23 Dec 2019 10:59:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bLznaHMy4KKZ0cyTMqudvu5r2Rqk/jELD1oKLNSR2dU=; b=RjgIjnGy+JvVdj2w8xB8Td7Jcp/uaEDjiyOG1FJNw7ItOBOMlDiBexx/UkW6dkkAGm voY0QC4zCFHaNyKdZbneErqsNlEEsUkH+mUTUEX4IGwRuLutautx5/QiGR7Dg54OfMF4 Pzd2xf3gtJb7iLRKy3oLhDhaoannVg2g07KyLU/4m8Tg9yffQkks69i7RNV4T7iLy6Dw leXWNSpzbps7unh9oz1fwH+msb7iJL7CO2jLuJIISG1WX9/pxpG18Yu7So73y4H8ZtNa 74d58L/NAst17PBprENwJOgzCuTFMGvNh/uHdQUQxylZpO1+sNfkhBafPyxxAqhwGPS0 uB1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bLznaHMy4KKZ0cyTMqudvu5r2Rqk/jELD1oKLNSR2dU=; b=evNxMDDKKycYBgs+NZJ8htDJPjne26ZZnI6PLp6unplTH7K4xigOe5r9dZwHkw9DAq ndbZvGUaMytBxJ6B9jvhyN075UwVPVyzi+Fi9glZMx1iQjpgXXKitBlKgETLACS6/J0W +nWdihzOPfk3vOxqz7jr5UVKsbnWgHHGc4M7ZseMomtAfEVcB+JI3x7qpXYKPBo+qWDh JSNmFMrYcG6p3JvkDZFnmAkETFcQv3qHYOFnIYpGxBCEL6On02E4dCIhds6zQqnjugWK uIJwEkUirdbty1/DEYAo4LRV9/lKFXkKH/ky5rR5CZre40JSxc0hfoUQvuNDb/UtQrCv 15mg== X-Gm-Message-State: APjAAAU8aOqtTWMOLHsG4XN1kQ319pd7Gohoa2c1tprENWH/7lo3GDhf xESx+O4WI5TzG6Zur9XELa4= X-Google-Smtp-Source: APXvYqwSmasDf38gpvZQ5kYkHfbJ9oeF2AFKtP2Fehgro57BEHYXKQsly+hr8s0/HHHdkDEArOHtIA== X-Received: by 2002:a17:902:b788:: with SMTP id e8mr32700948pls.1.1577127567423; Mon, 23 Dec 2019 10:59:27 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id x4sm25703139pff.143.2019.12.23.10.59.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Dec 2019 10:59:26 -0800 (PST) From: Yangtao Li To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org, krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de, mst@redhat.com, jasowang@redhat.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, virtualization@lists.linux-foundation.org Cc: Yangtao Li Subject: [PATCH 3/6] iommu/qcom: convert to devm_platform_ioremap_resource Date: Mon, 23 Dec 2019 18:59:15 +0000 Message-Id: <20191223185918.9877-4-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com> References: <20191223185918.9877-1-tiny.windzz@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/iommu/qcom_iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c index 52f38292df5b..bf94d4d67da4 100644 --- a/drivers/iommu/qcom_iommu.c +++ b/drivers/iommu/qcom_iommu.c @@ -709,7 +709,6 @@ static int qcom_iommu_ctx_probe(struct platform_device *pdev) struct qcom_iommu_ctx *ctx; struct device *dev = &pdev->dev; struct qcom_iommu_dev *qcom_iommu = dev_get_drvdata(dev->parent); - struct resource *res; int ret, irq; ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); @@ -719,8 +718,7 @@ static int qcom_iommu_ctx_probe(struct platform_device *pdev) ctx->dev = dev; platform_set_drvdata(pdev, ctx); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctx->base = devm_ioremap_resource(dev, res); + ctx->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ctx->base)) return PTR_ERR(ctx->base); From patchwork Mon Dec 23 18:59:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11308667 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6FCDF14F6 for ; Mon, 23 Dec 2019 18:59:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DFF5207FF for ; Mon, 23 Dec 2019 18:59:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bIrbocA7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726884AbfLWS7b (ORCPT ); Mon, 23 Dec 2019 13:59:31 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45551 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727012AbfLWS7a (ORCPT ); Mon, 23 Dec 2019 13:59:30 -0500 Received: by mail-pg1-f195.google.com with SMTP id b9so9228389pgk.12; Mon, 23 Dec 2019 10:59:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yYuhXbk2VYWkJUHqsC8Dp7ziko2oh3QWGKXaw3BKzKQ=; b=bIrbocA75GjiXkwSJP3C51ubVyAnSLI/fBMTmh6962W79PT4Tqv+1+Mjw3cq7AGKFU jHYIhsxDoH7RHVORa6yJexdhOgetkpm/PkZ6ybiEGu0rEOpFeiagFzU/A8ajKUUkgukz 3AsjKYBf3/aZo2PMmRXKMgxEkfrblyUVI3V0AYfA5DshVaGFTRxoepTY4p6RKBua5+RC hwdBV6ESUTN2NcyHSsnNvmOAqmENn4PYY7sviRlsrgrPKRl79k7z6YX1VvUkJpHwbF8l d6ihCxrqxgEDPq21x1NWyz3OWGl9kB/2yiUVsYw2xw4mEWhcBS8hcPRUPF2UdAVwvS+g 6lSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yYuhXbk2VYWkJUHqsC8Dp7ziko2oh3QWGKXaw3BKzKQ=; b=NzFJe6RgP03ZMnoRN54UVUnQ/iA29zPMlvi7/KTAeziwLAG3RhH3LYBi2s/MiN97gk IWLZwU1UD3CFNSp6Um99QwmeIdT1B1RkS7/QcccYEbV5q3iIpfdMYGSZEJtRpeOnhsVH i4bxRh4afK5K9yNfOgGb04UYXwdtgvkw41AhTT/IR5p7wOMYsS1+0lVCmzvbMwlCTtkl 9f0OsaVqSiKyfDY046IsYo0eRigib0GnBTdQeaMNXH2xD/Ue0AEdfICtBJWRaOA+9oav brbH0aQUxt6y3u8AUcZEKt5S9e/uXsTFjSIilIFtqyCj5rhUKrS89wLSKAAkrjt/JRev y3SA== X-Gm-Message-State: APjAAAW6ByncUoFFtpyo5x5LtEm5skZW1KUfqEs/axVZc7hr0K57IcKp lTvKIgxVODZCOD+dewSX+jU= X-Google-Smtp-Source: APXvYqxUB7sZmq8y8VINmqjxcxw1nx5P7rd/13e79L+vtzHV6ANBCs8nm6SgxE2CIKPWmst9f3sWdw== X-Received: by 2002:aa7:9ab6:: with SMTP id x22mr33198806pfi.260.1577127569760; Mon, 23 Dec 2019 10:59:29 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id e1sm26283596pfl.98.2019.12.23.10.59.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Dec 2019 10:59:29 -0800 (PST) From: Yangtao Li To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org, krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de, mst@redhat.com, jasowang@redhat.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, virtualization@lists.linux-foundation.org Cc: Yangtao Li Subject: [PATCH 4/6] iommu/ipmmu-vmsa: convert to devm_platform_ioremap_resource Date: Mon, 23 Dec 2019 18:59:16 +0000 Message-Id: <20191223185918.9877-5-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com> References: <20191223185918.9877-1-tiny.windzz@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/iommu/ipmmu-vmsa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index d02edd2751f3..3124e28fee85 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -1015,7 +1015,6 @@ static const struct of_device_id ipmmu_of_ids[] = { static int ipmmu_probe(struct platform_device *pdev) { struct ipmmu_vmsa_device *mmu; - struct resource *res; int irq; int ret; @@ -1033,8 +1032,7 @@ static int ipmmu_probe(struct platform_device *pdev) dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40)); /* Map I/O memory and request IRQ. */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mmu->base = devm_ioremap_resource(&pdev->dev, res); + mmu->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mmu->base)) return PTR_ERR(mmu->base); From patchwork Mon Dec 23 18:59:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11308677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9395138C for ; Mon, 23 Dec 2019 18:59:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B4AE4207FF for ; Mon, 23 Dec 2019 18:59:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H2OtLypZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727056AbfLWS7g (ORCPT ); Mon, 23 Dec 2019 13:59:36 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:54131 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727012AbfLWS7c (ORCPT ); Mon, 23 Dec 2019 13:59:32 -0500 Received: by mail-pj1-f68.google.com with SMTP id n96so143598pjc.3; Mon, 23 Dec 2019 10:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CulQ2ExP6GUQxiub5iNVhoHCStywwXMifBLq7s/S0pk=; b=H2OtLypZu26xwRAoHkfmTQ6dLHQpJJ15epMWHv3JdQQs1xiDmnIbBvdX5p8SoP63NR rrDwAR1ojV5CKjmV4nursw0hSVhDYhezg4aNZc5/7bKtI/xLNTNVESyeUS1ReQ8QUzXY UjlHZSp+USG1XCS3YJhbCo1epwt7/p+HAmwZbHV1DoyKW2mpH2yxt1RhlPTT+H9cqBOw AY8x17GodBM0jTcLq3+6EoR945XlFBUaoGwXYyPAfUphbu5u0bI6unawWUIQHMkgTvTe PovOlROY679qDH1MfZR1zkp55JOxaXvP4G4yILAA2rFEV19iB/YsqSyFWlKbgPCqziiM 1imA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CulQ2ExP6GUQxiub5iNVhoHCStywwXMifBLq7s/S0pk=; b=mNKjC5JdBBBo96tgPz75a/1FJxfLj9T6Lmb/T3k7flOFfr9s6Lx38ma4ch1b5py/f8 QvLiOejAAMzCPDRJ/Mby2l7IjGClhS0OC03MDx6Rwrd/RXWOlEpwOdErD6Pg8/r4BDc4 SFca9s0Z9IbWEDnPRhJVMUKmgJ10oTEqpY2xmYtYsizZnuVq8OEYj5it4Hs8ONWWaHia 5HYkb5aUUl/gi9Oi7Bz9xYlSTF+9eMO+kpftzoLuUOPJIMf1acfApATLYQAxM/fHWezb +NH1ax+X72Z3He7B8OGL962uN3X+YMYJJx7AfWS6J8KvLnfUHsBh5+KuZYNaEZp+o5EQ i2Qg== X-Gm-Message-State: APjAAAWoIZXakyWYbdK0BOw0zqXBB2G0Ssrk8KoLh8VlG843nM6jaDh6 nE14IK073bTJsjvv+hVutrA= X-Google-Smtp-Source: APXvYqzeiLM4mhrhwEk4S029shHvVfQZIjFYMq3cAbFIsqix9vo2bHpZaR9lUgguOerS7aVYGUejXg== X-Received: by 2002:a17:902:74c5:: with SMTP id f5mr30567441plt.229.1577127572024; Mon, 23 Dec 2019 10:59:32 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id a19sm209212pju.11.2019.12.23.10.59.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Dec 2019 10:59:31 -0800 (PST) From: Yangtao Li To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org, krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de, mst@redhat.com, jasowang@redhat.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, virtualization@lists.linux-foundation.org Cc: Yangtao Li Subject: [PATCH 5/6] iommu/mediatek: convert to devm_platform_ioremap_resource Date: Mon, 23 Dec 2019 18:59:17 +0000 Message-Id: <20191223185918.9877-6-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com> References: <20191223185918.9877-1-tiny.windzz@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/iommu/mtk_iommu_v1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index e93b94ecac45..3d6bb08b2a54 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -553,7 +553,6 @@ static int mtk_iommu_probe(struct platform_device *pdev) { struct mtk_iommu_data *data; struct device *dev = &pdev->dev; - struct resource *res; struct component_match *match = NULL; struct of_phandle_args larb_spec; struct of_phandle_iterator it; @@ -573,8 +572,7 @@ static int mtk_iommu_probe(struct platform_device *pdev) return -ENOMEM; data->protect_base = ALIGN(virt_to_phys(protect), MTK_PROTECT_PA_ALIGN); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->base = devm_ioremap_resource(dev, res); + data->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(data->base)) return PTR_ERR(data->base); From patchwork Mon Dec 23 18:59:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 11308675 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6778F17EE for ; Mon, 23 Dec 2019 18:59:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 461CD2075B for ; Mon, 23 Dec 2019 18:59:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sj3ScPvY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727072AbfLWS7g (ORCPT ); Mon, 23 Dec 2019 13:59:36 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41949 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727050AbfLWS7e (ORCPT ); Mon, 23 Dec 2019 13:59:34 -0500 Received: by mail-pg1-f195.google.com with SMTP id x8so9234033pgk.8; Mon, 23 Dec 2019 10:59:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5ZbWphWmX6hvFuVRk+RWFgQofrZKH9eYm1th2d0tMTE=; b=sj3ScPvYKe5RHFI5xmOOMlBPRjGR/tgOjWkESOKIqqPmaDssnIshdfvUqClYJX9tBI aWTj09Nymr7gywt/h1PZWcO4ZCSrk4jUIfNb9EczsWNEBsdXnKKNITMxCjyYVu+s19l7 YAXAq4G5jR40lkSkK0YEvsK99KKl/GnrZZaTiZ3SpESVNG2IP5Ulkq1MmJRItVOmbX6v XMrllxsXefXzoO2sZFtT//QIbDgjkg0TqQCyXeh2aZuxSrgKCrkqi5gQmYuZ8AUI75qV YnI+G38Iba0W+Ixlv9IzdrnX4eE2J66bcVf5qNE5uqUZPU3l5fAfYo7YPXp3fl8fFIqR lw3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5ZbWphWmX6hvFuVRk+RWFgQofrZKH9eYm1th2d0tMTE=; b=J+SLzP1pNZlqKJyp8Eu4ZLuqJcmYs2FHj07OAOMAkKzrUjAdVzC2uBPse68XIM6JXY 7fwRVBMNJCPiXZ0DYXB/Yfmp6XJ2N5gkRW7ALavqImF+axBxfksKK6kUbQVqTamy0O2M UGGeogHyYdAx6i9kUJcWW5T22LWD7FTco5hPansjSkzuxmkZV6S0cwHYBJKRvdaoOmDK C6wYlbzE+pZISQUnn3CGHAAiwYLInuWNngmDNibbFucbQojSR/VusQlB8i1JFWOzyBFD Rvjlghw1ByNm4C5Yxfp3ksiRGsj/YK5w7pr1usIaX3zsxCRu8m0knkzOKhVRv7Ygs5fH oHTA== X-Gm-Message-State: APjAAAX1mH/8AiFIKVm9bbud2jpDIoocyHI8mmTZO1o2/a6ut92ywPDG kVkycrgVCNZyiE/EW7Mt6so= X-Google-Smtp-Source: APXvYqyfnDFqyHRd1X6VzN2h1ANIGyik0u9/k4DGw0m2HkGzu2Jgf7Z0vBWv5sTHp/iv1nwqNbTz6Q== X-Received: by 2002:a63:214f:: with SMTP id s15mr34495783pgm.238.1577127574002; Mon, 23 Dec 2019 10:59:34 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id d5sm21091646pfd.107.2019.12.23.10.59.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Dec 2019 10:59:33 -0800 (PST) From: Yangtao Li To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org, krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de, mst@redhat.com, jasowang@redhat.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, virtualization@lists.linux-foundation.org Cc: Yangtao Li Subject: [PATCH 6/6] iommu/rockchip: convert to devm_platform_ioremap_resource Date: Mon, 23 Dec 2019 18:59:18 +0000 Message-Id: <20191223185918.9877-7-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com> References: <20191223185918.9877-1-tiny.windzz@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/iommu/rockchip-iommu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index b33cdd5aad81..c6d50396f4c2 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1138,7 +1138,6 @@ static int rk_iommu_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct rk_iommu *iommu; - struct resource *res; int num_res = pdev->num_resources; int err, i; @@ -1156,10 +1155,7 @@ static int rk_iommu_probe(struct platform_device *pdev) return -ENOMEM; for (i = 0; i < num_res; i++) { - res = platform_get_resource(pdev, IORESOURCE_MEM, i); - if (!res) - continue; - iommu->bases[i] = devm_ioremap_resource(&pdev->dev, res); + iommu->bases[i] = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(iommu->bases[i])) continue; iommu->num_mmu++;