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
329329 struct rproc_mem_entry {
330330 void *va;
331331 dma_addr_t dma;
332− int len;
332+ size_t len;
333333 u32 da;
334334 void *priv;
335335 char name[32];
@@ -599,13 +599,13 @@ void rproc_add_carveout(struct rproc *rproc, struct rproc_mem_entry *mem); · 263 unmodified lines
599599
600600 struct rproc_mem_entry *
601601 rproc_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,
603603 int (*alloc)(struct rproc *, struct rproc_mem_entry *),
604604 int (*release)(struct rproc *, struct rproc_mem_entry *),
605605 const char *name, ...);
606606
607607 struct rproc_mem_entry *
608−rproc_of_resm_mem_entry_init(struct device *dev, u32 of_resm_idx, int len,
608+rproc_of_resm_mem_entry_init(struct device *dev, u32 of_resm_idx, size_t len,
609609 u32 da, const char *name, ...);
610610
611611 int rproc_boot(struct rproc *rproc);