mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 08:38:45 +02:00 
			
		
		
		
	 876346536c
			
		
	
	
		876346536c
		
	
	
	
	
		
			
			This patch splits up the rust helpers C file. When rebasing patch sets on upstream linux, merge conflicts in helpers.c is common and time consuming [1]. Thus, split the file so that each kernel component can live in a separate file. This patch lists helper files explicitly and thus conflicts in the file list is still likely. However, they should be more simple to resolve than the conflicts usually seen in helpers.c. [ Removed `README.md` and undeleted the original comment since now, in v3 of the series, we have a `helpers.c` again; which also allows us to keep the "Sorted alphabetically" line and makes the diff easier. In addition, updated the Documentation/ mentions of the file, reworded title and removed blank lines at the end of `page.c`. - Miguel ] Link: https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/Splitting.20up.20helpers.2Ec/near/426694012 [1] Signed-off-by: Andreas Hindborg <a.hindborg@samsung.com> Reviewed-by: Gary Guo <gary@garyguo.net> Acked-by: Dirk Behme <dirk.behme@de.bosch.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Link: https://lore.kernel.org/r/20240815103016.2771842-1-nmi@metaspace.dk Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			484 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			484 B
		
	
	
	
		
			C
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0
 | |
| 
 | |
| #include <linux/export.h>
 | |
| #include <linux/workqueue.h>
 | |
| 
 | |
| void rust_helper_init_work_with_key(struct work_struct *work, work_func_t func,
 | |
| 				    bool onstack, const char *name,
 | |
| 				    struct lock_class_key *key)
 | |
| {
 | |
| 	__init_work(work, onstack);
 | |
| 	work->data = (atomic_long_t)WORK_DATA_INIT();
 | |
| 	lockdep_init_map(&work->lockdep_map, name, key, 0);
 | |
| 	INIT_LIST_HEAD(&work->entry);
 | |
| 	work->func = func;
 | |
| }
 | |
| EXPORT_SYMBOL_GPL(rust_helper_init_work_with_key);
 |