Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5885231ybl; Tue, 27 Aug 2019 11:03:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkhddYQ3sBCn5Qhii3ZTjU85J5ZISNyCuTYn6dkB1u5xZ71GH5VJhEOX08V+nx7+UHKNw6 X-Received: by 2002:a63:5f09:: with SMTP id t9mr22627199pgb.351.1566928984895; Tue, 27 Aug 2019 11:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566928984; cv=none; d=google.com; s=arc-20160816; b=Mf4VebDu843alHaVAyxu7H15wjHfYkhz5n2S31w8J+8RxTc1CJWVGd1NLnzjYEAl5f eUeVVO54mx9Y11k6sV6HRxTNK8Xq+DvnUZVxAwuMUldg71Q13C5vDAOR65BNUl40g4yQ 5zHW2/GeR5+u82BdhuMN2nXuGwNQp9saLSopNYWcvQ2AZ/4ZJMNFZDpiUq4G+vHgV/hX iBrKwxx44wm6ToFzj78PwvnBuDmpMp1RB5evGi8jjRiFTGsa/g/kQYu6XYvCS5hAvyI1 vIQm88YRKsC0SZPZa6W9dQKEFHYWurM0uzh9GiRHaKXFToyKthapHWEQny2KfW/Vi1QY v7TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=QPO1EmTApHiHiWnABEMN8HpFXsluICv3nmTLWB1Pxpo=; b=NFneU7G5U8uKinkw4UyNqVC5iyPcfF7dQGe7GP6IbGaywG3t+rj5zPbpz4Dx1R3RC/ JaISuF0Hn8oDr84MoeI+/HN/J4HjwfjBTRAZES+EFtdlOB/Mb65adDAWP9Z0xqecRpb5 DkPT5pHhTfnCjseYjVPVG+VC3jpggaXlzyeGWygePielZeiBFgp5LQWhI4PRvoTRUriP XgNTRLcJ65jBomjrzJ/1dUz8Fv1QYq6EwOvjrut+/sRmrHW8EHwhN7m0mdFvWtJInWUA i4mHqKGRYYjYEb9/J3O9fY9QBNqN2qWBDCGTE/cXG3NTVm9nYUhiPOgRa24yxE190gme 0Vfg== 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 h15si13460784plr.87.2019.08.27.11.02.49; Tue, 27 Aug 2019 11:03:04 -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 S1730429AbfH0SAG (ORCPT + 99 others); Tue, 27 Aug 2019 14:00:06 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:35612 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727683AbfH0SAD (ORCPT ); Tue, 27 Aug 2019 14:00:03 -0400 Received: by mail-oi1-f195.google.com with SMTP id a127so15683208oii.2; Tue, 27 Aug 2019 11:00:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QPO1EmTApHiHiWnABEMN8HpFXsluICv3nmTLWB1Pxpo=; b=neTWa/3YJ3s9xQLJKvf6EV2KWj/diZrdCj9jlSHbLGgtTRI+KseTQ2VNazL9qeEQFt 3rhldicaN7Ocu4GnAY83r1pE2CngHrIcUW4AVC46o1bsmfh5jV4K4ZJND485ChAiOxD2 838gw5AAoQZVCvwTzZUiukaSo5HY81fGc7ZuKIKJ/VDtAmPMU8Oi7H89Fq9pAXcubUWp bfP0iw0qYvhhGEEvuZ+MMDQafym3EbO6K8lUcC9SguonfdSxM6sVfi2v43ydrf65QHPG W7i+vtTO0BC8AQoakzu2PpZ1e29DWaXQ43g0qqda0M7XY9/V/eBNnOCMBw3lM2JTHI+q 5u9A== X-Gm-Message-State: APjAAAWJY90XPCKWpZh4H5Qs/XZQ7P0vN3fMzAl82sHSbRzC0/LzkD4K BsNKuGB4/FlN3ujiJtmm46fAMDSUnPpee7Jj50c= X-Received: by 2002:aca:b154:: with SMTP id a81mr99917oif.148.1566928802800; Tue, 27 Aug 2019 11:00:02 -0700 (PDT) MIME-Version: 1.0 References: <20190819100526.13788-1-geert@linux-m68k.org> <581e7d79ed75484beb227672b2695ff14e1f1e34.camel@perches.com> <20190827174639.GT1131@ZenIV.linux.org.uk> In-Reply-To: <20190827174639.GT1131@ZenIV.linux.org.uk> From: Geert Uytterhoeven Date: Tue, 27 Aug 2019 19:59:51 +0200 Message-ID: Subject: Re: [PATCH] RDMA/siw: Fix compiler warnings on 32-bit due to u64/pointer abuse To: Al Viro Cc: David Laight , Joe Perches , Bernard Metzler , Doug Ledford , Jason Gunthorpe , linux-rdma , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Al, On Tue, Aug 27, 2019 at 7:46 PM Al Viro wrote: > On Tue, Aug 27, 2019 at 07:29:52PM +0200, Geert Uytterhoeven wrote: > > 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". I did not say the two types are identical, and can be used interchangeable. Both types are defined (at least) in https://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdint.h.html Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds