From: Tong Zhang <ztong0001@gmail.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
Eric Biederman <ebiederm@xmission.com>,
Kees Cook <keescook@chromium.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Iurii Zaikin <yzaikin@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Tong Zhang <ztong0001@gmail.com>, kernel test robot <lkp@intel.com>
Subject: [PATCH v2 2/2] sysctl: fix return type to make compiler happy
Date: Mon, 24 Jan 2022 10:18:13 -0800 [thread overview]
Message-ID: <20220124181812.1869535-3-ztong0001@gmail.com> (raw)
In-Reply-To: <20220124104012.nblfd6b5on4kojgi@wittgenstein>
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@intel.com>
Signed-off-by: Tong Zhang <ztong0001@gmail.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
next prev parent reply other threads:[~2022-01-24 18:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 0:33 [PATCH v1] binfmt_misc: fix crash when load/unload module Tong Zhang
2022-01-24 10:40 ` Christian Brauner
2022-01-24 18:18 ` [PATCH v2 0/2] Fix regression on binfmt_misc Tong Zhang
2022-01-24 18:18 ` [PATCH v2 1/2] binfmt_misc: fix crash when load/unload module Tong Zhang
2022-01-25 18:15 ` Luis Chamberlain
2022-01-24 18:18 ` Tong Zhang [this message]
2022-01-24 18:23 ` [PATCH v1] " Tong Zhang
2022-01-24 11:40 ` kernel test robot
2022-01-24 23:16 ` Andrew Morton
2022-01-25 18:14 ` Luis Chamberlain
2022-01-26 5:04 ` Murphy Zhou
2022-01-26 5:23 ` Tong Zhang
2022-01-26 6:33 ` Tong Zhang
2022-01-29 0:25 ` Murphy Zhou
2022-01-24 12:14 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220124181812.1869535-3-ztong0001@gmail.com \
--to=ztong0001@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mcgrof@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=yzaikin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®