Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4086053ybi; Mon, 27 May 2019 10:50:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJ3fTANQ8zgLSG+s+JkyxOPtEu8PxeSZOQE+QLvPf8Am6hXvIHRsVZwzOAMWBFtFdEtl5T X-Received: by 2002:a62:4dc5:: with SMTP id a188mr87081715pfb.8.1558979429051; Mon, 27 May 2019 10:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558979429; cv=none; d=google.com; s=arc-20160816; b=HzcW33SHA30Hhu5IIngfHEKgfTNNmhdxFZPBCjm74rLN6d32tGlNi+JdlfJ4NVirLn C6ivC09oxZOIaCOHLNzJy+55QOZWn61kdwCIN53z6/2dHC444QDAiB83V40vdbdIpb0b n9sHX3H1mCKJ1M7l3/PZ72JAugY/FHFBB1hJTxDHeCegklSBzfXqijvyOlpIgBWw28pe eJtln22ayxyrj88JnUnnl8dMJOmlq2+DfXOdFEJr77/WlzJOTBzDvnICYwRPMSuB9qlK OsENSOIzz5EpUNMiNPIaM5cK+souZJDXJ3a685OwsExPnsAdSJCHZCeLHfyqh1Df80R+ bkHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date; bh=2U49798UsoSZJAJ73oR5NnbSW5Js2LDLi+TZ4w24BdU=; b=Es/+JgylGeDsd+XwsABJD8vMPmKTgKigmkYhvquI7TL89UjJEA5L9ivZWBbYVeoN35 8dmqEpNinNGas+smkQJXlCDAiBQrZnuBNCQDKf0tBWw8hBsIhO8e9m17Q27Nk5sRe66W m5F1uvcsgVf2UQdOafPiejshzRjtA7EXD8imhzISjFlxH0GJeIuRqcnkm+KQLTpy54Kq O7m/ykYqyRGKXeROL8hpg9wYupVGz8KRBNA3Jrl7wbJDdBZf/mVa4QFLbxWNK6dRPIOQ UACUIN+fozDmLh2XLvEIKfUNjS/lpsIvpBhpmRp1Iozxhf7qR5Ei0nOVsyC/M5gvofVa cNaw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si19089055plb.188.2019.05.27.10.50.13; Mon, 27 May 2019 10:50:29 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726966AbfE0RtF (ORCPT + 99 others); Mon, 27 May 2019 13:49:05 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46348 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726484AbfE0RtF (ORCPT ); Mon, 27 May 2019 13:49:05 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4RHgdaq005624 for ; Mon, 27 May 2019 13:49:03 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2srkep2pnc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 27 May 2019 13:49:03 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 May 2019 18:49:02 +0100 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 27 May 2019 18:48:58 +0100 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4RHmvtU34078884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 May 2019 17:48:57 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C37B5B2066; Mon, 27 May 2019 17:48:57 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A2480B205F; Mon, 27 May 2019 17:48:57 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.80.199.73]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 27 May 2019 17:48:57 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id B664216C0E7C; Mon, 27 May 2019 10:49:01 -0700 (PDT) Date: Mon, 27 May 2019 10:49:01 -0700 From: "Paul E. McKenney" To: Joe Perches Cc: Andrea Parri , linux-kernel@vger.kernel.org, Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , rcu@vger.kernel.org, Peter Zijlstra , Will Deacon , Mark Rutland , Matthew Wilcox , Sasha Levin , apw@canonical.com Subject: Re: [PATCH v2] rcu: Don't return a value from rcu_assign_pointer() Reply-To: paulmck@linux.ibm.com References: <1558946997-25559-1-git-send-email-andrea.parri@amarulasolutions.com> <20190527161050.GK28207@linux.ibm.com> <810a0dae47c90c39015903c413303fcee89ab5eb.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <810a0dae47c90c39015903c413303fcee89ab5eb.camel@perches.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19052717-2213-0000-0000-000003967C92 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011172; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01209412; UDB=6.00635328; IPR=6.00990438; MB=3.00027075; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-27 17:49:02 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19052717-2214-0000-0000-00005E9A550E Message-Id: <20190527174901.GL28207@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-27_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905270125 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 27, 2019 at 10:21:22AM -0700, Joe Perches wrote: > On Mon, 2019-05-27 at 09:10 -0700, Paul E. McKenney wrote: > > On Mon, May 27, 2019 at 10:49:57AM +0200, Andrea Parri wrote: > > > Quoting Paul [1]: > > > > > > "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." > > > > > > [1] https://lkml.kernel.org/r/20190523135013.GL28207@linux.ibm.com > > > > Queued, thank you! > > > > Adding the checkpatch maintainers on CC as well. The "do { } while > > (0)" prevents the return value from being used, by design. Given the > > checkpatch complaint, is there some better way to achieve this? > > Not sure what the checkpatch complaint is here. Checkpatch seems to want at least two statements in each "do { } while (0)" macro definition: WARNING: Single statement macros should not use a do {} while (0) loop > Reading the link above, there seems to be a compiler warning. The compiler warning is a theoretical issue that is being fixed by this patch, and the patch is giving the checkpatch warning. > Perhaps a statement expression macro with no return value? > > #define rcu_assign_pointer(p, v) ({ (p) = (v); ; }) This is at best an acquired taste for me... Thanx, Paul