Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp5010450pxb; Tue, 5 Oct 2021 15:30:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtRfhFk8ofsQTYfle/jHwHDCp7xF0cDrN/vKHTRPg6E6q1QyxNBI98YziIH9iQPKHhCkjE X-Received: by 2002:aa7:d903:: with SMTP id a3mr27761694edr.292.1633473049149; Tue, 05 Oct 2021 15:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633473049; cv=none; d=google.com; s=arc-20160816; b=hQpy6GWqTkObHbJJ6VoIF7D4eBFu5/VLX/iFH1rLlSOCYPCrBwSpnff08VbkJ+mx8T n/d+J62tS8p/uoJRxdRkXs3n10wdyJ3yZ15/h/mk8S63f/6WSHepvsvuilkcp4VZ979H TiPuu9ff7yZEiH3WwAr+QV7rmw+S2Rrq8w+GRe2NfqUf0Qu9ABbmq+e1wOJWxXksXyLg o5IxUybq6kqrRrijw+rxCSuijVGY4APmi51xmR60IUMjIfPpHvUPw3LD28FI4csm89e2 e2W6+yWIB64D1is67YRPfTdaqD74ii62wy1LlTRnD8ICUZuSqs0uwbGtAFiGBUOsa5RS gVqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=wyrRoIVyVBdOR4875HbFCLkWRyP8oAiQXez+/ifju9s=; b=eWKlavOMyCyTmrYnRY2DqaRMZfe0nMyLnMQMQhTVAwuvd+MZoJvcO9UpejPzOHymd9 KSdfNjq/eeSCeMG+9ya9Clf0vgUOn5jsr0pSUNwhZEpiwP4zNcUAa8pc5ynmgKgQa6Ko 9erQzlouv3D3wDicyJ2OGlbXO24YxQB0Qs51210lI8CQ5M90mVQbXOkZ1MIgTNhEUD87 q4My0wdx4I0Evhuitf2He6LAIVW4mIHw3q7wnQUB9LIAXvrc0THwCGqykt6ci025+sPF m5G1scyZ6VyTTaj+o6mS23GwQCNQMRBsQj66Wwr5urozMsONIEHvxwGzgnWaSsDHZ0zg s4wA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si13327311ejf.706.2021.10.05.15.30.21; Tue, 05 Oct 2021 15:30:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236816AbhJEW2i (ORCPT + 99 others); Tue, 5 Oct 2021 18:28:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbhJEW2h (ORCPT ); Tue, 5 Oct 2021 18:28:37 -0400 Received: from a3.inai.de (a3.inai.de [IPv6:2a01:4f8:10b:45d8::f5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB820C061749; Tue, 5 Oct 2021 15:26:46 -0700 (PDT) Received: by a3.inai.de (Postfix, from userid 25121) id 5858F586F49B5; Wed, 6 Oct 2021 00:26:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by a3.inai.de (Postfix) with ESMTP id 5726960D2142F; Wed, 6 Oct 2021 00:26:45 +0200 (CEST) Date: Wed, 6 Oct 2021 00:26:45 +0200 (CEST) From: Jan Engelhardt To: Linus Torvalds cc: Steven Rostedt , Mathieu Desnoyers , Rasmus Villemoes , linux-kernel , Paul , Josh Triplett , Lai Jiangshan , "Joel Fernandes, Google" , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , rcu , netfilter-devel , coreteam , netdev Subject: Re: [RFC][PATCH] rcu: Use typeof(p) instead of typeof(*p) * In-Reply-To: Message-ID: References: <20211005094728.203ecef2@gandalf.local.home> <639278914.2878.1633457192964.JavaMail.zimbra@efficios.com> <826o327o-3r46-3oop-r430-8qr0ssp537o3@vanv.qr> <20211005144002.34008ea0@gandalf.local.home> <20211005154029.46f9c596@gandalf.local.home> <20211005163754.66552fb3@gandalf.local.home> User-Agent: Alpine 2.25 (LSU 592 2021-09-18) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 2021-10-05 23:27, Linus Torvalds wrote: >On Tue, Oct 5, 2021 at 2:09 PM Jan Engelhardt wrote: >> >> Illegal. >> https://en.cppreference.com/w/c/language/conversion >> subsection "Pointer conversion" >> "No other guarantees are offered" > >Well, we happily end up casting pointers to 'unsigned long' and back, Yes, that wiki had only a succinct summary of pointer-pointer conversions. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf section 6.3.2.3 (pdfpage 59) has the details, including pointer-integer conversions. >So it's not like the kernel deeply cares about theoretical portability. All things considered, that's good enough. Needless to say, how many times has the compiler changed and then someone complaind and someone else replied "standard told you so". ;-)