[Arm-dev] [PATCH 03/11] Integrate upstream fix for return value of pcc_mbox_request_channel

Duc Dang dhdang at apm.com
Fri Nov 11 02:47:45 UTC 2016


Signed-off-by: Duc Dang <dhdang at apm.com>
---
 ...-Fix-return-value-of-pcc_mbox_request_cha.patch | 33 ++++++++++++++++++++++
 SPECS/kernel-aarch64.spec                          |  3 ++
 2 files changed, 36 insertions(+)
 create mode 100644 SOURCES/1003-mailbox-PCC-Fix-return-value-of-pcc_mbox_request_cha.patch

diff --git a/SOURCES/1003-mailbox-PCC-Fix-return-value-of-pcc_mbox_request_cha.patch b/SOURCES/1003-mailbox-PCC-Fix-return-value-of-pcc_mbox_request_cha.patch
new file mode 100644
index 0000000..1f6dd33
--- /dev/null
+++ b/SOURCES/1003-mailbox-PCC-Fix-return-value-of-pcc_mbox_request_cha.patch
@@ -0,0 +1,33 @@
+From e96f6512d40958588ae97dfa0f06b1e66af8910d Mon Sep 17 00:00:00 2001
+From: Hoan Tran <hotran at apm.com>
+Date: Fri, 14 Oct 2016 16:20:21 -0700
+Subject: [PATCH 1003/1018] mailbox: PCC: Fix return value of
+ pcc_mbox_request_channel()
+
+When CONFIG_PCC is disabled, pcc_mbox_request_channel() needs to
+return ERR_PTR(-ENODEV), not a NULL pointer, as the callers of
+this function use IS_ERR() to check for error code.
+
+Signed-off-by: Duc Dang <dhdang at apm.com>
+Signed-off-by: Hoan Tran <hotran at apm.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
+---
+ include/acpi/pcc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h
+index 17a940a..8caa79c 100644
+--- a/include/acpi/pcc.h
++++ b/include/acpi/pcc.h
+@@ -21,7 +21,7 @@ extern void pcc_mbox_free_channel(struct mbox_chan *chan);
+ static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
+ 							 int subspace_id)
+ {
+-	return NULL;
++	return ERR_PTR(-ENODEV);
+ }
+ static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { }
+ #endif
+-- 
+1.8.3.1
+
diff --git a/SPECS/kernel-aarch64.spec b/SPECS/kernel-aarch64.spec
index 2aff470..3085417 100644
--- a/SPECS/kernel-aarch64.spec
+++ b/SPECS/kernel-aarch64.spec
@@ -327,6 +327,7 @@ Source60: config-centos-sig
 #APM Patches
 Patch1001: 1001-cpufreq-CPPC-Avoid-overflow-when-calculating-desired.patch
 Patch1002: 1002-cpufreq-CPPC-Correct-desired_perf-calculation.patch
+Patch1003: 1003-mailbox-PCC-Fix-return-value-of-pcc_mbox_request_cha.patch
 
 # QDF2400 Patches
 Patch4000: 4000-arm64-Define-Qualcomm-Technologies-ARMv8-CPU.patch
@@ -664,6 +665,7 @@ fi
 # Aplly APM patches
 git am %{PATCH1001}
 git am %{PATCH1002}
+git am %{PATCH1003}
 
 # Apply QDF2400 patches
 git am %{PATCH4000}
@@ -1444,6 +1446,7 @@ fi
 %changelog
 * Thu Nov 10 2016 Duc Dang <dhdang at apm.com> [4.5.0-17.el7]
 - Add cpufreq CPPC bug fixes
+- mailbox: PCC: Fix return value of pcc_mbox_request_channel
 
 * Mon Nov 07 2016 Christopher Covington <cov at codeaurora.org> [4.5.0-16.el7]
 - Add git machinery (Jim Perrin)
-- 
1.8.3.1



More information about the Arm-dev mailing list