staging: vc04_services: remove empty functions
Subsystems (2)
PATCH 1/1 staging: vc04_services: remove empty functions
The functions vchiq_debugfs_init(), vchiq_debugfs_deinit(), vchiq_debugfs_add_instance(), and vchiq_debugfs_remove_instance() are declared and defined but contains no code or statements. They do nothing.
--- .../interface/vchiq_arm/vchiq_arm.c | 3 --- .../interface/vchiq_arm/vchiq_debugfs.c | 16 ---------------- .../interface/vchiq_arm/vchiq_debugfs.h | 8 -------- .../interface/vchiq_arm/vchiq_dev.c | 4 ---- 4 files changed, 31 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +0 -3
@@ -1806,8 +1806,6 @@ static int vchiq_probe(struct platform_device *pdev)if (err) goto failed_platform_init; -vchiq_debugfs_init (); -vchiq_log_info (vchiq_arm_log_level,"vchiq: platform initialised - version %d (min %d)" ,VCHIQ_VERSION ,VCHIQ_VERSION_MIN );
@@ -1838,7 +1836,6 @@ static void vchiq_remove(struct platform_device *pdev) {vchiq_device_unregister (bcm2835_audio);vchiq_device_unregister (bcm2835_camera); -vchiq_debugfs_deinit ();vchiq_deregister_chrdev (); }
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0 -16
@@ -228,20 +228,4 @@ void vchiq_debugfs_deinit(void)#else /* CONFIG_DEBUG_FS */ -void vchiq_debugfs_init (void ) -{ -} - -void vchiq_debugfs_deinit (void ) -{ -} - -void vchiq_debugfs_add_instance (struct vchiq_instance *instance) -{ -} - -void vchiq_debugfs_remove_instance (struct vchiq_instance *instance) -{ -} -#endif /* CONFIG_DEBUG_FS */
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.h +0 -8
@@ -10,12 +10,4 @@ struct vchiq_debugfs_node { struct dentry *dentry; }; -void vchiq_debugfs_init (void ); - -void vchiq_debugfs_deinit (void ); - -void vchiq_debugfs_add_instance (struct vchiq_instance *instance); - -void vchiq_debugfs_remove_instance (struct vchiq_instance *instance); -#endif /* VCHIQ_DEBUGFS_H */
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +0 -4
@@ -1185,8 +1185,6 @@ static int vchiq_open(struct inode *inode, struct file *file) instance->state = state; instance->pid = current->tgid; -vchiq_debugfs_add_instance (instance); -init_completion (&instance->insert_event);init_completion (&instance->remove_event);mutex_init (&instance->completion_mutex);
@@ -1297,8 +1295,6 @@ static int vchiq_release(struct inode *inode, struct file *file)free_bulk_waiter (instance); -vchiq_debugfs_remove_instance (instance); -kfree (instance); file->private_data =NULL ;
Signature · 1 line
2.34.1
Quoted 39 lines · Calvince Otieno
The functions
vchiq_debugfs_init(),vchiq_debugfs_deinit(),vchiq_debugfs_add_instance(), andvchiq_debugfs_remove_instance()are declared and defined but contains no code or statements. They do nothing.Signed-off-by Calvince Otieno <[email protected]>--- .../interface/vchiq_arm/vchiq_arm.c | 3 --- .../interface/vchiq_arm/vchiq_debugfs.c | 16 ---------------- .../interface/vchiq_arm/vchiq_debugfs.h | 8 -------- .../interface/vchiq_arm/vchiq_dev.c | 4 ---- 4 files changed, 31 deletions(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +0
-3@@ -1806,8 +1806,6 @@ static int vchiq_probe(struct platform_device *pdev)if (err) goto failed_platform_init; -vchiq_debugfs_init (); -vchiq_log_info (vchiq_arm_log_level,"vchiq: platform initialised - version %d (min %d)" ,VCHIQ_VERSION ,VCHIQ_VERSION_MIN );@@ -1838,7 +1836,6 @@ static void vchiq_remove(struct platform_device *pdev) {vchiq_device_unregister (bcm2835_audio);vchiq_device_unregister (bcm2835_camera); -vchiq_debugfs_deinit ();vchiq_deregister_chrdev (); }drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-0
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c void vchiq_debugfs_deinit(void) · line 229
Quoted 2 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-0@@ -228,20 +228,4 @@ void vchiq_debugfs_deinit(void)#else /* CONFIG_DEBUG_FS */
We need to have these definitions, so a kernel with no CONFIG_DEBUG_FS selected builds. Have you experimented with this config with your changes applied?
All the best,
Karolina
Quoted 57 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-16-void vchiq_debugfs_init (void ) -{ -} - -void vchiq_debugfs_deinit (void ) -{ -} - -void vchiq_debugfs_add_instance (struct vchiq_instance *instance) -{ -} - -void vchiq_debugfs_remove_instance (struct vchiq_instance *instance) -{ -} -#endif /* CONFIG_DEBUG_FS */ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.h +0
-8@@ -10,12 +10,4 @@ struct vchiq_debugfs_node { struct dentry *dentry; }; -void vchiq_debugfs_init (void ); - -void vchiq_debugfs_deinit (void ); - -void vchiq_debugfs_add_instance (struct vchiq_instance *instance); - -void vchiq_debugfs_remove_instance (struct vchiq_instance *instance); -#endif /* VCHIQ_DEBUGFS_H */ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +0
-4@@ -1185,8 +1185,6 @@ static int vchiq_open(struct inode *inode, struct file *file) instance->state = state; instance->pid = current->tgid; -vchiq_debugfs_add_instance (instance); -init_completion (&instance->insert_event);init_completion (&instance->remove_event);mutex_init (&instance->completion_mutex);@@ -1297,8 +1295,6 @@ static int vchiq_release(struct inode *inode, struct file *file)free_bulk_waiter (instance); -vchiq_debugfs_remove_instance (instance); -kfree (instance); file->private_data =NULL ;
Quoted 100 lines · Karolina Stolarek
Quoted 39 lines · Calvince Otieno
The functions
vchiq_debugfs_init(),vchiq_debugfs_deinit(),vchiq_debugfs_add_instance(), andvchiq_debugfs_remove_instance()are declared and defined but contains no code or statements. They do nothing.Signed-off-by Calvince Otieno <[email protected]>--- .../interface/vchiq_arm/vchiq_arm.c | 3 --- .../interface/vchiq_arm/vchiq_debugfs.c | 16 ---------------- .../interface/vchiq_arm/vchiq_debugfs.h | 8 -------- .../interface/vchiq_arm/vchiq_dev.c | 4 ---- 4 files changed, 31 deletions(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +0
-3@@ -1806,8 +1806,6 @@ static int vchiq_probe(struct platform_device *pdev)if (err) goto failed_platform_init; -vchiq_debugfs_init (); -vchiq_log_info (vchiq_arm_log_level,"vchiq: platform initialised - version %d (min %d)" ,VCHIQ_VERSION ,VCHIQ_VERSION_MIN );@@ -1838,7 +1836,6 @@ static void vchiq_remove(struct platform_device *pdev) {vchiq_device_unregister (bcm2835_audio);vchiq_device_unregister (bcm2835_camera); -vchiq_debugfs_deinit ();vchiq_deregister_chrdev (); }drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-0drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c void vchiq_debugfs_deinit(void) · line 229
Quoted 2 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-0@@ -228,20 +228,4 @@ void vchiq_debugfs_deinit(void)#else /* CONFIG_DEBUG_FS */ We need to have these definitions, so a kernel with no
CONFIG_DEBUG_FSselected builds. Have you experimented with this config with your changes applied?All the best,
KarolinaQuoted 50 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-16-void vchiq_debugfs_init (void ) -{ -} - -void vchiq_debugfs_deinit (void ) -{ -} - -void vchiq_debugfs_add_instance (struct vchiq_instance *instance) -{ -} - -void vchiq_debugfs_remove_instance (struct vchiq_instance *instance) -{ -} -#endif /* CONFIG_DEBUG_FS */ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.h +0
-8@@ -10,12 +10,4 @@ struct vchiq_debugfs_node { struct dentry *dentry; }; -void vchiq_debugfs_init (void ); - -void vchiq_debugfs_deinit (void ); - -void vchiq_debugfs_add_instance (struct vchiq_instance *instance); - -void vchiq_debugfs_remove_instance (struct vchiq_instance *instance); -#endif /* VCHIQ_DEBUGFS_H */ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +0
-2@@ -1185,8 +1185,6 @@ static int vchiq_open(struct inode *inode, struct file *file) instance->state = state; instance->pid = current->tgid; -vchiq_debugfs_add_instance (instance); -init_completion (&instance->insert_event);init_completion (&instance->remove_event);mutex_init (&instance->completion_mutex);@@ -1297,8 +1295,6 @@ static int vchiq_release(struct inode *inode, struct file *file)
Quoted 7 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c static int vchiq_release(struct inode *inode, struct file *file) · line 1300
Quoted 7 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +0
-2free_bulk_waiter (instance); -vchiq_debugfs_remove_instance (instance); -kfree (instance); file->private_data =NULL ;
Could you kindly clarify what these definitions are doing. At the moment they do absolutely nothing, I might be wrong
Signature · 2 lines
Kind regards, Calvince Otieno
Quoted 104 lines · Calvince Otieno
Quoted 102 lines · Karolina Stolarek
Quoted 39 lines · Calvince Otieno
The functions
vchiq_debugfs_init(),vchiq_debugfs_deinit(),vchiq_debugfs_add_instance(), andvchiq_debugfs_remove_instance()are declared and defined but contains no code or statements. They do nothing.Signed-off-by Calvince Otieno <[email protected]>--- .../interface/vchiq_arm/vchiq_arm.c | 3 --- .../interface/vchiq_arm/vchiq_debugfs.c | 16 ---------------- .../interface/vchiq_arm/vchiq_debugfs.h | 8 -------- .../interface/vchiq_arm/vchiq_dev.c | 4 ---- 4 files changed, 31 deletions(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +0
-3@@ -1806,8 +1806,6 @@ static int vchiq_probe(struct platform_device *pdev)if (err) goto failed_platform_init; -vchiq_debugfs_init (); -vchiq_log_info (vchiq_arm_log_level,"vchiq: platform initialised - version %d (min %d)" ,VCHIQ_VERSION ,VCHIQ_VERSION_MIN );@@ -1838,7 +1836,6 @@ static void vchiq_remove(struct platform_device *pdev) {vchiq_device_unregister (bcm2835_audio);vchiq_device_unregister (bcm2835_camera); -vchiq_debugfs_deinit ();vchiq_deregister_chrdev (); }drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-0drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c void vchiq_debugfs_deinit(void) · line 229
Quoted 2 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-0@@ -228,20 +228,4 @@ void vchiq_debugfs_deinit(void)#else /* CONFIG_DEBUG_FS */ We need to have these definitions, so a kernel with no
CONFIG_DEBUG_FSselected builds. Have you experimented with this config with your changes applied?All the best,
KarolinaQuoted 52 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +0
-16-void vchiq_debugfs_init (void ) -{ -} - -void vchiq_debugfs_deinit (void ) -{ -} - -void vchiq_debugfs_add_instance (struct vchiq_instance *instance) -{ -} - -void vchiq_debugfs_remove_instance (struct vchiq_instance *instance) -{ -} -#endif /* CONFIG_DEBUG_FS */ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.h +0
-8@@ -10,12 +10,4 @@ struct vchiq_debugfs_node { struct dentry *dentry; }; -void vchiq_debugfs_init (void ); - -void vchiq_debugfs_deinit (void ); - -void vchiq_debugfs_add_instance (struct vchiq_instance *instance); - -void vchiq_debugfs_remove_instance (struct vchiq_instance *instance); -#endif /* VCHIQ_DEBUGFS_H */ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +0
-2@@ -1185,8 +1185,6 @@ static int vchiq_open(struct inode *inode, struct file *file) instance->state = state; instance->pid = current->tgid; -vchiq_debugfs_add_instance (instance); -init_completion (&instance->insert_event);init_completion (&instance->remove_event);mutex_init (&instance->completion_mutex);@@ -1297,8 +1295,6 @@ static int vchiq_release(struct inode *inode, struct file *file)free_bulk_waiter (instance);
Quoted 8 lines
Quoted 5 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c static int vchiq_release(struct inode *inode, struct file *file) · line 1300
Quoted 5 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +0
-2-vchiq_debugfs_remove_instance (instance); -kfree (instance); file->private_data =NULL ;Could you kindly clarify what these definitions are doing. At the moment they do absolutely nothing, I might be wrong
These functions have different definitions, depending on the value of DEBUG_FS[1]. If this symbol is defined, these functions create entries in /sys/kernel/debug, which are useful for kernel developers. Please mind that these functions are defined twice in that file. For example:
And like I said before, we have to also define empty functions, so no matter if that config option is selected or not, the kernel can be built.
All the best,
Karolina
---------------------------------
[1] - https://elixir.bootlin.com/linux/latest/source/lib/Kconfig.debug#L626
Hey there,
just as a heads up, the vc04_services staging drivers seem to be actively developed elsewhere [1]. I'm not sure how they plan to upstream their code later.
Ricardo
---
[1]: https://github.com/raspberrypi/linux/tree/rpi-6.1.y/drivers/staging/vc04_services
Greg Kroah-Hartman
maintainerQuoted 5 lines · Ricardo B. Marliere
Hey there,
just as a heads up, the
vc04_servicesstaging drivers seem to be actively developed elsewhere [1]. I'm not sure how they plan to upstream their code later.
They are being actively developed here, one the staging list, whatever out-of-tree stuff will come after all of the required fixes and cleanups will get merged here and then the out-of-tree stuff can be added later.
So no need to worry about random github trees please.
thanks,
greg k-h
Quoted 7 lines · Greg Kroah-Hartman
Quoted 5 lines · Ricardo B. Marliere
Hey there,
just as a heads up, the
vc04_servicesstaging drivers seem to be actively developed elsewhere [1]. I'm not sure how they plan to upstream their code later.
Quoted 5 lines
They are being actively developed here, one the staging list, whatever out-of-tree stuff will come after all of the required fixes and cleanups will get merged here and then the out-of-tree stuff can be added later.
So no need to worry about random github trees please.
That is good to know, thanks for the clarification!
- Ricardo
Greg Kroah-Hartman
maintainerQuoted 4 lines · Calvince Otieno
The functions
vchiq_debugfs_init(),vchiq_debugfs_deinit(),vchiq_debugfs_add_instance(), andvchiq_debugfs_remove_instance()are declared and defined but contains no code or statements. They do nothing.
On the contrary, they do a lot! Try building with CONFIG_DEBUG_FS disabled and see what happens with your patch applied (hint, it breaks the build badly...)
To be fair, the "empty" functions should be moved to the .h file, not the .c file, so if you want to do that, it would make more sense overall.
thanks,
greg k-h
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Calvince,
kernel test robot noticed the following build warnings:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Calvince-Otieno/staging-vc04_services-remove-empty-functions/20231019-174823 base: staging/staging-testing patch link: https://lore.kernel.org/r/ZTD677iqMkRPxT27%40lab-ubuntu patch subject: [PATCH] staging: vc04_services: remove empty functions config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20231020/[email protected]/config) compiler: sparc64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:181:6: warning: no previous prototype for 'vchiq_debugfs_add_instance' [-Wmissing-prototypes]
181 | void vchiq_debugfs_add_instance(struct vchiq_instance *instance)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:198:6: warning: no previous prototype for 'vchiq_debugfs_remove_instance' [-Wmissing-prototypes]
198 | void vchiq_debugfs_remove_instance(struct vchiq_instance *instance)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:206:6: warning: no previous prototype for 'vchiq_debugfs_init' [-Wmissing-prototypes]
206 | void vchiq_debugfs_init(void)
| ^~~~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:224:6: warning: no previous prototype for 'vchiq_debugfs_deinit' [-Wmissing-prototypes] 224 | void vchiq_debugfs_deinit(void)
| ^~~~~~~~~~~~~~~~~~~~
vim +/vchiq_debugfs_add_instance +181 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
71bad7f086419d popcornmix 2013-07-02 179
71bad7f086419d popcornmix 2013-07-02 180 /* add an instance (process) to the debugfs entries */
4ddf9a2555caf2 Jamal Shareef 2019-11-05 @181 void vchiq_debugfs_add_instance(struct vchiq_instance *instance)
71bad7f086419d popcornmix 2013-07-02 182 {
71bad7f086419d popcornmix 2013-07-02 183 char pidstr[16];
0723103f8ba15a Greg Kroah-Hartman 2018-06-01 184 struct dentry *top;
71bad7f086419d popcornmix 2013-07-02 185
71bad7f086419d popcornmix 2013-07-02 186 snprintf(pidstr, sizeof(pidstr), "%d",
71bad7f086419d popcornmix 2013-07-02 187 vchiq_instance_get_pid(instance));
71bad7f086419d popcornmix 2013-07-02 188
24e8d3fc42f259 Greg Kroah-Hartman 2018-06-01 189 top = debugfs_create_dir(pidstr, vchiq_dbg_clients);
71bad7f086419d popcornmix 2013-07-02 190
0723103f8ba15a Greg Kroah-Hartman 2018-06-01 191 debugfs_create_file("use_count", 0444, top, instance,
71bad7f086419d popcornmix 2013-07-02 192 &debugfs_usecount_fops);
0723103f8ba15a Greg Kroah-Hartman 2018-06-01 193 debugfs_create_file("trace", 0644, top, instance, &debugfs_trace_fops);
71bad7f086419d popcornmix 2013-07-02 194
71bad7f086419d popcornmix 2013-07-02 195 vchiq_instance_get_debugfs_node(instance)->dentry = top;
71bad7f086419d popcornmix 2013-07-02 196 }
71bad7f086419d popcornmix 2013-07-02 197
4ddf9a2555caf2 Jamal Shareef 2019-11-05 @198 void vchiq_debugfs_remove_instance(struct vchiq_instance *instance)
71bad7f086419d popcornmix 2013-07-02 199 {
aa987e55132f78 Dominic Braun 2018-12-14 200 struct vchiq_debugfs_node *node =
aa987e55132f78 Dominic Braun 2018-12-14 201 vchiq_instance_get_debugfs_node(instance);
6e475350a40685 Yamanappagouda Patil 2017-02-21 202
71bad7f086419d popcornmix 2013-07-02 203 debugfs_remove_recursive(node->dentry);
71bad7f086419d popcornmix 2013-07-02 204 }
71bad7f086419d popcornmix 2013-07-02 205
0723103f8ba15a Greg Kroah-Hartman 2018-06-01 @206 void vchiq_debugfs_init(void)
71bad7f086419d popcornmix 2013-07-02 207 {
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 208 struct dentry *dir;
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 209 int i;
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 210
2739deaece4bc2 Greg Kroah-Hartman 2018-06-01 211 vchiq_dbg_dir = debugfs_create_dir("vchiq", NULL);
24e8d3fc42f259 Greg Kroah-Hartman 2018-06-01 212 vchiq_dbg_clients = debugfs_create_dir("clients", vchiq_dbg_dir);
71bad7f086419d popcornmix 2013-07-02 213
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 214 /* create an entry under <debugfs>/vchiq/log for each log category */
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 215 dir = debugfs_create_dir("log", vchiq_dbg_dir);
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 216
e1a17ce82f1808 Stefan Wahren 2022-01-23 217 for (i = 0; i < ARRAY_SIZE(vchiq_debugfs_log_entries); i++)
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 218 debugfs_create_file(vchiq_debugfs_log_entries[i].name, 0644,
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 219 dir, vchiq_debugfs_log_entries[i].plevel,
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 220 &debugfs_log_fops);
71bad7f086419d popcornmix 2013-07-02 221 }
71bad7f086419d popcornmix 2013-07-02 222
71bad7f086419d popcornmix 2013-07-02 223 /* remove all the debugfs entries */
71bad7f086419d popcornmix 2013-07-02 @224 void vchiq_debugfs_deinit(void)
71bad7f086419d popcornmix 2013-07-02 225 {
2739deaece4bc2 Greg Kroah-Hartman 2018-06-01 226 debugfs_remove_recursive(vchiq_dbg_dir);
71bad7f086419d popcornmix 2013-07-02 227 }
71bad7f086419d popcornmix 2013-07-02 228 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Calvince,
kernel test robot noticed the following build warnings:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Calvince-Otieno/staging-vc04_services-remove-empty-functions/20231019-174823 base: staging/staging-testing patch link: https://lore.kernel.org/r/ZTD677iqMkRPxT27%40lab-ubuntu patch subject: [PATCH] staging: vc04_services: remove empty functions config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20231107/[email protected]/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231107/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:181:6: warning: no previous prototype for function 'vchiq_debugfs_add_instance' [-Wmissing-prototypes]
void vchiq_debugfs_add_instance(struct vchiq_instance *instance)
^
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:181:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void vchiq_debugfs_add_instance(struct vchiq_instance *instance)
^
static
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:198:6: warning: no previous prototype for function 'vchiq_debugfs_remove_instance' [-Wmissing-prototypes]
void vchiq_debugfs_remove_instance(struct vchiq_instance *instance)
^
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:198:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void vchiq_debugfs_remove_instance(struct vchiq_instance *instance)
^
static
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:206:6: warning: no previous prototype for function 'vchiq_debugfs_init' [-Wmissing-prototypes]
void vchiq_debugfs_init(void)
^
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:206:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void vchiq_debugfs_init(void)
^
static
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:224:6: warning: no previous prototype for function 'vchiq_debugfs_deinit' [-Wmissing-prototypes]
void vchiq_debugfs_deinit(void)
^ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c:224:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void vchiq_debugfs_deinit(void)
^
static
4 warnings generated.
vim +/vchiq_debugfs_add_instance +181 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c
71bad7f086419d popcornmix 2013-07-02 179
71bad7f086419d popcornmix 2013-07-02 180 /* add an instance (process) to the debugfs entries */
4ddf9a2555caf2 Jamal Shareef 2019-11-05 @181 void vchiq_debugfs_add_instance(struct vchiq_instance *instance)
71bad7f086419d popcornmix 2013-07-02 182 {
71bad7f086419d popcornmix 2013-07-02 183 char pidstr[16];
0723103f8ba15a Greg Kroah-Hartman 2018-06-01 184 struct dentry *top;
71bad7f086419d popcornmix 2013-07-02 185
71bad7f086419d popcornmix 2013-07-02 186 snprintf(pidstr, sizeof(pidstr), "%d",
71bad7f086419d popcornmix 2013-07-02 187 vchiq_instance_get_pid(instance));
71bad7f086419d popcornmix 2013-07-02 188
24e8d3fc42f259 Greg Kroah-Hartman 2018-06-01 189 top = debugfs_create_dir(pidstr, vchiq_dbg_clients);
71bad7f086419d popcornmix 2013-07-02 190
0723103f8ba15a Greg Kroah-Hartman 2018-06-01 191 debugfs_create_file("use_count", 0444, top, instance,
71bad7f086419d popcornmix 2013-07-02 192 &debugfs_usecount_fops);
0723103f8ba15a Greg Kroah-Hartman 2018-06-01 193 debugfs_create_file("trace", 0644, top, instance, &debugfs_trace_fops);
71bad7f086419d popcornmix 2013-07-02 194
71bad7f086419d popcornmix 2013-07-02 195 vchiq_instance_get_debugfs_node(instance)->dentry = top;
71bad7f086419d popcornmix 2013-07-02 196 }
71bad7f086419d popcornmix 2013-07-02 197
4ddf9a2555caf2 Jamal Shareef 2019-11-05 @198 void vchiq_debugfs_remove_instance(struct vchiq_instance *instance)
71bad7f086419d popcornmix 2013-07-02 199 {
aa987e55132f78 Dominic Braun 2018-12-14 200 struct vchiq_debugfs_node *node =
aa987e55132f78 Dominic Braun 2018-12-14 201 vchiq_instance_get_debugfs_node(instance);
6e475350a40685 Yamanappagouda Patil 2017-02-21 202
71bad7f086419d popcornmix 2013-07-02 203 debugfs_remove_recursive(node->dentry);
71bad7f086419d popcornmix 2013-07-02 204 }
71bad7f086419d popcornmix 2013-07-02 205
0723103f8ba15a Greg Kroah-Hartman 2018-06-01 @206 void vchiq_debugfs_init(void)
71bad7f086419d popcornmix 2013-07-02 207 {
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 208 struct dentry *dir;
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 209 int i;
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 210
2739deaece4bc2 Greg Kroah-Hartman 2018-06-01 211 vchiq_dbg_dir = debugfs_create_dir("vchiq", NULL);
24e8d3fc42f259 Greg Kroah-Hartman 2018-06-01 212 vchiq_dbg_clients = debugfs_create_dir("clients", vchiq_dbg_dir);
71bad7f086419d popcornmix 2013-07-02 213
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 214 /* create an entry under <debugfs>/vchiq/log for each log category */
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 215 dir = debugfs_create_dir("log", vchiq_dbg_dir);
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 216
e1a17ce82f1808 Stefan Wahren 2022-01-23 217 for (i = 0; i < ARRAY_SIZE(vchiq_debugfs_log_entries); i++)
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 218 debugfs_create_file(vchiq_debugfs_log_entries[i].name, 0644,
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 219 dir, vchiq_debugfs_log_entries[i].plevel,
3b93c0f4b6accb Greg Kroah-Hartman 2018-06-01 220 &debugfs_log_fops);
71bad7f086419d popcornmix 2013-07-02 221 }
71bad7f086419d popcornmix 2013-07-02 222
71bad7f086419d popcornmix 2013-07-02 223 /* remove all the debugfs entries */
71bad7f086419d popcornmix 2013-07-02 @224 void vchiq_debugfs_deinit(void)
71bad7f086419d popcornmix 2013-07-02 225 {
2739deaece4bc2 Greg Kroah-Hartman 2018-06-01 226 debugfs_remove_recursive(vchiq_dbg_dir);
71bad7f086419d popcornmix 2013-07-02 227 }
71bad7f086419d popcornmix 2013-07-02 228 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki