Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1415503pxb; Mon, 11 Oct 2021 05:40:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi1TWMozul9lkBZxFrtVWuP+9IttAJXz3A6l4TOv+rj9QJQ8bbS7CBtVMfhVkL5g3hgZx2 X-Received: by 2002:a05:6a00:984:b0:44c:e996:fc2d with SMTP id u4-20020a056a00098400b0044ce996fc2dmr16199939pfg.31.1633956008875; Mon, 11 Oct 2021 05:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633956008; cv=none; d=google.com; s=arc-20160816; b=fgKP0gdqFPSvdY0bQ5M8wAqJk16J/CDHHdV9MpchK5WAMmvRSPzPxOdP+IkekBb0OX G3p7HDsbm+mGbDOm3pTQyVrsYEvzhAm0fSZRRIWj/40Y/dElbf1D95u3kXdVF7ZY1d2k TISZXAqvNkACrJ4qIVXWW5o6iyHEAYit3SYdepQGNfoPdH41ohRPy6U9/oLRYFrjyPVO TobNQsQm8QpjI7BxQeDfSrI9AXr0KhoW1TERIWOJfYxTAsOeC5jE0xGeORvFY8Qw1eA+ V/Bf6FAcMqFk47oMyYg6Y7YEtK+7aaBcmY+214EfxPqwfW+bxtiaE5n1JoYhlNnCJ1v9 Y3Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=zPs4BNYQUKVMt+1l/Z/cHU8+56GxVKRuPndrNyB9zg0=; b=Zua9YaAzJiQpYGab/XcThfUZYtv+HB4n3vpzsc4vCWSswcyKXn8+l0S5p2+CbQ08ce v68paLUiHmwh5jU1shoFtb12orUlX8YJIwc5hutJSzU/iMO4NYZ7m689QUvZs9X/omjS fYZeKmJul59Spk+TkOacVWz8KHmhqtzbYPnaAYdRTrdOzuvXnez5AqmEAMOWcElGqhfO eQoeoIq381UE10q3HHI7m+zIYOEXCClj7hGLE0NzMSjF7qzIvj60qcc8aRlky4Se5Wck SOfnDEsI5/BWJVNT2fwTOgds5L7OvslPlAc+Deqg31Hn7tBmI9Bm2jl/SC7Q2b0zChqi XjLQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si14362721plf.303.2021.10.11.05.39.55; Mon, 11 Oct 2021 05:40:08 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235086AbhJKIgQ convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Oct 2021 04:36:16 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.85.151]:20437 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234885AbhJKIgL (ORCPT ); Mon, 11 Oct 2021 04:36:11 -0400 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-10-3xCUUb26MU6vXGQv3KSaTQ-1; Mon, 11 Oct 2021 09:34:09 +0100 X-MC-Unique: 3xCUUb26MU6vXGQv3KSaTQ-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 11 Oct 2021 09:34:06 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.023; Mon, 11 Oct 2021 09:34:06 +0100 From: David Laight To: 'Steven Rostedt' , Jan Engelhardt CC: Mathieu Desnoyers , Rasmus Villemoes , linux-kernel , Linus Torvalds , 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) * Thread-Topic: [RFC][PATCH] rcu: Use typeof(p) instead of typeof(*p) * Thread-Index: AQHXui9pmtYafoLH60aZNYgeQxdcxKvNgGPQ Date: Mon, 11 Oct 2021 08:34:06 +0000 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> <20211005172435.190c62d9@gandalf.local.home> In-Reply-To: <20211005172435.190c62d9@gandalf.local.home> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steven Rostedt > Sent: 05 October 2021 22:25 > ... > > Basically (one alternative I was looking at) was simply passing around a > void pointer. Not sure how the RCU macros would handle that. But to > completely abstract it out, I was thinking of just returning void * and > accepting void *, but I didn't want to do that because now we just lost any > kind of type checking done by the compiler. The tricks I was playing was to > keep some kind of type checking. Yes, don't use 'void *'. Sun used it for all the pointers in their DDI/DKI - made it impossible to ensure you were passing in the right type of 'token'. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)