Skip to content

Commit

Permalink
mlx4_core: Fix GFP flags parameters to be gfp_t
Browse files Browse the repository at this point in the history
Otherwise sparse gives a bunch of warnings like

    drivers/net/ethernet/mellanox/mlx4/srq.c:110:66: sparse: incorrect type in argument 4 (different base types)
    drivers/net/ethernet/mellanox/mlx4/srq.c:110:66:    expected int [signed] gfp
    drivers/net/ethernet/mellanox/mlx4/srq.c:110:66:    got restricted gfp_t

Signed-off-by: Roland Dreier <[email protected]>
  • Loading branch information
rolandd committed Jun 4, 2014
1 parent 40f2287 commit 4e2c341
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx4/icm.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev)
}

int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj,
int gfp)
gfp_t gfp)
{
u32 i = (obj & (table->num_obj - 1)) /
(MLX4_TABLE_CHUNK_SIZE / table->obj_size);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx4/icm.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages,
void mlx4_free_icm(struct mlx4_dev *dev, struct mlx4_icm *icm, int coherent);

int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj,
int gfp);
gfp_t gfp);
void mlx4_table_put(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj);
int mlx4_table_get_range(struct mlx4_dev *dev, struct mlx4_icm_table *table,
u32 start, u32 end);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx4/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ int __mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn, gfp_t gfp)
return err;
}

static int mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn, int gfp)
static int mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn, gfp_t gfp)
{
u64 param = 0;

Expand Down

0 comments on commit 4e2c341

Please sign in to comment.