Skip to content

Commit

Permalink
[TEXTSEARCH]: fix sparse gfp nocast warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Randy Dunlap authored and David S. Miller committed Oct 5, 2005
1 parent dd13a28 commit 3d2aef6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion include/linux/textsearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ extern unsigned int textsearch_find_continuous(struct ts_config *,
#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;

Expand Down
2 changes: 1 addition & 1 deletion lib/ts_bm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
int gfp_mask)
unsigned int __nocast gfp_mask)
{
struct ts_config *conf;
struct ts_bm *bm;
Expand Down
2 changes: 1 addition & 1 deletion lib/ts_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static unsigned int fsm_find(struct ts_config *conf, struct ts_state *state)
}

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;
Expand Down
2 changes: 1 addition & 1 deletion lib/ts_kmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
int gfp_mask)
unsigned int __nocast gfp_mask)
{
struct ts_config *conf;
struct ts_kmp *kmp;
Expand Down

0 comments on commit 3d2aef6

Please sign in to comment.