projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7c1dc3
)
soc: qcom: smem: Use le32_to_cpu for comparison
author
Chris Lew
<clew@codeaurora.org>
Wed, 11 Oct 2017 21:29:06 +0000
(14:29 -0700)
committer
Andy Gross
<andy.gross@linaro.org>
Thu, 12 Oct 2017 04:48:27 +0000
(23:48 -0500)
Endianness can vary in the system, add le32_to_cpu when comparing
partition sizes from smem.
Signed-off-by: Chris Lew <clew@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/smem.c
patch
|
blob
|
history
diff --git
a/drivers/soc/qcom/smem.c
b/drivers/soc/qcom/smem.c
index
c28275b
..
db04c45
100644
(file)
--- a/
drivers/soc/qcom/smem.c
+++ b/
drivers/soc/qcom/smem.c
@@
-698,7
+698,7
@@
static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
return -EINVAL;
}
- if (
header->size != entry->size
) {
+ if (
le32_to_cpu(header->size) != le32_to_cpu(entry->size)
) {
dev_err(smem->dev,
"Partition %d has invalid size\n", i);
return -EINVAL;