From a59821f0712d27bf5805c195cff10ef27aacbfbe Mon Sep 17 00:00:00 2001
From: daniel <daniel@danielabrecht.ch>
Date: Wed, 20 Jul 2016 21:52:42 +0200
Subject: [PATCH 1/1] Fixed some compiler errors of GCC 5.4

---
 arch/arm64/kernel/psci.c                                  | 4 ++--
 drivers/cpufreq/exynos-mp-cpufreq.c                       | 6 +++---
 drivers/media/platform/exynos/fimc-is2/fimc-is-clk-gate.c | 2 +-
 drivers/media/platform/exynos/mfc/s5p_mfc.c               | 2 +-
 drivers/scsi/ufs/ufs-exynos.c                             | 8 ++++----
 mm/rmap.c                                                 | 3 +--
 6 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c
index 1c65237..aa9d515 100644
--- a/arch/arm64/kernel/psci.c
+++ b/arch/arm64/kernel/psci.c
@@ -116,7 +116,7 @@ static void psci_power_state_unpack(u32 power_state,
  * The following two functions are invoked via the invoke_psci_fn pointer
  * and will not be inlined, allowing us to piggyback on the AAPCS.
  */
-static noinline int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1,
+static noinline notrace int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1,
 					 u64 arg2)
 {
 	asm volatile(
@@ -131,7 +131,7 @@ static noinline int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1,
 	return function_id;
 }
 
-static noinline int __invoke_psci_fn_smc(u64 function_id, u64 arg0, u64 arg1,
+static noinline notrace int __invoke_psci_fn_smc(u64 function_id, u64 arg0, u64 arg1,
 					 u64 arg2)
 {
 	asm volatile(
diff --git a/drivers/cpufreq/exynos-mp-cpufreq.c b/drivers/cpufreq/exynos-mp-cpufreq.c
index fbe6869..0668c88 100644
--- a/drivers/cpufreq/exynos-mp-cpufreq.c
+++ b/drivers/cpufreq/exynos-mp-cpufreq.c
@@ -1360,7 +1360,7 @@ static ssize_t store_cpufreq_max_limit(struct kobject *kobj, struct attribute *a
 }
 #endif
 
-inline ssize_t show_core_freq_table(char *buf, cluster_type cluster)
+static inline ssize_t show_core_freq_table(char *buf, cluster_type cluster)
 {
 	int i, count = 0;
 	size_t tbl_sz = 0, pr_len;
@@ -1384,7 +1384,7 @@ inline ssize_t show_core_freq_table(char *buf, cluster_type cluster)
 	return count;
 }
 
-inline ssize_t show_core_freq(char *buf,
+static inline ssize_t show_core_freq(char *buf,
 				cluster_type cluster,
 				bool qos_flag) /* qos_flag : false is Freq_min, true is Freq_max */
 {
@@ -1398,7 +1398,7 @@ inline ssize_t show_core_freq(char *buf,
 	return snprintf(buf, PAGE_SIZE, "%u\n", qos_value);
 }
 
-inline ssize_t store_core_freq(const char *buf, size_t count,
+static inline ssize_t store_core_freq(const char *buf, size_t count,
 				cluster_type cluster,
 				bool qos_flag) /* qos_flag : false is Freq_min, true is Freq_max */
 {
diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-clk-gate.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-clk-gate.c
index 53244ac..afc493e 100644
--- a/drivers/media/platform/exynos/fimc-is2/fimc-is-clk-gate.c
+++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-clk-gate.c
@@ -83,7 +83,7 @@ int fimc_is_wrap_clk_gate_set(struct fimc_is_core *core,
 	return 0;
 }
 
-inline bool fimc_is_group_otf(struct fimc_is_device_ischain *device, int group_id)
+static inline bool fimc_is_group_otf(struct fimc_is_device_ischain *device, int group_id)
 {
 	struct fimc_is_group *group;
 
diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc.c b/drivers/media/platform/exynos/mfc/s5p_mfc.c
index 5b07d11..a993d39 100644
--- a/drivers/media/platform/exynos/mfc/s5p_mfc.c
+++ b/drivers/media/platform/exynos/mfc/s5p_mfc.c
@@ -338,7 +338,7 @@ void mfc_sched_worker(struct work_struct *work)
 
 /* Helper functions for interrupt processing */
 /* Remove from hw execution round robin */
-inline void clear_work_bit(struct s5p_mfc_ctx *ctx)
+static inline void clear_work_bit(struct s5p_mfc_ctx *ctx)
 {
 	struct s5p_mfc_dev *dev = NULL;
 
diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
index d591033..6c5ae13 100644
--- a/drivers/scsi/ufs/ufs-exynos.c
+++ b/drivers/scsi/ufs/ufs-exynos.c
@@ -883,7 +883,7 @@ struct exynos_ufs_soc *exynos_ufs_get_drv_data(struct device *dev)
 	return ((struct ufs_hba_variant *)match->data)->vs_data;
 }
 
-inline void exynos_ufs_ctrl_hci_core_clk(struct exynos_ufs *ufs, bool en)
+void exynos_ufs_ctrl_hci_core_clk(struct exynos_ufs *ufs, bool en)
 {
 	u32 reg;
 
@@ -1772,7 +1772,7 @@ static int exynos_ufs_link_startup_notify(struct ufs_hba *hba, bool notify)
 {
 	int ret = 0;
 
-	switch (notify) {
+	switch ((int)notify) {
 	case PRE_CHANGE:
 		exynos_ufs_dev_hw_reset(hba);
 		ret = exynos_ufs_pre_link(hba);
@@ -1793,7 +1793,7 @@ static int exynos_ufs_pwr_change_notify(struct ufs_hba *hba, bool notify,
 {
 	int ret = 0;
 
-	switch (notify) {
+	switch ((int)notify) {
 	case PRE_CHANGE:
 		ret = exynos_ufs_pre_prep_pmc(hba, pwr_max, pwr_req);
 		break;
@@ -1810,7 +1810,7 @@ static int exynos_ufs_pwr_change_notify(struct ufs_hba *hba, bool notify,
 static void exynos_ufs_hibern8_notify(struct ufs_hba *hba,
 				u8 enter, bool notify)
 {
-	switch (notify) {
+	switch ((int)notify) {
 	case PRE_CHANGE:
 		exynos_ufs_pre_hibern8(hba, enter);
 		break;
diff --git a/mm/rmap.c b/mm/rmap.c
index 705bfc8..3e9e62e 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -525,8 +525,7 @@ __vma_address(struct page *page, struct vm_area_struct *vma)
 	return vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT);
 }
 
-inline unsigned long
-vma_address(struct page *page, struct vm_area_struct *vma)
+unsigned long vma_address(struct page *page, struct vm_area_struct *vma)
 {
 	unsigned long address = __vma_address(page, vma);
 
-- 
2.7.4

