• Stephen Boyd's avatar
    soc: qcom: cmd-db: Remove memcpy()ing from cmd_db_get_header() · 84fa36eb
    Stephen Boyd authored
    The cmd_db_get_header() function is a static local function that doesn't
    need to copy anything from one place to another. Instead, it can just
    point into the region by returning pointers to what we're looking for.
    If we do that, we should mark what we're returning as const so that code
    can't modify cmd-db without an obvious cast.
    
    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>
    Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
    Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
    84fa36eb
cmd-db.c 7.37 KB