Skip to content

Commit

Permalink
ntb: intel: fix return value for ndev_vec_mask()
Browse files Browse the repository at this point in the history
ndev_vec_mask() should be returning u64 mask value instead of int.
Otherwise the mask value returned can be incorrect for larger
vectors.

Fixes: e26a584 ("NTB: Split ntb_hw_intel and ntb_transport drivers")

Signed-off-by: Dave Jiang <[email protected]>
Tested-by: Lucas Van <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
  • Loading branch information
davejiang authored and jonmason committed Oct 31, 2018
1 parent a861594 commit 7756e2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ntb/hw/intel/ntb_hw_gen1.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static inline int ndev_db_clear_mask(struct intel_ntb_dev *ndev, u64 db_bits,
return 0;
}

static inline int ndev_vec_mask(struct intel_ntb_dev *ndev, int db_vector)
static inline u64 ndev_vec_mask(struct intel_ntb_dev *ndev, int db_vector)
{
u64 shift, mask;

Expand Down

0 comments on commit 7756e2b

Please sign in to comment.