Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5869292ybl; Tue, 27 Aug 2019 10:48:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4v7h5x2Gb0HT/wj/00ldiIr+Dvrl1IthFbjFChab1iSRVPbsmlxWZL+/lWM1ym3s0J3Y6 X-Received: by 2002:a65:684c:: with SMTP id q12mr20853331pgt.405.1566928095505; Tue, 27 Aug 2019 10:48:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566928095; cv=none; d=google.com; s=arc-20160816; b=wYn1FFC50yOHjNWrf1BPe1Rhj0KY24y0J3BiFBO2FXR7U+/3KTGq654zdhQ/4v6NB/ NmSyMbRj+xj5qoT89XhD2On8adexQxqyttneIp5B79gQDV3QZYVysI37l3qNMu3zRwcD DPTE00WtfZ6OP7FskFCGT5kolWjxaDOxyOwBO2Ci4Y6sOpuox2R4Ix68+wP74gMsf0yo Luii8RDGWcMGVgpfjdgjSeLCc0yf4XkCcxqeYmw1PGqXQWR1BBk54DxKuSolmb6hFAXi 8Il3N1M/exND9p9dTOA0ro68MZsqAMYEZ7nQ8XUWw3ThdRycSvgq8gSK1tdmQUAhs3VA tqsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FyO1L6ZjM9OWLociF3iSGLy+A4aCdHIgLbs8hRUui3c=; b=fj8luDiY7QlRPicPjfVT3tiBD/Lz6ZtDMEDR5+JnEGqcgK1mky2UCg9D7BoumvbHMe g338tcXm2P2v4/OFMJFhMb6w8U8mnC2TYS740Yke14Cal7+GYx855+h15+DGPX6vOhX1 GP42052VEHC8U+XykBmyVWtNzk8izNImIj9wJj+tnM/eYIDmkS84hUaVwFqRiifrIBHP zvWLSWOi6soR6ILCZ6qMSf5a4Vl/BKUedmwfKhuuJhuNe7UYE6vs5VkrpDL3Sw1MM0fi qMlV/tQq3ns7fvVlSC+NShc2cc3L56wSi4EoTX8qu+WRb9MAshZZkV+mgfyo6j4lRRhf cl0Q== 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 q4si7275pgv.106.2019.08.27.10.47.54; Tue, 27 Aug 2019 10:48:15 -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 S1730038AbfH0Rqu (ORCPT + 99 others); Tue, 27 Aug 2019 13:46:50 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:33346 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727401AbfH0Rqt (ORCPT ); Tue, 27 Aug 2019 13:46:49 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1i2fYF-0007sj-Uu; Tue, 27 Aug 2019 17:46:40 +0000 Date: Tue, 27 Aug 2019 18:46:39 +0100 From: Al Viro To: Geert Uytterhoeven Cc: David Laight , Joe Perches , Bernard Metzler , Doug Ledford , Jason Gunthorpe , linux-rdma , Linux Kernel Mailing List Subject: Re: [PATCH] RDMA/siw: Fix compiler warnings on 32-bit due to u64/pointer abuse Message-ID: <20190827174639.GT1131@ZenIV.linux.org.uk> References: <20190819100526.13788-1-geert@linux-m68k.org> <581e7d79ed75484beb227672b2695ff14e1f1e34.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 07:29:52PM +0200, Geert Uytterhoeven wrote: > Hi David, > > On Tue, Aug 27, 2019 at 4:17 PM David Laight wrote: > > From: Geert Uytterhoeven > > > Sent: 19 August 2019 18:15 > > ... > > > > I think a cast to unsigned long is rather more common. > > > > > > > > uintptr_t is used ~1300 times in the kernel. > > > > I believe a cast to unsigned long is much more common. > > > > > > That is true, as uintptr_t was introduced in C99. > > > Similarly, unsigned long was used before size_t became common. > > > > > > However, nowadays size_t and uintptr_t are preferred. > > > > Isn't uintptr_t defined by the same standard as uint32_t? > > I believe so. It sure as hell is not. C99 7.18.1.4: The following type designates an unsigned integer type with the property that any valid pointer to void can be converted to this type, then converted back to pointer to void, and the result will compare equal to the original pointer: uintptr_t IOW, it's "large enough to represent pointers".