From patchwork Wed Sep 20 19:10:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 13393257 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73EB5C04FED for ; Wed, 20 Sep 2023 19:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C1WuQt4el7FzMnK15V24eBVeBT9oxJIFmQaoGy+BwyQ=; b=x8pjSC6NaEkUaf SndQx3JHowvAaqZaodLIusZFiKAEZsu1yBp8I/1zfk6m4O7vVo4diPr6vuob/Py/ul+PWWNZzcqa/ sQ22sn+COI8jQ94RW5rrLiME0DWRFu4IEKnUxBPfyGN3kiQT7NBnBKj6DId0mnSk3Ysm/E3wVxrRz 53KCA53x7UgO46+T5V+bimK9nl2pV88bWG9raOO6jvkISIZeENLtnHtLKQ3SzHAUDEJUpYSvUZ0I/ s4F5C8Yo/c+gwHuqWOGW5modPwAnNVvMyH0nh0BGo9d5ax1kUWdEAIUBSYRSOIw5wK0PD8+XM4WRH WlBZHPmJoe2A/VX9ouZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qj2c1-003x4W-08; Wed, 20 Sep 2023 19:11:49 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qj2bs-003wyq-2Q for linux-arm-kernel@lists.infradead.org; Wed, 20 Sep 2023 19:11:42 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5041d6d8b10so364089e87.2 for ; Wed, 20 Sep 2023 12:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695237099; x=1695841899; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KgRtaGDbHaMGWmEwhQaYHn3tA5PgGGeG5k0hEehgseI=; b=WDl+npIWPvRU2uejy8CBf5Zo6pWr0LNFr2jQk2uQlcArk4Lh+Eoo1hS4Kxpj48gkMf qybbnjEjAELh/mzNJLvDMri6Zv1xTq0axNRcV8S0/kCKq2LPAhF5lpU90OkEmX0QZbpL fwRskcOwRGKbfUbbvGTaFgAutkHpQVhufy0isUfWzQppT0fzhdvePpybX1ifcr2jSwKz Us0ukOf+eVqgNcfwobdhjCG3vSJjkBO5zDGuusbsr7j5z037fSaKY12kloicFTkJFDK9 PXniUHpjKin6jvsWCAG+qZax47KORAclJvX5l8UTZm4Hm5OD0XANwAQAGr5fmlmrdUi1 dqlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695237099; x=1695841899; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KgRtaGDbHaMGWmEwhQaYHn3tA5PgGGeG5k0hEehgseI=; b=EeTEhRhxJHjwSvVLp506CA1/TcWNKQ6aKj1okHFRFVLsFQNqjEWTa9WEGA/wpQ4khj 6TdNiWFN0UEceKb7upk+dGq5cNbeMGY+IOlzHvcyN1GaA3ogWJXA1Po0/aP5BZuN9VZj nd9iWAxKhf25cLIeCt+A7jAo3nvxNzAvciSq7Wsm8BDzbjv6aDgLgo7V7FX+cdjcy9HV jlOK6/YYG09+huTFt46upQqE965kbFG9nA8u826UREuIsQBZ+5U0KhucC/y/bzXePlQ7 3VdO4t3WqpUaAbZF5r93bbobLWsqKwEX7SyRaSrNaOGa3BKI81GZGzRo/dQMmpAQnGJ/ QWlA== X-Gm-Message-State: AOJu0YzspaSVItMf8VDttPmfy0vVB6m2Y1fSAegQ2POVIyt0NKgFyETk yKHmAlyc2IcUPboQUUmYzIc= X-Google-Smtp-Source: AGHT+IGya33WFhxdC4EYABqaLXroOtVCi7s5LjlnqRdO5Il1/r9BwISYxMeCX7Y4TK9B9L7NOKN2rw== X-Received: by 2002:a05:6512:a8b:b0:502:ff3b:7670 with SMTP id m11-20020a0565120a8b00b00502ff3b7670mr4078855lfu.4.1695237099249; Wed, 20 Sep 2023 12:11:39 -0700 (PDT) Received: from localhost ([178.176.81.142]) by smtp.gmail.com with ESMTPSA id eq14-20020a056512488e00b004fe2a7a2ee2sm2794990lfb.160.2023.09.20.12.11.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 12:11:38 -0700 (PDT) From: Serge Semin To: Michal Simek , Alexander Stein , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter Cc: Serge Semin , Punnaiah Choudary Kalluri , Dinh Nguyen , Arnd Bergmann , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 07/20] EDAC/synopsys: Use platform device devm ioremap method Date: Wed, 20 Sep 2023 22:10:31 +0300 Message-ID: <20230920191059.28395-8-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230920191059.28395-1-fancer.lancer@gmail.com> References: <20230920191059.28395-1-fancer.lancer@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230920_121140_808072_F1E65B99 X-CRM114-Status: GOOD ( 13.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DW DDRs CSRs resource descriptor is used by the devm_ioremap_resource() function invocation only in the driver probe method. Thus convert the platform_get_resource() and devm_ioremap_resource() couple to just a single devm_platform_ioremap_resource() method call. Signed-off-by: Serge Semin --- drivers/edac/synopsys_edac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 6b81ac9dda8b..afe9f475cb4e 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -1335,11 +1335,9 @@ static int mc_probe(struct platform_device *pdev) struct synps_edac_priv *priv; struct mem_ctl_info *mci; void __iomem *baseaddr; - struct resource *res; int rc; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - baseaddr = devm_ioremap_resource(&pdev->dev, res); + baseaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(baseaddr)) return PTR_ERR(baseaddr);