From 394a495b55617f6e20aa73d9ab7ea9ee177bbbe8 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 1 Nov 2023 14:33:45 +0100 Subject: [PATCH] pc: unify string_helpers and get_option() Issue #5036 --- .../framebuffer/intel/pc/generated_dummies.c | 82 +------------------ repos/pc/src/drivers/nic/pc/dummies.c | 7 -- .../nic/pc/spec/x86_64/generated_dummies.c | 2 +- .../drivers/usb_host/pc/generated_dummies.c | 42 +--------- .../usb_host/pc/spec/x86_32/source.list | 1 + .../usb_host/pc/spec/x86_64/source.list | 1 + repos/pc/src/lib/pc/lx_emul/common_dummies.c | 6 ++ repos/pc/src/lib/pc_wifi/dummies.c | 14 ---- repos/pc/src/lib/pc_wifi/generated_dummies.c | 26 +----- .../src/lib/pc_wifi/spec/x86_32/source.list | 1 + .../src/lib/pc_wifi/spec/x86_64/source.list | 1 + 11 files changed, 14 insertions(+), 169 deletions(-) diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c b/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c index a731a80fb2..381aa07f95 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c @@ -1,7 +1,7 @@ /* * \brief Dummy definitions of Linux Kernel functions * \author Automatically generated file - do no edit - * \date 2023-03-22 + * \date 2023-11-02 */ #include @@ -244,30 +244,6 @@ void bust_spinlocks(int yes) } -#include - -void cfb_copyarea(struct fb_info * p,const struct fb_copyarea * area) -{ - lx_emul_trace_and_stop(__func__); -} - - -#include - -void cfb_fillrect(struct fb_info * p,const struct fb_fillrect * rect) -{ - lx_emul_trace_and_stop(__func__); -} - - -#include - -void cfb_imageblit(struct fb_info * p,const struct fb_image * image) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void check_move_unevictable_pages(struct pagevec * pvec) @@ -292,22 +268,6 @@ void console_flush_on_panic(enum con_flush_mode mode) } -#include - -void console_lock(void) -{ - lx_emul_trace_and_stop(__func__); -} - - -#include - -int console_trylock(void) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void console_unblank(void) @@ -316,14 +276,6 @@ void console_unblank(void) } -#include - -void console_unlock(void) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void console_verbose(void) @@ -513,14 +465,6 @@ void emergency_restart(void) } -#include - -void fb_set_suspend(struct fb_info * info,int state) -{ - lx_emul_trace_and_stop(__func__); -} - - #include bool file_ns_capable(const struct file * file,struct user_namespace * ns,int cap) @@ -537,14 +481,6 @@ void finish_rcuwait(struct rcuwait * w) } -#include - -void framebuffer_release(struct fb_info * info) -{ - lx_emul_trace_and_stop(__func__); -} - - extern void gen5_gt_enable_irq(struct intel_gt * gt,u32 mask); void gen5_gt_enable_irq(struct intel_gt * gt,u32 mask) { @@ -580,14 +516,6 @@ void gen6_rps_irq_handler(struct intel_rps * rps,u32 pm_iir) } -#include - -int get_option(char ** str,int * pint) -{ - lx_emul_trace_and_stop(__func__); -} - - #include s32 i2c_smbus_read_block_data(const struct i2c_client * client,u8 command,u8 * values) @@ -2042,14 +1970,6 @@ int unregister_acpi_bus_type(struct acpi_bus_type * type) } -#include - -void unregister_framebuffer(struct fb_info * fb_info) -{ - lx_emul_trace_and_stop(__func__); -} - - extern void unregister_irq_proc(unsigned int irq,struct irq_desc * desc); void unregister_irq_proc(unsigned int irq,struct irq_desc * desc) { diff --git a/repos/pc/src/drivers/nic/pc/dummies.c b/repos/pc/src/drivers/nic/pc/dummies.c index f2b2e3a603..83e45087c2 100644 --- a/repos/pc/src/drivers/nic/pc/dummies.c +++ b/repos/pc/src/drivers/nic/pc/dummies.c @@ -73,13 +73,6 @@ void register_syscore_ops(struct syscore_ops * ops) lx_emul_trace(__func__); } -#include - -int get_option(char ** str,int * pint) -{ - lx_emul_trace_and_stop(__func__); -} - #include void synchronize_rcu_expedited(void) diff --git a/repos/pc/src/drivers/nic/pc/spec/x86_64/generated_dummies.c b/repos/pc/src/drivers/nic/pc/spec/x86_64/generated_dummies.c index 7cfe471b69..72962811b5 100644 --- a/repos/pc/src/drivers/nic/pc/spec/x86_64/generated_dummies.c +++ b/repos/pc/src/drivers/nic/pc/spec/x86_64/generated_dummies.c @@ -1,7 +1,7 @@ /* * \brief Dummy definitions of Linux Kernel functions * \author Automatically generated file - do no edit - * \date 2023-08-09 + * \date 2023-11-02 */ #include diff --git a/repos/pc/src/drivers/usb_host/pc/generated_dummies.c b/repos/pc/src/drivers/usb_host/pc/generated_dummies.c index fc4d27b411..e608263549 100644 --- a/repos/pc/src/drivers/usb_host/pc/generated_dummies.c +++ b/repos/pc/src/drivers/usb_host/pc/generated_dummies.c @@ -1,7 +1,7 @@ /* * \brief Dummy definitions of Linux Kernel functions * \author Automatically generated file - do no edit - * \date 2023-03-17 + * \date 2023-11-02 */ #include @@ -179,14 +179,6 @@ void gen_pool_free_owner(struct gen_pool * pool,unsigned long addr,size_t size,v } -#include - -int get_option(char ** str,int * pint) -{ - lx_emul_trace_and_stop(__func__); -} - - #include const u8 guid_index[16] = {}; @@ -412,14 +404,6 @@ void seq_printf(struct seq_file * m,const char * f,...) } -#include - -char * skip_spaces(const char * str) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait) @@ -441,35 +425,11 @@ int smp_call_function_single(int cpu,smp_call_func_t func,void * info,int wait) bool static_key_initialized; -#include - -int string_escape_mem(const char * src,size_t isz,char * dst,size_t osz,unsigned int flags,const char * only) -{ - lx_emul_trace_and_stop(__func__); -} - - -#include - -char * strreplace(char * s,char old,char new) -{ - lx_emul_trace_and_stop(__func__); -} - - #include const int sysctl_vals[] = {}; -#include - -bool sysfs_streq(const char * s1,const char * s2) -{ - lx_emul_trace_and_stop(__func__); -} - - #include int task_work_add(struct task_struct * task,struct callback_head * work,enum task_work_notify_mode notify) diff --git a/repos/pc/src/drivers/usb_host/pc/spec/x86_32/source.list b/repos/pc/src/drivers/usb_host/pc/spec/x86_32/source.list index e2c128931d..e51c16e1b4 100644 --- a/repos/pc/src/drivers/usb_host/pc/spec/x86_32/source.list +++ b/repos/pc/src/drivers/usb_host/pc/spec/x86_32/source.list @@ -98,6 +98,7 @@ lib/scatterlist.c lib/siphash.c lib/sort.c lib/string.c +lib/string_helpers.c lib/timerqueue.c lib/vsprintf.c lib/xarray.c diff --git a/repos/pc/src/drivers/usb_host/pc/spec/x86_64/source.list b/repos/pc/src/drivers/usb_host/pc/spec/x86_64/source.list index d387a5173b..bd6432fb6f 100644 --- a/repos/pc/src/drivers/usb_host/pc/spec/x86_64/source.list +++ b/repos/pc/src/drivers/usb_host/pc/spec/x86_64/source.list @@ -97,6 +97,7 @@ lib/scatterlist.c lib/siphash.c lib/sort.c lib/string.c +lib/string_helpers.c lib/timerqueue.c lib/vsprintf.c lib/xarray.c diff --git a/repos/pc/src/lib/pc/lx_emul/common_dummies.c b/repos/pc/src/lib/pc/lx_emul/common_dummies.c index 04bd843d47..d6f3d26e13 100644 --- a/repos/pc/src/lib/pc/lx_emul/common_dummies.c +++ b/repos/pc/src/lib/pc/lx_emul/common_dummies.c @@ -277,6 +277,12 @@ bool parse_option_str(const char * str,const char * option) } +int get_option(char ** str,int * pint) +{ + lx_emul_trace_and_stop(__func__); +} + + #include void pci_fixup_device(enum pci_fixup_pass pass,struct pci_dev * dev) diff --git a/repos/pc/src/lib/pc_wifi/dummies.c b/repos/pc/src/lib/pc_wifi/dummies.c index 3fbc4cc0fd..0d3cafa51c 100644 --- a/repos/pc/src/lib/pc_wifi/dummies.c +++ b/repos/pc/src/lib/pc_wifi/dummies.c @@ -569,20 +569,6 @@ void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwr } -#include - -int get_option(char ** str,int * pint) -{ - lx_emul_trace_and_stop(__func__); -} - - -char * strreplace(char * s,char old,char new) -{ - lx_emul_trace_and_stop(__func__); -} - - #include int software_node_notify(struct device * dev,unsigned long action) diff --git a/repos/pc/src/lib/pc_wifi/generated_dummies.c b/repos/pc/src/lib/pc_wifi/generated_dummies.c index 80bbf173f8..b9cbf72ea2 100644 --- a/repos/pc/src/lib/pc_wifi/generated_dummies.c +++ b/repos/pc/src/lib/pc_wifi/generated_dummies.c @@ -1,7 +1,7 @@ /* * \brief Dummy definitions of Linux Kernel functions * \author Automatically generated file - do no edit - * \date 2023-06-30 + * \date 2023-11-02 */ #include @@ -1007,14 +1007,6 @@ int sk_reuseport_attach_filter(struct sock_fprog * fprog,struct sock * sk) } -#include - -char * skip_spaces(const char * str) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait) @@ -1067,14 +1059,6 @@ int stream_open(struct inode * inode,struct file * filp) } -#include - -int string_escape_mem(const char * src,size_t isz,char * dst,size_t osz,unsigned int flags,const char * only) -{ - lx_emul_trace_and_stop(__func__); -} - - #include int suppress_printk; @@ -1101,14 +1085,6 @@ int sysfs_rename_link_ns(struct kobject * kobj,struct kobject * targ,const char } -#include - -bool sysfs_streq(const char * s1,const char * s2) -{ - lx_emul_trace_and_stop(__func__); -} - - #include struct callback_head * task_work_cancel(struct task_struct * task,task_work_func_t func) diff --git a/repos/pc/src/lib/pc_wifi/spec/x86_32/source.list b/repos/pc/src/lib/pc_wifi/spec/x86_32/source.list index 4ecdace0a1..ed883ed68b 100644 --- a/repos/pc/src/lib/pc_wifi/spec/x86_32/source.list +++ b/repos/pc/src/lib/pc_wifi/spec/x86_32/source.list @@ -210,6 +210,7 @@ lib/scatterlist.c lib/siphash.c lib/sort.c lib/string.c +lib/string_helpers.c lib/timerqueue.c lib/vsprintf.c lib/xarray.c diff --git a/repos/pc/src/lib/pc_wifi/spec/x86_64/source.list b/repos/pc/src/lib/pc_wifi/spec/x86_64/source.list index f4a825344a..e4c577fe97 100644 --- a/repos/pc/src/lib/pc_wifi/spec/x86_64/source.list +++ b/repos/pc/src/lib/pc_wifi/spec/x86_64/source.list @@ -254,6 +254,7 @@ lib/scatterlist.c lib/siphash.c lib/sort.c lib/string.c +lib/string_helpers.c lib/timerqueue.c lib/vsprintf.c lib/xarray.c