Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp972889rwr; Fri, 5 May 2023 07:30:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KYZw4iXDzIpPHsX1jrOTkl9VY5cbxbqEA/MN6uEHvnsfWKLlgNrAYBEE8svGzJla0MS9C X-Received: by 2002:a05:6a20:8e18:b0:fb:f0b5:1e3d with SMTP id y24-20020a056a208e1800b000fbf0b51e3dmr2122730pzj.41.1683297052388; Fri, 05 May 2023 07:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683297052; cv=none; d=google.com; s=arc-20160816; b=eorK6xVU1FEnUFgDF5YQrj+yxEfGPcXhacIimkC6dPWwzGOfWEmUhV+aRoTjb6LABv EI/pq+aTGLO+AfZ4xOap968JkiAWzqsV/+8GSu4Xijv4+nHmiqv4E9tbAO3IrAP+dklp oieCI3LnKqC4ye7xMqulSuuujo20jW91nj9QZr8v2X2F85mYHAYePo2GZYsI7K1KdU9q 7ckarfwycFAfKdyEq3aOxkDvmA6/TZ5qc8LyJrNg00eyoOcxvfaG5BjxRYTvy0aXpO70 CeLNpswdRao0gLKq+4qhgZ7uYvJ+aKv0RjWjYZw41BGJ3XK+QmSfkDM7XGV5sPFVVLeU 8JwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=wucHbxrrQmv0bimXZ2qdWmEL+JA/0h4SkrZPhEQ19Mc=; b=zfegIPycf6qSeEgkCiIGqouKDPpUZyYRdJBSEh7IGdFsVkRjkc+v8x+TzV4jQilfE0 pp22LynGzH8RDG2Jf/9T+duLS41YkYoTojiETsnjEBPajD6Om8X2a/CVH9noXrb7dpkx 7GY5BO37faR779UbuRYA7o8+G84/st4hYQY2rnNZoYFSsC0wm6IWhrfKK+Az8QBgXm+S lKxWrzIqQOfDuu749VYPD4IEzgh6I+g7cpvC1MBVAIw+9+IKrIKBOMTsx6AAOhbCr0VC gHuGk6YxUw1qUtApaNLzR3XPzr2pT414qZi6+SbUgTPpvhxmNhPToWZIzWbwE5iwfdzY ev8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a637708000000b00518cf8916e2si2152581pgc.415.2023.05.05.07.30.39; Fri, 05 May 2023 07:30:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232457AbjEEOG1 (ORCPT + 99 others); Fri, 5 May 2023 10:06:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232243AbjEEOG0 (ORCPT ); Fri, 5 May 2023 10:06:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0E2511B74; Fri, 5 May 2023 07:06:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5C63963E62; Fri, 5 May 2023 14:06:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 719E7C433EF; Fri, 5 May 2023 14:06:23 +0000 (UTC) Date: Fri, 5 May 2023 10:06:21 -0400 From: Steven Rostedt To: Joel Fernandes Cc: Mathieu Desnoyers , Andrew Morton , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Boqun Feng , Lai Jiangshan , Zqiang , rcu@vger.kernel.org Subject: Re: [RFC PATCH 3/4] rculist.h: Fix parentheses around macro pointer parameter use Message-ID: <20230505100621.5d468f95@gandalf.local.home> In-Reply-To: References: <20230504012914.1797355-1-mathieu.desnoyers@efficios.com> <20230504012914.1797355-3-mathieu.desnoyers@efficios.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 May 2023 12:19:38 -0400 Joel Fernandes wrote: > > void f(void) > > { > > struct test *t1; > > struct test **t2 = &t1; > > > > list_for_each_entry_rcu((*t2), &testlist, node) { /* works */ > > //... > > } > > list_for_each_entry_rcu(*t2, &testlist, node) { /* broken */ > > //... > > } > > Yeah it is not clear why anyone would ever want to use it like this. > Why don't they just pass t1 to list_for_each_entry_rcu() ? I would > rather it break them and they re-think their code ;). Remember interfaces should not be enforcing policy unless it's key to the way the interface works. -- Steve