diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2014-07-28 16:30:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-30 17:00:06 -0400 |
commit | f241e7497ec2d22b83002b17ae91a851d4034cb7 (patch) | |
tree | 5d8179647f85be21bad567cdce578a78ca6de875 /include/linux/mlx5 | |
parent | 9603b61de1eee92977d74ff42541be20c0c5b1a7 (diff) |
mlx5: minor fixes (mainly avoidance of hidden casts)
There were many places where parameters which should be u8/u16 were
integer type.
Additionally, in 2 places, a check for a non-null pointer was added
before dereferencing the pointer (this is actually a bug fix).
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r-- | include/linux/mlx5/device.h | 4 | ||||
-rw-r--r-- | include/linux/mlx5/driver.h | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index 3406cfb1267a..334947151dfc 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h | |||
@@ -456,9 +456,6 @@ struct mlx5_eqe_cq_err { | |||
456 | u8 syndrome; | 456 | u8 syndrome; |
457 | }; | 457 | }; |
458 | 458 | ||
459 | struct mlx5_eqe_dropped_packet { | ||
460 | }; | ||
461 | |||
462 | struct mlx5_eqe_port_state { | 459 | struct mlx5_eqe_port_state { |
463 | u8 reserved0[8]; | 460 | u8 reserved0[8]; |
464 | u8 port; | 461 | u8 port; |
@@ -498,7 +495,6 @@ union ev_data { | |||
498 | struct mlx5_eqe_comp comp; | 495 | struct mlx5_eqe_comp comp; |
499 | struct mlx5_eqe_qp_srq qp_srq; | 496 | struct mlx5_eqe_qp_srq qp_srq; |
500 | struct mlx5_eqe_cq_err cq_err; | 497 | struct mlx5_eqe_cq_err cq_err; |
501 | struct mlx5_eqe_dropped_packet dp; | ||
502 | struct mlx5_eqe_port_state port; | 498 | struct mlx5_eqe_port_state port; |
503 | struct mlx5_eqe_gpio gpio; | 499 | struct mlx5_eqe_gpio gpio; |
504 | struct mlx5_eqe_congestion cong; | 500 | struct mlx5_eqe_congestion cong; |
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index d0cb5984a45f..76de0cc41640 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h | |||
@@ -381,8 +381,8 @@ struct mlx5_buf { | |||
381 | struct mlx5_buf_list *page_list; | 381 | struct mlx5_buf_list *page_list; |
382 | int nbufs; | 382 | int nbufs; |
383 | int npages; | 383 | int npages; |
384 | int page_shift; | ||
385 | int size; | 384 | int size; |
385 | u8 page_shift; | ||
386 | }; | 386 | }; |
387 | 387 | ||
388 | struct mlx5_eq { | 388 | struct mlx5_eq { |
@@ -736,7 +736,7 @@ int mlx5_core_dump_fill_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr, | |||
736 | int mlx5_core_alloc_pd(struct mlx5_core_dev *dev, u32 *pdn); | 736 | int mlx5_core_alloc_pd(struct mlx5_core_dev *dev, u32 *pdn); |
737 | int mlx5_core_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn); | 737 | int mlx5_core_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn); |
738 | int mlx5_core_mad_ifc(struct mlx5_core_dev *dev, void *inb, void *outb, | 738 | int mlx5_core_mad_ifc(struct mlx5_core_dev *dev, void *inb, void *outb, |
739 | u16 opmod, int port); | 739 | u16 opmod, u8 port); |
740 | void mlx5_pagealloc_init(struct mlx5_core_dev *dev); | 740 | void mlx5_pagealloc_init(struct mlx5_core_dev *dev); |
741 | void mlx5_pagealloc_cleanup(struct mlx5_core_dev *dev); | 741 | void mlx5_pagealloc_cleanup(struct mlx5_core_dev *dev); |
742 | int mlx5_pagealloc_start(struct mlx5_core_dev *dev); | 742 | int mlx5_pagealloc_start(struct mlx5_core_dev *dev); |
@@ -769,7 +769,7 @@ void mlx5_qp_debugfs_cleanup(struct mlx5_core_dev *dev); | |||
769 | int mlx5_core_access_reg(struct mlx5_core_dev *dev, void *data_in, | 769 | int mlx5_core_access_reg(struct mlx5_core_dev *dev, void *data_in, |
770 | int size_in, void *data_out, int size_out, | 770 | int size_in, void *data_out, int size_out, |
771 | u16 reg_num, int arg, int write); | 771 | u16 reg_num, int arg, int write); |
772 | int mlx5_set_port_caps(struct mlx5_core_dev *dev, int port_num, u32 caps); | 772 | int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); |
773 | 773 | ||
774 | int mlx5_debug_eq_add(struct mlx5_core_dev *dev, struct mlx5_eq *eq); | 774 | int mlx5_debug_eq_add(struct mlx5_core_dev *dev, struct mlx5_eq *eq); |
775 | void mlx5_debug_eq_remove(struct mlx5_core_dev *dev, struct mlx5_eq *eq); | 775 | void mlx5_debug_eq_remove(struct mlx5_core_dev *dev, struct mlx5_eq *eq); |
@@ -826,7 +826,7 @@ void mlx5_unregister_interface(struct mlx5_interface *intf); | |||
826 | 826 | ||
827 | struct mlx5_profile { | 827 | struct mlx5_profile { |
828 | u64 mask; | 828 | u64 mask; |
829 | u32 log_max_qp; | 829 | u8 log_max_qp; |
830 | struct { | 830 | struct { |
831 | int size; | 831 | int size; |
832 | int limit; | 832 | int limit; |