Skip to content

Commit

Permalink
remoteproc: fix argument 2 of rproc_mem_entry_init
Browse files Browse the repository at this point in the history
The rproc_mem_entry_init() call takes a pointer to a vm
as the second argument. The code is currently using a
plain 0 as "NULL". Change to using NULL to fix the
following sparse warnings:

drivers/remoteproc/remoteproc_core.c:339:49: warning: Using plain integer as NULL pointer
drivers/remoteproc/remoteproc_core.c:916:46: warning: Using plain integer as NULL pointer

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
  • Loading branch information
Ben Dooks (Codethink) authored and Bjorn Andersson committed Nov 9, 2019
1 parent 1665cbd commit 99cf036
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/remoteproc/remoteproc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ int rproc_alloc_vring(struct rproc_vdev *rvdev, int i)
return -ENOMEM;
} else {
/* Register carveout in in list */
mem = rproc_mem_entry_init(dev, 0, 0, size, rsc->vring[i].da,
mem = rproc_mem_entry_init(dev, NULL, 0,
size, rsc->vring[i].da,
rproc_alloc_carveout,
rproc_release_carveout,
"vdev%dvring%d",
Expand Down Expand Up @@ -911,7 +912,7 @@ static int rproc_handle_carveout(struct rproc *rproc,
}

/* Register carveout in in list */
carveout = rproc_mem_entry_init(dev, 0, 0, rsc->len, rsc->da,
carveout = rproc_mem_entry_init(dev, NULL, 0, rsc->len, rsc->da,
rproc_alloc_carveout,
rproc_release_carveout, rsc->name);
if (!carveout) {
Expand Down

0 comments on commit 99cf036

Please sign in to comment.