From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by gmr-mx.google.com with ESMTPS id f12si591902vso.1.2019.11.16.07.53.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2019 07:53:00 -0800 (PST) From: Sasha Levin Subject: [PATCH AUTOSEL 4.9 71/99] ntb: intel: fix return value for ndev_vec_mask() Date: Sat, 16 Nov 2019 10:50:34 -0500 Message-Id: <20191116155103.10971-71-sashal@kernel.org> In-Reply-To: <20191116155103.10971-1-sashal@kernel.org> References: <20191116155103.10971-1-sashal@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dave Jiang , Lucas Van , Jon Mason , Sasha Levin , linux-ntb@googlegroups.com List-ID: From: Dave Jiang [ Upstream commit 7756e2b5d68c36e170a111dceea22f7365f83256 ] ndev_vec_mask() should be returning u64 mask value instead of int. Otherwise the mask value returned can be incorrect for larger vectors. Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers") Signed-off-by: Dave Jiang Tested-by: Lucas Van Signed-off-by: Jon Mason Signed-off-by: Sasha Levin --- drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c index 7310a261c858b..e175cbeba266f 100644 --- a/drivers/ntb/hw/intel/ntb_hw_intel.c +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c @@ -330,7 +330,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; -- 2.20.1