From patchwork Tue Jan 28 14:06:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232590 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=unavailable 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 A8474C47409 for ; Tue, 28 Jan 2020 14:33:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7263E20716 for ; Tue, 28 Jan 2020 14:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221994; bh=MAl6iOkGqFidVtqHKpXauQzj8NI3g/vtUUpZCrgxORo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kbiw7sBloPKZ45gcWmBAnBSMTfbgOo0sQ16Wu7Z+MaF4n9Q1u3J8uQVVaw/K+dkeX 2Csv28h8h1Ta/VNuVIjNdpnHkU+pp2vT1lIxYrpixmwBHc0sJQtwDmzQWjAfrWcPW+ jfkT1XOpUmTIJq+VFSxzBEGmuS01lGJ3VMTajsz8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730852AbgA1OZo (ORCPT ); Tue, 28 Jan 2020 09:25:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:52774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730811AbgA1OZn (ORCPT ); Tue, 28 Jan 2020 09:25:43 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 5F0A62071E; Tue, 28 Jan 2020 14:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221542; bh=MAl6iOkGqFidVtqHKpXauQzj8NI3g/vtUUpZCrgxORo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=raw+LoLDgXJPJSKvbY03yokoMrxkgwjh+4oS44IcCgtPluUZDA3jbJfxMQSL6igua a1mp7SIxoN5X0doQf4X1HduzV+psbAc8IpDabQ2+ZiwijrTt3QDqn3joOngwIKvBPE /e/YCUpuLcHbxefqyrg8h3r/xHzFAJG0G57bNFtI= 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.9 230/271] IB/iser: Fix dma_nents type definition Date: Tue, 28 Jan 2020 15:06:19 +0100 Message-Id: <20200128135909.696358742@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@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 cb48e22afff72..a3614f7f00073 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 */