Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1661867ybe; Sat, 7 Sep 2019 00:02:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyjl8imxHvdr3aHMIRhXrUSdk6xCNjQJcphH7v5PzxetZ1nxJzc2EHdmEHqLVZ/QBKhbdj X-Received: by 2002:a17:90a:c8a:: with SMTP id v10mr13306556pja.6.1567839760559; Sat, 07 Sep 2019 00:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567839760; cv=none; d=google.com; s=arc-20160816; b=GvlBsWsIyQcz+2PhqDQSx1repLjBKTzdZo3OZ/xkWTcy/w4JRjWzqkOGQQUE/Lyv2Z KcmJikrstq6s7NhQwE9yUQyxyJAuDntC0gzyNwLU3BiAlP4tu/d7zXPkgrlZBjpSFFVS KBsRfKd+vYZj+DY1/xtQHHtMs81rZM5savEp3dj+ZB9/BIJvIVpLT+xdAelSOoYVXBst wMKn/Neq9YRpmoYxk6P3MsSmAxAlnp/ysHP8yOgABZJdGqvi3vgHQqJKi/LB50S+DHA7 S4JWCxHLxM8w+nYYSn7P7+63n1nq3fLIqsTMl2efMRrdLwRi/WGQoK02+cYEyHEs4xGS gaMw== 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 :message-id:date:subject:cc:to:from; bh=u5PP7eGJD6apvkcmpl/xzCP7737Wq23qCCUCYAPxC+M=; b=KA/JCL0BFL1ds7BrjskW0XZ1SX8QWjLezsPUpH2WbvYGb3idrD5FxjOToAzhdP+8BL 2NJvA2qdYv/w0lHLRqZpyF9WaRcSDGaIAOTjMwk026jqTjuPmtkVF05IUxXaZLORC104 xWZ44Bvu0ko20yPn7SLJd1k8v6G2l4zlMFTv19MXnuvUBcxrGlxIuHhby5rxxsAykA3U AnSMdY1TprR707EH3UP+KiL2pOJUUCyvWSiPaVWyzOe9//6BH90i5JnjcjLFR3ooD0VR GIG9cL/LHvAo4y3/cBRHWYDw7V+muu6GmyYM6lpg1ehKvaQkutieYIikFXZWpaL4Phq3 AxYA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si6279574pgr.196.2019.09.07.00.02.24; Sat, 07 Sep 2019 00:02:40 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394904AbfIFPnD (ORCPT + 99 others); Fri, 6 Sep 2019 11:43:03 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:35393 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394896AbfIFPnD (ORCPT ); Fri, 6 Sep 2019 11:43:03 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1M7sYM-1i1IIg2adW-0051I2; Fri, 06 Sep 2019 17:42:44 +0200 From: Arnd Bergmann To: Doug Ledford , Jason Gunthorpe Cc: Arnd Bergmann , Leon Romanovsky , Jason Gunthorpe , Shiraz Saleem , Leon Romanovsky , "Michael J. Ruhl" , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ib_umem: fix type mismatch Date: Fri, 6 Sep 2019 17:42:37 +0200 Message-Id: <20190906154243.2282560-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V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xDrjGGwwudk5c43HzF2UZX6 pvkoAl/nKG3wlJV4nM6Ipna7Saa7KW3T0iQp0/piQO/uDPkWtk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On some 32-bit architectures, size_t is defined as 'int' rather than 'long', causing a harmless warning: drivers/infiniband/core/umem_odp.c:220:7: error: comparison of distinct pointer types ('typeof (umem_odp->umem.address) *' (aka 'unsigned long *') and 'typeof (umem_odp->umem.length) *' (aka 'unsigned int *')) [-Werror,-Wcompare-distinct-pointer-types] if (check_add_overflow(umem_odp->umem.address, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:59:15: note: expanded from macro 'check_add_overflow' (void) (&__a == &__b); \ ~~~~ ^ ~~~~ As size_t is always the same length as unsigned long in all supported architectures, change the structure definition to use the unsigned long type for both. Fixes: 204e3e5630c5 ("RDMA/odp: Check for overflow when computing the umem_odp end") Signed-off-by: Arnd Bergmann --- include/rdma/ib_umem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index a91b2af64ec4..5dffe05402ef 100644 --- a/include/rdma/ib_umem.h +++ b/include/rdma/ib_umem.h @@ -44,7 +44,7 @@ struct ib_umem_odp; struct ib_umem { struct ib_device *ibdev; struct mm_struct *owning_mm; - size_t length; + unsigned long length; unsigned long address; u32 writable : 1; u32 is_odp : 1; -- 2.20.0