From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D46C2CDB47E for ; Fri, 13 Oct 2023 16:26:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231639AbjJMQ0Q (ORCPT ); Fri, 13 Oct 2023 12:26:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbjJMQ0E (ORCPT ); Fri, 13 Oct 2023 12:26:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24DB64EEB for ; Fri, 13 Oct 2023 09:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697213520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5ixLD8OkftC+bT/37jK03Qzb/pMnfq0yPTWJiAzf+0U=; b=IxoGQo3YMOYniRw/QgZTAanWhnqV58jCp5Wig/x37eTyJBGOgAW5MAjohl8heFqp/qC7Ct vLvByM/GgB3j9rlIqKvD+/5Q08XrwbQHTP7qLlU0Df/yQrB/fkg9akosrLy65W6pZPnTb2 6S5iKzfQisDic4sS3l+5i2v8dHCrzVw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-241-FH94Om5-NF-ue7L8KVY4pg-1; Fri, 13 Oct 2023 12:11:57 -0400 X-MC-Unique: FH94Om5-NF-ue7L8KVY4pg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EAB301029F44; Fri, 13 Oct 2023 16:11:56 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.225.59]) by smtp.corp.redhat.com (Postfix) with SMTP id 793612157F5A; Fri, 13 Oct 2023 16:11:54 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 13 Oct 2023 18:10:57 +0200 (CEST) Date: Fri, 13 Oct 2023 18:10:54 +0200 From: Oleg Nesterov To: Ingo Molnar Cc: Linus Torvalds , Peter Zijlstra , Alexey Gladkov , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: [PATCH] locking/seqlock: Propagate 'const' pointers within read-only methods, remove forced type casts Message-ID: <20231013161054.GA18531@redhat.com> References: <20231012143158.GA16133@redhat.com> <20231012143227.GA16143@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/13, Ingo Molnar wrote: > > So create two wrapper variants instead: 'ptr' and 'const_ptr', and pick the > right one for the codepaths that are const: read_seqcount_begin() and > read_seqcount_retry(). > > This cleans up type handling and allows the removal of all type forcing. Too late, but nevertheless Reviewed-by: Oleg Nesterov