[PATCH 2/5] parisc: let is_compat_task() return false for COMPAT=n

Helge Deller <[email protected]>
Newsgroups org.kernel.vger.linux-parisc
Message-ID <[email protected]>
From: Helge Deller <[email protected]>

Signed-off-by: Helge Deller <[email protected]>
---
 arch/parisc/include/asm/compat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/parisc/include/asm/compat.h b/arch/parisc/include/asm/compat.h
index 339d1b833fa7..13a5a55dec65 100644
--- a/arch/parisc/include/asm/compat.h
+++ b/arch/parisc/include/asm/compat.h
@@ -130,7 +130,7 @@ typedef compat_ulong_t compat_elf_gregset_t[COMPAT_ELF_NGREG];
 
 static inline int __is_compat_task(struct task_struct *t)
 {
-	return test_tsk_thread_flag(t, TIF_32BIT);
+	return IS_ENABLED(CONFIG_COMPAT) && test_tsk_thread_flag(t, TIF_32BIT);
 }
 
 static inline int is_compat_task(void)
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.