[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220124181812.1869535-3-ztong0001@gmail.com>
Date: Mon, 24 Jan 2022 10:18:13 -0800
From: Tong Zhang <ztong0001@...il.com>
To: Alexander Viro <viro@...iv.linux.org.uk>,
Eric Biederman <ebiederm@...ssion.com>,
Kees Cook <keescook@...omium.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Iurii Zaikin <yzaikin@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Tong Zhang <ztong0001@...il.com>, kernel test robot <lkp@...el.com>
Subject: [PATCH v2 2/2] sysctl: fix return type to make compiler happy
When CONFIG_SYSCTL=n and CONFIG_BINFMT_MISC={y,m}, compiler will
complain due to return type not matching. Fix the return type in
register_sysctl_mount_point() to make compiler happy
fs/binfmt_misc.c: In function ‘init_misc_binfmt’:
fs/binfmt_misc.c:827:21: error: assignment to ‘struct ctl_table_header *’ from incompatible pointer type ‘struct sysctl_header *’ [-Werror=incompatible-pointer-types]
827 | binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc");
Fixes: ee9efac48a08("sysctl: add helper to register a sysctl mount point")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Tong Zhang <ztong0001@...il.com>
---
include/linux/sysctl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 180adf7da785..6353d6db69b2 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -265,7 +265,7 @@ static inline struct ctl_table_header *register_sysctl_table(struct ctl_table *
return NULL;
}
-static inline struct sysctl_header *register_sysctl_mount_point(const char *path)
+static inline struct ctl_table_header *register_sysctl_mount_point(const char *path)
{
return NULL;
}
--
2.25.1
Powered by blists - more mailing lists