]> git.baikalelectronics.ru Git - kernel.git/commit
soc: qcom: cmd-db: Remove memcpy()ing from cmd_db_get_header()
authorStephen Boyd <swboyd@chromium.org>
Wed, 26 Sep 2018 18:02:33 +0000 (11:02 -0700)
committerAndy Gross <andy.gross@linaro.org>
Wed, 14 Nov 2018 18:05:50 +0000 (10:05 -0800)
commita0c2a830a9499da151b88d070bc125b0225c95bb
treea56ac94ddbe2af007aea2135f3ab91cde5fb4470
parent654f0031942589cbcb0fa099fdf9d16e31afaa63
soc: qcom: cmd-db: Remove memcpy()ing from cmd_db_get_header()

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: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/cmd-db.c