summaryrefslogtreecommitdiffstats
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-10-28 21:37:38 +0000
committerMark Brown <broonie@kernel.org>2020-10-28 21:37:38 +0000
commitf59cddd8517ab880fb09bf1465b07b337e058b22 (patch)
treeb8ac2b4bd99f6b4860dd403bb39b2b7149ed06e0 /include/linux/moduleparam.h
parent43c3e148830aae5469c411a2bf951d4fe7fcea29 (diff)
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff)
downloadcachepc-linux-f59cddd8517ab880fb09bf1465b07b337e058b22.tar.gz
cachepc-linux-f59cddd8517ab880fb09bf1465b07b337e058b22.zip
Merge tag 'v5.10-rc1' into regulator-5.10
Linux 5.10-rc1
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r--include/linux/moduleparam.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 1ad5aa3b86d9..6388eb9734a5 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -22,7 +22,7 @@
#define __MODULE_INFO(tag, name, info) \
static const char __UNIQUE_ID(name)[] \
- __used __attribute__((section(".modinfo"), unused, aligned(1))) \
+ __used __section(".modinfo") __attribute__((unused, aligned(1))) \
= __MODULE_INFO_PREFIX __stringify(tag) "=" info
#define __MODULE_PARM_TYPE(name, _type) \
@@ -118,7 +118,7 @@ struct kparam_array
* you can create your own by defining those variables.
*
* Standard types are:
- * byte, short, ushort, int, uint, long, ulong
+ * byte, hexint, short, ushort, int, uint, long, ulong
* charp: a character pointer
* bool: a bool, values 0/1, y/n, Y/N.
* invbool: the above, only sense-reversed (N = true).
@@ -289,7 +289,7 @@ struct kparam_array
static const char __param_str_##name[] = prefix #name; \
static struct kernel_param __moduleparam_const __param_##name \
__used \
- __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
+ __section("__param") __attribute__ ((unused, aligned(sizeof(void *)))) \
= { __param_str_##name, THIS_MODULE, ops, \
VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } }
@@ -448,6 +448,11 @@ extern int param_set_ullong(const char *val, const struct kernel_param *kp);
extern int param_get_ullong(char *buffer, const struct kernel_param *kp);
#define param_check_ullong(name, p) __param_check(name, p, unsigned long long)
+extern const struct kernel_param_ops param_ops_hexint;
+extern int param_set_hexint(const char *val, const struct kernel_param *kp);
+extern int param_get_hexint(char *buffer, const struct kernel_param *kp);
+#define param_check_hexint(name, p) param_check_uint(name, p)
+
extern const struct kernel_param_ops param_ops_charp;
extern int param_set_charp(const char *val, const struct kernel_param *kp);
extern int param_get_charp(char *buffer, const struct kernel_param *kp);