Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp622972ybr; Fri, 22 May 2020 15:06:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMMgWSKkPxCbATWM4TDRRP3cXwkbOhtqSaSYTotGrQ3P49ANWsZ5GumfUqi+lXBgXF6mpE X-Received: by 2002:a17:907:2701:: with SMTP id w1mr8768626ejk.317.1590185161282; Fri, 22 May 2020 15:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590185161; cv=none; d=google.com; s=arc-20160816; b=NfUUC/2l20Pmg9rDr2K837rNeR4WrEtScvlyhKQcoOwhZxb3GXWrkztjFaxV7g5UFj yhmatQyv2caWVop/maKlkyZv9U9CERpWaBjdssR5P555J9CJCc/fqKKQQtK/F/JuFlcp NnWGlW9M7TZ3iEcKv5orkRZDZNpFOPiLgJWa9RPaus/ibPPenWaRGmVZPrreWFF1Y5vq 7qaB8oDPA6Y1HKfKl4xWFoZPDSyVRgqe+tsVreiGq5DEDApSurD3ZHlAweV1MPUoMqtp PC5Nsd+tn44quyYwXaTz4CaDyQaimUnVLwMoXEoNisqgjhuRWiRMcJ05rYsK33vcct6+ UOqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=Qp38DuAR0RZQl1vysCG2SkE6AAVIOtnZRMm4cw+P1jk=; b=B7466mCv2kdPfEY/5j7u0T2zVwdmyPGWxCb509I2ECJq0xY2RqVX+2rWHrxaor5pfx 2+FrDuwcZRyfooS5R7V6+hi/8gMKaGPxnH9F18nFLCOwKFcPDA6bqz59D83RT0hVcbyh 8TivMs6tYJjFhlwxJYphXCqPTEjAavvRalTtPtKMIA8rks7IurOJhWc6h89+8Q7OpegJ 4TE/JVM11MXa4x10Lyp+7tR+aCHo6IfTJXh6fVfMbHmfUZDPSGQCUbV4VWGM8DMfz5k7 l99Tz8K/mspe2K1KCfz3tE4rwxSaU8ILM4KMQoGI38WJYUa+8J1Yf0hyza+uQRMJYhLy WWzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=kX80Ws9K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si8663974ejc.319.2020.05.22.15.05.39; Fri, 22 May 2020 15:06:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=kX80Ws9K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731183AbgEVWDh (ORCPT + 99 others); Fri, 22 May 2020 18:03:37 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:32054 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731171AbgEVWDg (ORCPT ); Fri, 22 May 2020 18:03:36 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1590185015; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=Qp38DuAR0RZQl1vysCG2SkE6AAVIOtnZRMm4cw+P1jk=; b=kX80Ws9KYKSIzkYRy8+kx4Ku5jN18a3IyBxjrKFksl0BmAUgmFUWAIgmPKRpmRcpm48cl5Os J9QVxlugzqD0OHTk1mU8eSk5BEfyRl2iiF9jeH3wF00pEC8oEAt0pOVdIZiXGIi8yTPwj0dH FQfHvYohgvG9yzU5Bi5f5WcRErM= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5ec84c36.7fad287c7bc8-smtp-out-n03; Fri, 22 May 2020 22:03:34 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 5E218C43395; Fri, 22 May 2020 22:03:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from jordan-laptop.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7BDE8C433CB; Fri, 22 May 2020 22:03:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7BDE8C433CB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: linux-arm-msm@vger.kernel.org Cc: Daniel Vetter , David Airlie , Rob Clark , Sean Paul , dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/3] drm/msm: Update the MMU helper function APIs Date: Fri, 22 May 2020 16:03:16 -0600 Message-Id: <20200522220316.23772-4-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522220316.23772-1-jcrouse@codeaurora.org> References: <20200522220316.23772-1-jcrouse@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of using a bare unsigned type for the length value for map/unmap functions pass in a size_t to more correctly match up with the underlying APIs. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gpummu.c | 4 ++-- drivers/gpu/drm/msm/msm_iommu.c | 4 ++-- drivers/gpu/drm/msm/msm_mmu.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpummu.c b/drivers/gpu/drm/msm/msm_gpummu.c index 0ad0f848560a..310a31b05faa 100644 --- a/drivers/gpu/drm/msm/msm_gpummu.c +++ b/drivers/gpu/drm/msm/msm_gpummu.c @@ -26,7 +26,7 @@ static void msm_gpummu_detach(struct msm_mmu *mmu) } static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t iova, - struct sg_table *sgt, unsigned len, int prot) + struct sg_table *sgt, size_t len, int prot) { struct msm_gpummu *gpummu = to_msm_gpummu(mmu); unsigned idx = (iova - GPUMMU_VA_START) / GPUMMU_PAGE_SIZE; @@ -54,7 +54,7 @@ static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t iova, return 0; } -static int msm_gpummu_unmap(struct msm_mmu *mmu, uint64_t iova, unsigned len) +static int msm_gpummu_unmap(struct msm_mmu *mmu, uint64_t iova, size_t len) { struct msm_gpummu *gpummu = to_msm_gpummu(mmu); unsigned idx = (iova - GPUMMU_VA_START) / GPUMMU_PAGE_SIZE; diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c index 627e1187d8aa..f8d5a294e1be 100644 --- a/drivers/gpu/drm/msm/msm_iommu.c +++ b/drivers/gpu/drm/msm/msm_iommu.c @@ -38,7 +38,7 @@ static void msm_iommu_detach(struct msm_mmu *mmu) } static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova, - struct sg_table *sgt, unsigned len, int prot) + struct sg_table *sgt, size_t len, int prot) { struct msm_iommu *iommu = to_msm_iommu(mmu); size_t ret; @@ -49,7 +49,7 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova, return (ret == len) ? 0 : -EINVAL; } -static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, unsigned len) +static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, size_t len) { struct msm_iommu *iommu = to_msm_iommu(mmu); diff --git a/drivers/gpu/drm/msm/msm_mmu.h b/drivers/gpu/drm/msm/msm_mmu.h index bae9e8e67ec1..3a534ee59bf6 100644 --- a/drivers/gpu/drm/msm/msm_mmu.h +++ b/drivers/gpu/drm/msm/msm_mmu.h @@ -12,8 +12,8 @@ struct msm_mmu_funcs { void (*detach)(struct msm_mmu *mmu); int (*map)(struct msm_mmu *mmu, uint64_t iova, struct sg_table *sgt, - unsigned len, int prot); - int (*unmap)(struct msm_mmu *mmu, uint64_t iova, unsigned len); + size_t len, int prot); + int (*unmap)(struct msm_mmu *mmu, uint64_t iova, size_t len); void (*destroy)(struct msm_mmu *mmu); }; -- 2.17.1