Skip to content

Commit fb212ad

Browse files
Jordan Crouserobclark
authored andcommitted
drm/msm: Update the MMU helper function APIs
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 <[email protected]> Tested-by: Shawn Guo <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent ccac7ce commit fb212ad

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

drivers/gpu/drm/msm/msm_gpummu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static void msm_gpummu_detach(struct msm_mmu *mmu)
2626
}
2727

2828
static int msm_gpummu_map(struct msm_mmu *mmu, uint64_t iova,
29-
struct sg_table *sgt, unsigned len, int prot)
29+
struct sg_table *sgt, size_t len, int prot)
3030
{
3131
struct msm_gpummu *gpummu = to_msm_gpummu(mmu);
3232
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,
5454
return 0;
5555
}
5656

57-
static int msm_gpummu_unmap(struct msm_mmu *mmu, uint64_t iova, unsigned len)
57+
static int msm_gpummu_unmap(struct msm_mmu *mmu, uint64_t iova, size_t len)
5858
{
5959
struct msm_gpummu *gpummu = to_msm_gpummu(mmu);
6060
unsigned idx = (iova - GPUMMU_VA_START) / GPUMMU_PAGE_SIZE;

drivers/gpu/drm/msm/msm_iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void msm_iommu_detach(struct msm_mmu *mmu)
3131
}
3232

3333
static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova,
34-
struct sg_table *sgt, unsigned len, int prot)
34+
struct sg_table *sgt, size_t len, int prot)
3535
{
3636
struct msm_iommu *iommu = to_msm_iommu(mmu);
3737
size_t ret;
@@ -42,7 +42,7 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova,
4242
return (ret == len) ? 0 : -EINVAL;
4343
}
4444

45-
static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, unsigned len)
45+
static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, size_t len)
4646
{
4747
struct msm_iommu *iommu = to_msm_iommu(mmu);
4848

drivers/gpu/drm/msm/msm_mmu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
struct msm_mmu_funcs {
1313
void (*detach)(struct msm_mmu *mmu);
1414
int (*map)(struct msm_mmu *mmu, uint64_t iova, struct sg_table *sgt,
15-
unsigned len, int prot);
16-
int (*unmap)(struct msm_mmu *mmu, uint64_t iova, unsigned len);
15+
size_t len, int prot);
16+
int (*unmap)(struct msm_mmu *mmu, uint64_t iova, size_t len);
1717
void (*destroy)(struct msm_mmu *mmu);
1818
};
1919

0 commit comments

Comments
 (0)