]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
soc: qcom: smem: byte swap values properly
authorAlex Elder <elder@linaro.org>
Tue, 10 Apr 2018 22:25:39 +0000 (17:25 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:21:04 +0000 (14:21 +0100)
commit1498792ab3cf640f62dfacb917c7fa8bbbf00cf9
tree43d7a36501ec9b3ae67dd418a62893bedf340f41
parent30d9d62365445764a47d9b64d867230ce19324f7
soc: qcom: smem: byte swap values properly

BugLink: http://bugs.launchpad.net/bugs/1815234
[ Upstream commit 04a512fea333369cc0b550f3b90df0d638e34d00 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/soc/qcom/smem.c