• Stephen Boyd's avatar
    soc: qcom: cmd-db: Stop memcpy()ing in cmd_db_read_aux_data() · ed3cafa7
    Stephen Boyd authored
    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: default avatarStephen Boyd <swboyd@chromium.org>
    Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
    ed3cafa7
cmd-db.c 6.77 KB