Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp736546ybc; Sat, 16 Nov 2019 07:49:06 -0800 (PST) X-Google-Smtp-Source: APXvYqzO9MVRUroidTC1jqoTDdlODi0/bREHmEu4lXFM5nWDHvjYLvDLyan4dAIO7HbKJCpJGsK0 X-Received: by 2002:a17:906:4910:: with SMTP id b16mr10582821ejq.133.1573919346416; Sat, 16 Nov 2019 07:49:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573919346; cv=none; d=google.com; s=arc-20160816; b=m5pM7F3p+py+eSIGoyIjSemgFbENgKn0ubr9NkUiI6ZW8pqt3CHY2Oi7JP7pwZPqo4 9EXNOg0sOZpSrHWyspSdjJlMfTBgnXJpOIm9OyQdJkZnbpsvobL6PNZ6UybVf/Jw9Lbq VWTpBRk/0WENigSCxbVGhYFcL+CbX01AbLXssVBhPE6jmTjGc7C7asrmxZBpcS+BEqSy DAfBscaquo+HcG4sAp8myDvwi87QEKLgPMChukNrCgYmIUSPQeLnKXgO/c/2FENF7y0H m9dizCdi/K/wzm3ZuU71l6vJ22K22Yw9v0RxV4uskfJShABIkIU9cz0CwwzMsxrtEz0Y payQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KbUVUWEpw2r3Xpm0T3s906VuZ3DKWKipNHOFKzEcZCU=; b=uZgOc5PI3hEJ+jKEJlayX+LAI8vkvUJt+pRErsQCjMkqOq2NFJau/7U0V6Nh89r/NG UqFvH7OaJ5B79V0zA1hJVKTGJ3o+aMm0HsF5dZDDaD5B6CXEfqeefndtt2rKJod1wDTz NEKdtPCJovnDL+dVIJeCpdrPHKeuCPNvEpymHKaryQKKomMOiGhbLtqRsbd03ay0zOvm FRFihsO0LNWPlKBIzU11x6dMJUzXjpHB0fWHxeI35KjlOg7bOf33pkkxnnRxPfARmhY0 5g5LiYBdwBs1+C7RynlU1LaE41X1kPm5X2hC+oPqTuxeTVh2ireXnDK4p0v7Efs48Y91 G83w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HbpCe8VR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si7810443eju.50.2019.11.16.07.48.41; Sat, 16 Nov 2019 07:49:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HbpCe8VR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729359AbfKPPqW (ORCPT + 99 others); Sat, 16 Nov 2019 10:46:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:52214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729279AbfKPPqF (ORCPT ); Sat, 16 Nov 2019 10:46:05 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0782A2083B; Sat, 16 Nov 2019 15:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919165; bh=wX4O2JHToNm4AF5thow3+D7uWZoA5jbNZGRyT/NCEgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HbpCe8VRKY17xsavJd4m44nlQy754bLocd9UzlTA3NMndehqt3Ql5FrgJfUCmfQZD reJS2CxX4X+nhr9RoiUjARbfc+wXd0OtIWGFYZ0iKTslJXc9w5RFSSWwEMKrdSDBZ1 8BncWmHIX2njIb/CxLQZWc+8fP171aEeZVfGRukc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dave Jiang , Lucas Van , Jon Mason , Sasha Levin , linux-ntb@googlegroups.com Subject: [PATCH AUTOSEL 4.19 173/237] ntb: intel: fix return value for ndev_vec_mask() Date: Sat, 16 Nov 2019 10:40:08 -0500 Message-Id: <20191116154113.7417-173-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_gen1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c b/drivers/ntb/hw/intel/ntb_hw_gen1.c index 6aa5732272791..2ad263f708da7 100644 --- a/drivers/ntb/hw/intel/ntb_hw_gen1.c +++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c @@ -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; -- 2.20.1