History

remoteproc: Use size_t instead of int for rproc_mem_entry len

Now that rproc_da_to_va uses a size_t for length, use a size_t for len field of rproc_mem_entry. Function used to create such structures now takes a size_t instead of int to allow full size range to be handled.

Clement Leger committed 6 years ago

Commit 096ee781 parent 9ce3bf23 files · +12 −10Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/remoteproc.h+3−3
@@ -329,7 +329,7 @@ struct rproc; · 328 unmodified lines
329struct rproc_mem_entry {329struct rproc_mem_entry {
330 void *va;330 void *va;
331 dma_addr_t dma;331 dma_addr_t dma;
332 int len;332 size_t len;
333 u32 da;333 u32 da;
334 void *priv;334 void *priv;
335 char name[32];335 char name[32];
@@ -599,13 +599,13 @@ void rproc_add_carveout(struct rproc *rproc, struct rproc_mem_entry *mem); · 263 unmodified lines
599 599
600struct rproc_mem_entry *600struct rproc_mem_entry *
601rproc_mem_entry_init(struct device *dev,601rproc_mem_entry_init(struct device *dev,
602 void *va, dma_addr_t dma, int len, u32 da,602 void *va, dma_addr_t dma, size_t len, u32 da,
603 int (*alloc)(struct rproc *, struct rproc_mem_entry *),603 int (*alloc)(struct rproc *, struct rproc_mem_entry *),
604 int (*release)(struct rproc *, struct rproc_mem_entry *),604 int (*release)(struct rproc *, struct rproc_mem_entry *),
605 const char *name, ...);605 const char *name, ...);
606 606
607struct rproc_mem_entry *607struct rproc_mem_entry *
608rproc_of_resm_mem_entry_init(struct device *dev, u32 of_resm_idx, int len,608rproc_of_resm_mem_entry_init(struct device *dev, u32 of_resm_idx, size_t len,
609 u32 da, const char *name, ...);609 u32 da, const char *name, ...);
610 610
611int rproc_boot(struct rproc *rproc);611int rproc_boot(struct rproc *rproc);