[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] xen/arm: smmuv3: Constify arm_smmu_get_by_dev() parameter


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 12 May 2023 16:35:34 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+EOFf57ukdpYkZPaaSySVqh3AqlVA38LGW3V5B/W0s8=; b=LQ5UIiKWIIa58EokrfDNQ9Fkmgmvi24rhB5YhqgBV8ZSmjVkmMBZaJLlUGEOY3cP2XQMKetq+TMa1KiuNQ7ee67t1aUif62dcZrNMdvSXqCtY/kMTKNS3XNXVbpwZD7jJgXhQKeGHlaLxJNu3NRRNvmFg/YPoStAt5DATst6svh9ySY+XuP28ULUIC2KsuViI86xlRCgKEPmlNFZHAIWTXUjViBMjTMG1BygVwpaB2xB8bPHbh0k5SGOUWFM4laJBj3VpbOAVFX3GoSNMG1I65dZuMHn1J3d6c96v5nPNVc83xJm1NLeRhuxxFD1mKkZOkI46RNsveFtlFrk+daD0w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZcUfNV3Eu4n4M078M5k5Wi7ZiitlFG6x6XAU+yZ7CH+xOcYeQ4kNzOkCL0HZw1EP1vcLvx4ZH7yuvBNmvVu8ySqXp2/NHfAx0rexXLnwvzoSnnZAG9Qs7yHqgF2k2y1+LxBCqXvpxjfzyk8YyiBJ2GOuo8OEwR+W87O5iN5hpiCloDeQJdvBPZBQP9D0jBNB7HA4f2O/5kvrmJUoGAJ0n8cgc7Mxno4NGhcJsqCGwHyWjUV2MwJrroDWHdiyEVnLWCTb7WapYP+ACn8M5J47H3/CCUBNtgBC7/cfS5/Xmu2Cf98V9HoDaEEuEQS0Qkgg6xi5S1r9rK+IX8jWPA/MMQ==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 12 May 2023 14:35:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This function does not modify its parameter 'dev' and it is not supposed
to do it. Therefore, constify it.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 xen/drivers/passthrough/arm/smmu-v3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/passthrough/arm/smmu-v3.c 
b/xen/drivers/passthrough/arm/smmu-v3.c
index bfdb62b395ad..bf053cdb6d5c 100644
--- a/xen/drivers/passthrough/arm/smmu-v3.c
+++ b/xen/drivers/passthrough/arm/smmu-v3.c
@@ -1468,7 +1468,7 @@ static bool arm_smmu_sid_in_range(struct arm_smmu_device 
*smmu, u32 sid)
        return sid < limit;
 }
 /* Forward declaration */
-static struct arm_smmu_device *arm_smmu_get_by_dev(struct device *dev);
+static struct arm_smmu_device *arm_smmu_get_by_dev(const struct device *dev);
 
 static int arm_smmu_add_device(u8 devfn, struct device *dev)
 {
@@ -2556,7 +2556,7 @@ static int __must_check arm_smmu_iotlb_flush(struct 
domain *d, dfn_t dfn,
        return arm_smmu_iotlb_flush_all(d);
 }
 
-static struct arm_smmu_device *arm_smmu_get_by_dev(struct device *dev)
+static struct arm_smmu_device *arm_smmu_get_by_dev(const struct device *dev)
 {
        struct arm_smmu_device *smmu = NULL;
 
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.