From 071106ecf68c401173c58808b1cf5f68cc50d390 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 05 Jan 2024 08:39:27 +0000
Subject: [PATCH] change wifi driver to cypress

---
 kernel/include/linux/thread_info.h |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/kernel/include/linux/thread_info.h b/kernel/include/linux/thread_info.h
index 57a3d99..f3040b0 100644
--- a/kernel/include/linux/thread_info.h
+++ b/kernel/include/linux/thread_info.h
@@ -110,17 +110,7 @@
 #define test_thread_flag(flag) \
 	test_ti_thread_flag(current_thread_info(), flag)
 
-#ifdef CONFIG_PREEMPT_LAZY
-#define tif_need_resched()	(test_thread_flag(TIF_NEED_RESCHED) || \
-				 test_thread_flag(TIF_NEED_RESCHED_LAZY))
-#define tif_need_resched_now()	(test_thread_flag(TIF_NEED_RESCHED))
-#define tif_need_resched_lazy()	test_thread_flag(TIF_NEED_RESCHED_LAZY))
-
-#else
-#define tif_need_resched()	test_thread_flag(TIF_NEED_RESCHED)
-#define tif_need_resched_now()	test_thread_flag(TIF_NEED_RESCHED)
-#define tif_need_resched_lazy()	0
-#endif
+#define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
 
 #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES
 static inline int arch_within_stack_frames(const void * const stack,
@@ -157,7 +147,7 @@
 	WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
 }
 
-static __always_inline bool
+static __always_inline __must_check bool
 check_copy_size(const void *addr, size_t bytes, bool is_source)
 {
 	int sz = __compiletime_object_size(addr);
@@ -170,6 +160,8 @@
 			__bad_copy_to();
 		return false;
 	}
+	if (WARN_ON_ONCE(bytes > INT_MAX))
+		return false;
 	check_object_size(addr, bytes, is_source);
 	return true;
 }

--
Gitblit v1.6.2