remoteproc: Use kstrdup_const() rather than kstrdup()
authorMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 20 Apr 2020 23:15:58 +0000 (17:15 -0600)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 21 Apr 2020 02:29:29 +0000 (19:29 -0700)
commit1487deda19c82d30d1867277e89bc2d515b9d2d4
tree97126b8e2f215d69b1193a1a20706bcdf07409aa
parent1f36ab3f6e3b791eadad94f792c874706e153b66
remoteproc: Use kstrdup_const() rather than kstrdup()

For cases where @firmware is declared "const char *", use function
kstrdup_const() to avoid needlessly creating another copy on the
heap.

Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20200420231601.16781-2-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c
include/linux/remoteproc.h