]> asedeno.scripts.mit.edu Git - linux.git/commit
firmware: qcom_scm: Use proper types for dma mappings
authorStephen Boyd <swboyd@chromium.org>
Fri, 17 May 2019 21:09:21 +0000 (14:09 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 22 Jul 2019 16:19:56 +0000 (09:19 -0700)
commit6e37ccf78a53296c6c7bf426065762c27829eb84
tree70e6a5f97968637bfed16ef00e4d94640d1eef76
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
firmware: qcom_scm: Use proper types for dma mappings

We need to use the proper types and convert between physical addresses
and dma addresses here to avoid mismatch warnings. This is especially
important on systems with a different size for dma addresses and
physical addresses. Otherwise, we get the following warning:

  drivers/firmware/qcom_scm.c: In function "qcom_scm_assign_mem":
  drivers/firmware/qcom_scm.c:469:47: error: passing argument 3 of "dma_alloc_coherent" from incompatible pointer type [-Werror=incompatible-pointer-types]

We also fix the size argument to dma_free_coherent() because that size
doesn't need to be aligned after it's already aligned on the allocation
size. In fact, dma debugging expects the same arguments to be passed to
both the allocation and freeing sides of the functions so changing the
size is incorrect regardless.

Reported-by: Ian Jackson <ian.jackson@citrix.com>
Cc: Ian Jackson <ian.jackson@citrix.com>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/firmware/qcom_scm.c