Pārlūkot izejas kodu

[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>
Randy Dunlap 19 gadi atpakaļ
vecāks
revīzija
3d2aef6689
4 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. 2 1
      include/linux/textsearch.h
  2. 1 1
      lib/ts_bm.c
  3. 1 1
      lib/ts_fsm.c
  4. 1 1
      lib/ts_kmp.c

+ 2 - 1
include/linux/textsearch.h

@@ -158,7 +158,8 @@ extern unsigned int textsearch_find_continuous(struct ts_config *,
 #define TS_PRIV_ALIGNTO	8
 #define TS_PRIV_ALIGNTO	8
 #define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1))
 #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;
 	struct ts_config *conf;
 
 

+ 1 - 1
lib/ts_bm.c

@@ -127,7 +127,7 @@ static void compute_prefix_tbl(struct ts_bm *bm, const u8 *pattern,
 }
 }
 
 
 static struct ts_config *bm_init(const void *pattern, unsigned int len,
 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_config *conf;
 	struct ts_bm *bm;
 	struct ts_bm *bm;

+ 1 - 1
lib/ts_fsm.c

@@ -258,7 +258,7 @@ found_match:
 }
 }
 
 
 static struct ts_config *fsm_init(const void *pattern, unsigned int len,
 static struct ts_config *fsm_init(const void *pattern, unsigned int len,
-				     int gfp_mask)
+				     unsigned int __nocast gfp_mask)
 {
 {
 	int i, err = -EINVAL;
 	int i, err = -EINVAL;
 	struct ts_config *conf;
 	struct ts_config *conf;

+ 1 - 1
lib/ts_kmp.c

@@ -87,7 +87,7 @@ static inline void compute_prefix_tbl(const u8 *pattern, unsigned int len,
 }
 }
 
 
 static struct ts_config *kmp_init(const void *pattern, unsigned int len,
 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_config *conf;
 	struct ts_kmp *kmp;
 	struct ts_kmp *kmp;