From patchwork Fri Jan 24 09:32:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76DF9C35242 for ; Fri, 24 Jan 2020 10:07:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44BEE214DB for ; Fri, 24 Jan 2020 10:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579860461; bh=1SRjTnV20dg5/VzTUjEQ4H/tE+oFjJK7N8fz5kY4F0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=D3/1hB7A36Mmrs+iRj0xj+N/xX0KXLGAocCFDdte74WicLVZUQcYguf5fKDfdUwQM CWSTsF7biboArT7sim9cE/zEl7w2CCOQpNS4xN8bdi2lA9ON7IWjqqlIslAYa8w1Qw lID8VNK+1lIXgdz5ax+C8CnSEBoXfXEhElzj7RYg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733183AbgAXKHk (ORCPT ); Fri, 24 Jan 2020 05:07:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:44256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389036AbgAXKHj (ORCPT ); Fri, 24 Jan 2020 05:07:39 -0500 Received: from localhost (unknown [145.15.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7AB632087E; Fri, 24 Jan 2020 10:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579860459; bh=1SRjTnV20dg5/VzTUjEQ4H/tE+oFjJK7N8fz5kY4F0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QgC6k5nJ05sloGLfDGedP0EbmPssk2b1v6oPgK06wnrxlcNcOM8dE5hMBXDdyqmbZ p7QN/Pxq+yKob+H/arw0aQAvKILXHhK94DCyNpwPaw8ItCypohmSdcNquyWzfHblyz SiSs+/iS1SyFJ1pLPUKRVTwKLByEXR0UKaPEqakw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Israel Rukshin , Max Gurtovoy , Sagi Grimberg , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.14 341/343] IB/iser: Fix dma_nents type definition Date: Fri, 24 Jan 2020 10:32:39 +0100 Message-Id: <20200124093004.613711197@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124092919.490687572@linuxfoundation.org> References: <20200124092919.490687572@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Max Gurtovoy [ Upstream commit c1545f1a200f4adc4ef8dd534bf33e2f1aa22c2f ] The retured value from ib_dma_map_sg saved in dma_nents variable. To avoid future mismatch between types, define dma_nents as an integer instead of unsigned. Fixes: 57b26497fabe ("IB/iser: Pass the correct number of entries for dma mapped SGL") Reported-by: Dan Carpenter Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg Reviewed-by: Dan Carpenter Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/iser/iscsi_iser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index c1ae4aeae2f90..46dfc6ae9d1c1 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h @@ -197,7 +197,7 @@ struct iser_data_buf { struct scatterlist *sg; int size; unsigned long data_len; - unsigned int dma_nents; + int dma_nents; }; /* fwd declarations */