Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1869219ybm; Thu, 23 May 2019 07:57:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSe+WDOQ2qaGKLgQ6jnRnpkxJVNYrwgBHc6haQE3dXxLdhUeCt/GMBT3eJZRJHoa44FUdq X-Received: by 2002:a17:902:4a:: with SMTP id 68mr99997047pla.235.1558623423638; Thu, 23 May 2019 07:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558623423; cv=none; d=google.com; s=arc-20160816; b=c8bJEk6JvYqqtsULWzSB/wrCEO2ri2PQFlZXLTds0QRZqr/j1iPEBqi7Q9WlZqa8Bj HkJCkRCRw844Iw/nQLo4Y2s1HybZO199bFt4msogXeiHewo8IfBt3HSpz5rF8lqwNldn 6FVKjgZrgO7d2vd2RdtL7q9n2VNBsn1oDjJ9WNKnG/3IdiCOfHNpr8I7jA2CEQyf1Ne6 xw+CwME/pmaeZezm04W5yzzdqGj2eBXrxHgUC3rbwjwGtFkKsGziUhPLgnLh58dsXD3M +4XRSgrDXC4UggmfMzdGTJdkATI5xGjAppnRELO4A7oMByciM4ytIyVh0AVjF9Ycpqou b6cQ== 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:dkim-signature; bh=uICNnoyMa7zu41WyaprLWKlNVl3pnLzjAASM3iT/1Zs=; b=jlzkK43wOhcq93w/fs5oIeX2KUIhooYOzqHWHBYzBek/I+LyKzWp3Sk11awQJsNkGN tMyr0IjBE3VPIbw621tM0XMdsi4bolDj2idZ3ko0bncn6cp8RDI4jlqtNX1aWk0aivCM okxqyrhecgsMWZkPQv9dGWyG8j+C9XMFPVLNfiuXi4heaPfOmZNJ3o9XrqGOoEZqxrZv bwmK1ZMMlz+dgptmCKIhwnyRfl0pfKjE+g2dPFzAk1Qavj3BHnB8AmLQ/2LUKxJR7S2x a9ynF097qkBcvNAq0iFG0ISG/ASUdtiTBpDI0IcwAVI3MLTzUTmnwQMugL840cqS7KO5 gtvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QvFUo3Ah; 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 a24si27577220pgw.395.2019.05.23.07.56.48; Thu, 23 May 2019 07:57:03 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QvFUo3Ah; 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 S1731009AbfEWOyj (ORCPT + 99 others); Thu, 23 May 2019 10:54:39 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35336 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730792AbfEWOyj (ORCPT ); Thu, 23 May 2019 10:54:39 -0400 Received: by mail-wr1-f65.google.com with SMTP id m3so6635614wrv.2 for ; Thu, 23 May 2019 07:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uICNnoyMa7zu41WyaprLWKlNVl3pnLzjAASM3iT/1Zs=; b=QvFUo3Ah2WlhLzZRZE+1Phswo1nDdbeYh8VGoQFlMFw51Ij3aka9mP8fEdpc3aYYmH B35ZOV+94cDR1f6AQUV+bWXhCxvi0eAiUzP37Wh8IqMQXWLrHOh1MgJCvEXmSa4D9H3t IItga6/wj7g8fSvvu8VREy7RgTxEJES08ymTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uICNnoyMa7zu41WyaprLWKlNVl3pnLzjAASM3iT/1Zs=; b=oiR+0x7+rilyV9m3OE8ZMphva1rwatDJJK5aLAT9Zk4AWUotmVG5+nmtaILj8WCyhh 8VtuUOrkxJ+ErTfghrMkK6K6qzBsVOOb6yZPpI4elVjtpop3Np9mSK/Ec1yjh2VPsLCE wruReyf0rcBPbHZrWZVhjcZ8uNm/qK7IbUMdhcyka37Yp4dTZiHCIe04aHcF0c98Beeu xabQr57Osa7tNUuQwFgg25yXdp0avLLw0ewjC2zlbn4CAcM9K/ZuE3MPCgxlQA6DlpvE mdCstPy6Orm4Uf7RgOKx5CetEPnxIjSTesot9xgQnBISfxbSgXRby+1Pkp0/0I4S6i4Q uYNQ== X-Gm-Message-State: APjAAAWLOJwtKii7ODmo4mtjYjiRdl93jQbHuqCi6/B/8A5uUONoJm4i b4zubhbdALPivVneW8NSA33Hpg== X-Received: by 2002:adf:e649:: with SMTP id b9mr14112520wrn.195.1558623277660; Thu, 23 May 2019 07:54:37 -0700 (PDT) Received: from andrea (86.100.broadband17.iol.cz. [109.80.100.86]) by smtp.gmail.com with ESMTPSA id x187sm11554224wmg.11.2019.05.23.07.54.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 07:54:37 -0700 (PDT) Date: Thu, 23 May 2019 16:54:34 +0200 From: Andrea Parri To: Mark Rutland Cc: "Paul E. McKenney" , linux-kernel@vger.kernel.org, Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , rcu@vger.kernel.org, Peter Zijlstra , Will Deacon Subject: Re: [RFC PATCH] rcu: Make 'rcu_assign_pointer(p, v)' of type 'typeof(p)' Message-ID: <20190523145434.GB18692@andrea> References: <1558618340-17254-1-git-send-email-andrea.parri@amarulasolutions.com> <20190523135013.GL28207@linux.ibm.com> <20190523141851.GA7523@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190523141851.GA7523@lakrids.cambridge.arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > TBH, I'm not sure this is 'the right patch' (hence the RFC...): in > > > fact, I'm currently missing the motivations for allowing assignments > > > such as the "r0 = ..." assignment above in generic code. (BTW, it's > > > not currently possible to use such assignments in litmus tests...) > > > > Given that a quick (and perhaps error-prone) search of the uses of > > rcu_assign_pointer() in v5.1 didn't find a single use of the return > > value, let's please instead change the documentation and implementation > > to eliminate the return value. > > FWIW, I completely agree, and for similar reasons I'd say we should do > the same to WRITE_ONCE(), where this 'cool feature' has been inherited > from. > > For WRITE_ONCE() there's at least one user that needs to be cleaned up > first (relying on non-portable implementation detaisl of atomic*_set()), > but I suspect rcu_assign_pointer() isn't used as much as a building > block for low-level macros. Thanks for the confirmation, Mark. I can look at the WRITE_ONCE() issues (user and implementation); it will probably be a separate patchset... Thanks, Andrea