[TEXTSEARCH]: fix sparse gfp nocast warnings
Fix nocast sparse warnings:
include/linux/textsearch.h:165:57: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h
index 941f45a..1a4990e 100644
--- a/include/linux/textsearch.h
+++ b/include/linux/textsearch.h
@@ -158,7 +158,8 @@
#define TS_PRIV_ALIGNTO 8
#define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1))
-static inline struct ts_config *alloc_ts_config(size_t payload, int gfp_mask)
+static inline struct ts_config *alloc_ts_config(size_t payload,
+ unsigned int __nocast gfp_mask)
{
struct ts_config *conf;
diff --git a/lib/ts_bm.c b/lib/ts_bm.c
index 2cc79112..1b61fce 100644
--- a/lib/ts_bm.c
+++ b/lib/ts_bm.c
@@ -127,7 +127,7 @@
}
static struct ts_config *bm_init(const void *pattern, unsigned int len,
- int gfp_mask)
+ unsigned int __nocast gfp_mask)
{
struct ts_config *conf;
struct ts_bm *bm;
diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c
index d27c0a0..ef9779e 100644
--- a/lib/ts_fsm.c
+++ b/lib/ts_fsm.c
@@ -258,7 +258,7 @@
}
static struct ts_config *fsm_init(const void *pattern, unsigned int len,
- int gfp_mask)
+ unsigned int __nocast gfp_mask)
{
int i, err = -EINVAL;
struct ts_config *conf;
diff --git a/lib/ts_kmp.c b/lib/ts_kmp.c
index 73266b9..e45f0f0 100644
--- a/lib/ts_kmp.c
+++ b/lib/ts_kmp.c
@@ -87,7 +87,7 @@
}
static struct ts_config *kmp_init(const void *pattern, unsigned int len,
- int gfp_mask)
+ unsigned int __nocast gfp_mask)
{
struct ts_config *conf;
struct ts_kmp *kmp;