aboutsummaryrefslogtreecommitdiffstats
path: root/config/kernel-shrink.m4
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2024-01-23 10:50:53 +1100
committerBrian Behlendorf <[email protected]>2024-01-29 11:36:07 -0800
commita41d0b29a9b31b2b257785071cac4acca4efdc19 (patch)
tree55a70cc216902565dc763d6b9415617dba1cb1db /config/kernel-shrink.m4
parent0c11f7c96f3b3c542de68b476b7954c3ac0f7e5c (diff)
Linux 6.8 compat: make test functions static
The kernel is now being compiled with -Wmissing-prototypes. Most of our test stub functions had no prototype, and failed to compile. Since they don't need to be visible anywhere else, just make them all static. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15805
Diffstat (limited to 'config/kernel-shrink.m4')
-rw-r--r--config/kernel-shrink.m413
1 files changed, 5 insertions, 8 deletions
diff --git a/config/kernel-shrink.m4 b/config/kernel-shrink.m4
index 4a529c43b..6580b08d5 100644
--- a/config/kernel-shrink.m4
+++ b/config/kernel-shrink.m4
@@ -8,9 +8,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK], [
ZFS_LINUX_TEST_SRC([super_block_s_shrink], [
#include <linux/fs.h>
- int shrink(struct shrinker *s, struct shrink_control *sc)
- { return 0; }
-
static const struct super_block
sb __attribute__ ((unused)) = {
.s_shrink.seeks = DEFAULT_SEEKS,
@@ -26,7 +23,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR], [
ZFS_LINUX_TEST_SRC([super_block_s_shrink_ptr], [
#include <linux/fs.h>
- unsigned long shrinker_cb(struct shrinker *shrink,
+ static unsigned long shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; }
static struct shrinker shrinker = {
.count_objects = shrinker_cb,
@@ -89,7 +86,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID], [
AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
ZFS_LINUX_TEST_SRC([register_shrinker_vararg], [
#include <linux/mm.h>
- unsigned long shrinker_cb(struct shrinker *shrink,
+ static unsigned long shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; }
],[
struct shrinker cache_shrinker = {
@@ -104,7 +101,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control], [
#include <linux/mm.h>
- int shrinker_cb(struct shrinker *shrink,
+ static int shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; }
],[
struct shrinker cache_shrinker = {
@@ -116,7 +113,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control_split], [
#include <linux/mm.h>
- unsigned long shrinker_cb(struct shrinker *shrink,
+ static unsigned long shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; }
],[
struct shrinker cache_shrinker = {
@@ -135,7 +132,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER], [
ZFS_LINUX_TEST_SRC([shrinker_register], [
#include <linux/shrinker.h>
- unsigned long shrinker_cb(struct shrinker *shrink,
+ static unsigned long shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; }
],[
struct shrinker cache_shrinker = {