Skip to content

Commit e2abdcf

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5: Better return types for CQE API
Reduce sizes of return types. Use bool for binary indication. Signed-off-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent d34c6ef commit e2abdcf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/linux/mlx5/device.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ enum {
750750

751751
#define MLX5_MINI_CQE_ARRAY_SIZE 8
752752

753-
static inline int mlx5_get_cqe_format(struct mlx5_cqe64 *cqe)
753+
static inline u8 mlx5_get_cqe_format(struct mlx5_cqe64 *cqe)
754754
{
755755
return (cqe->op_own >> 2) & 0x3;
756756
}
@@ -770,14 +770,14 @@ static inline u8 get_cqe_l3_hdr_type(struct mlx5_cqe64 *cqe)
770770
return (cqe->l4_l3_hdr_type >> 2) & 0x3;
771771
}
772772

773-
static inline u8 cqe_is_tunneled(struct mlx5_cqe64 *cqe)
773+
static inline bool cqe_is_tunneled(struct mlx5_cqe64 *cqe)
774774
{
775775
return cqe->outer_l3_tunneled & 0x1;
776776
}
777777

778-
static inline int cqe_has_vlan(struct mlx5_cqe64 *cqe)
778+
static inline bool cqe_has_vlan(struct mlx5_cqe64 *cqe)
779779
{
780-
return !!(cqe->l4_l3_hdr_type & 0x1);
780+
return cqe->l4_l3_hdr_type & 0x1;
781781
}
782782

783783
static inline u64 get_cqe_ts(struct mlx5_cqe64 *cqe)

0 commit comments

Comments
 (0)