OSDN Git Service

soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data()
authorStephen Boyd <swboyd@chromium.org>
Wed, 26 Sep 2018 18:02:34 +0000 (11:02 -0700)
committerAndy Gross <andy.gross@linaro.org>
Wed, 14 Nov 2018 18:06:24 +0000 (10:06 -0800)
commited3cafa79ea756be653d22087c017af95ea78a49
tree606d95729cf08c0ee8b9d045a895ccdeb5468fc6
parent84fa36eb30f2e02ebf07a22fea2550a7a3938bec
soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data()

Let's change the function signature to return the pointer to memory or
an error pointer on failure, and take an argument that lets us return
the size of the aux data read. This way we can remove the
cmd_db_read_aux_data_len() API entirely and also get rid of the memcpy
operation from cmd_db to the caller. Updating the only user of this code
shows that making this change allows us to remove a function and put the
lookup where the user is.

Cc: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Cc: Lina Iyer <ilina@codeaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Evan Green <evgreen@chromium.org>
Cc: Jordan Crouse <jcrouse@codeaurora.org>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c
drivers/soc/qcom/cmd-db.c
include/soc/qcom/cmd-db.h