From patchwork Fri Feb 16 14:40:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13560109 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 A6CEBC48260 for ; Fri, 16 Feb 2024 14:40:55 +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:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TSpz53EbYxrFlxLlqKoOEPp4ACitOiO0DaQkLBPKmgo=; b=Bza+eiSYrIjTHx 2isIgZIY/Yn9KY/gRYiOi4egXiJ/1xgrTR2FEY85TN2bNbWYAiR2+Rp2wvezfAQHWTiZuZPJo5hZK BBH+Zogveh7Qc2ERjkTMUAfp9eRBLqsiakvRAR+fUg46tbdsrOGr+M2qFESEBExCg+/FbLltqckTw AMtfrR4VhE8NVbSU0mP0SYPK3W1wjUsB/VcwrW2NZGYNqt+CccBJtxQMu/yfaswCxegpPYwv3uyEQ hkOywL6sVRBIEg/FQjbtCkYJZa4dc8jHuLusAphoWuBjpchGFJ+fsM2W9ZOVwop1WM/amVedTVi5y lkXDIuPbF3yXVqRuoT9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1razOV-00000002d5L-2JRg; Fri, 16 Feb 2024 14:40:51 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1razOK-00000002cwo-0tWL for linux-rockchip@lists.infradead.org; Fri, 16 Feb 2024 14:40:42 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a3d159220c7so118249066b.2 for ; Fri, 16 Feb 2024 06:40:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708094439; x=1708699239; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ddHRp/a7ql2hO4wtU3P1Kr5z86y1yTWMkn8d+hM85z0=; b=mALWrGfCuanbZB4Sbwbb2rGhCZUe6wqvI6Oghn7Q3AdtI85qf9eGn+eWJrZiEZE+89 5buvZln+dPVfAn9aKeenu6C6m7k4BDIY7DAImvTTG1rvr9RVKqjD0+zZlyrgCpx5MTbc CaLmp6UqDJUpYMAnzp1RAbAnTzQlPSwuRmPWUjxbiLQ5Y9AZyHvgVLyzRkYY93oJXQoI p+2xvgbqJ7y7w+XmNMz2++dooJ1ERIWYvk6konGp313vVrWs4pfPQDaEhfHyF7Ywu1Hh zLLZdCMLfBV+GNjA6h7EDr9Q5kmGgQzwhGzPgEzdlK7hNTAoE2RdxPEVJGPT7tFPslet 1g9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708094439; x=1708699239; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ddHRp/a7ql2hO4wtU3P1Kr5z86y1yTWMkn8d+hM85z0=; b=c0co8Y8iaasb7buDU64cma7k1hBINIshKJBMiy15STtFefvgvvfIB8YDLRqe5ZYS+5 VroSBLJrYgAwyQi68OoecXd1SLP1XCXJ7TGuAHNNc1sl9fzzQe1gNNKPRYdOkHQU61DS lK4u2L+Ke10zPUzx3daDm304GP7oTxY29iibjC6Vj+iVMzn1e3EXF2FFKNTUy5eBQlK8 5ya0Dxmke0/X5VDLJM9bndT/CJhcMC8Lipd16tcBhKKkSbEyhEpLkAyPRysGcq5UKpfO AAmn3unYAxyGfn06UrFsxtztRXQpYRUYEe+HvP4fATEnhzFCkTXD3NBKZ6Rq8FZa0V63 N52w== X-Forwarded-Encrypted: i=1; AJvYcCV858m2X9mqJafvlB6jVKx+Wi7QsFZkYO12t+EUqvWge7Yxnuvc2jkXD9k7cw+gTN89xPRL8Zl6HDlBaPNo95q9EbzQ3LOO4BY62x9TvGbcxbcG X-Gm-Message-State: AOJu0Yx73hw+CqO74OcDXWWnKhGMR03Ci0YYSj7T2y7Q4fiOTOwTlagD CmzShQ82XiefeceXX02QkqFRIiwM5Hy3Sq9MCpXWlLFLNq4dxq+r6Jv169xgPDU= X-Google-Smtp-Source: AGHT+IFjUr0pwHx7I9NJd2MhgZLwiZF/Q3I4EAlN6VBXxRxf0gB7BEu6U93gT2kjFbtxE6rZ4t4ByQ== X-Received: by 2002:a17:906:d7bb:b0:a3d:704:d688 with SMTP id pk27-20020a170906d7bb00b00a3d0704d688mr3675983ejb.47.1708094438802; Fri, 16 Feb 2024 06:40:38 -0800 (PST) Received: from krzk-bin.. ([78.10.207.130]) by smtp.gmail.com with ESMTPSA id a8-20020a170906670800b00a3ce3c5b2a4sm1592942ejp.195.2024.02.16.06.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 06:40:38 -0800 (PST) From: Krzysztof Kozlowski To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Joerg Roedel , Will Deacon , Robin Murphy , Rob Clark , Marek Szyprowski , Krzysztof Kozlowski , Alim Akhtar , Bjorn Andersson , Konrad Dybcio , Yong Wu , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner , Orson Zhai , Baolin Wang , Chunyan Zhang , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Krishna Reddy , Jonathan Hunter , Jean-Philippe Brucker , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, virtualization@lists.linux.dev Subject: [PATCH 4/4] iommu: re-use local fwnode variable in iommu_ops_from_fwnode() Date: Fri, 16 Feb 2024 15:40:27 +0100 Message-Id: <20240216144027.185959-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240216144027.185959-1-krzysztof.kozlowski@linaro.org> References: <20240216144027.185959-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240216_064040_406685_2D1625AE X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org iommu_ops_from_fwnode() stores &iommu_spec->np->fwnode in local variable, so use it to simplify the code (iommu_spec is not changed between these dereferences). Signed-off-by: Krzysztof Kozlowski --- drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 719652b60840..3afe0b48a48d 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -29,7 +29,7 @@ static int of_iommu_xlate(struct device *dev, !of_device_is_available(iommu_spec->np)) return -ENODEV; - ret = iommu_fwspec_init(dev, &iommu_spec->np->fwnode, ops); + ret = iommu_fwspec_init(dev, fwnode, ops); if (ret) return ret; /*