OSDN Git Service

soc: qcom: smem: byte swap values properly
authorAlex Elder <elder@linaro.org>
Tue, 10 Apr 2018 22:25:39 +0000 (17:25 -0500)
committerAndy Gross <andy.gross@linaro.org>
Fri, 25 May 2018 20:53:54 +0000 (15:53 -0500)
commit04a512fea333369cc0b550f3b90df0d638e34d00
tree8f88b6f294524d8e9eb1ab4f1a832043c18b2d0b
parente221a1da97d97a9b452f8be78bd14333bb5605aa
soc: qcom: smem: byte swap values properly

Two places report an error when a partition header is found to
not contain the right canary value.  The error messages do not
properly byte swap the host ids.  Fix this, and adjust the format
specificier to match the 16-bit unsigned data type.

Move the error handling for a bad canary value to the end of
qcom_smem_alloc_private().  This avoids some long lines, and
reduces the distraction of handling this unexpected problem.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/smem.c