From patchwork Tue Jun 13 18:24:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 107511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp760348vqr; Tue, 13 Jun 2023 11:55:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gZYnfCAoz/TLug00ffz4W5V1ynPtg90VKnQBvFvuGV16xOpwewliwHP1POCr1YP5njwR5 X-Received: by 2002:a17:902:cecf:b0:1b0:f31:a386 with SMTP id d15-20020a170902cecf00b001b00f31a386mr13623628plg.26.1686682521750; Tue, 13 Jun 2023 11:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686682521; cv=none; d=google.com; s=arc-20160816; b=ZNcSI9yl3xRhKhQOTOi2aapQZRni/uW5qHryM9RZih7NquETVIdHT5I4crdnpUABUE 5sOXI8HAkvf9zIwhnqhMt3F/c/NBLYSUlsu4rW4z6Ve/MFSlX7Crq5nkLAo8C9iK04WB nZl6bbolW64cANhR+X/O6fe1OUTs25Yt8zsBVagr/Wt9cqyGt4kGiNlPca+dp0i5vXaV 0CFwq5PAo+lQ5DQZxY6HAFcxVVzjj5v8eSR2vGy33LuPVwSqm5Xlo7QHVvLSlew+oUmE s8lCTN5hkp3+fHWkDMscV/CkFrbQyGN6RgFVBiz2zBN6ueSKCZ+SGqbuOmlMUOB7cCQ9 H0GA== 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:date:subject:cc:to:from :dkim-signature; bh=M6PNj3WnDRjWWVcxdlTnpz9rdhAWLwVTgGBFcDSLfEs=; b=hgbaabCo7wqPJxcMZzSvOnBOQvcwSQNDXJSqz54TSe6efdkySum12G2vAfIAHYJWGd XmlKpbwMZjjUADSWtxQXWDhxG/BYXFRI2hm1JKbYizi4G97Mf1gdFFskCnY1//hdWT41 c+FdiDu8398bdj4b4Gl33HBoy+K8QhfBrjFxQrH7P8NW6TZ95cqOcPGRY0p8Uwxikb8F 6dYC22Um0zG0ExRz8UjWIsHPR46xcDExl6aWK/a6vGCjcyiBiQWQNxcu7DlCTBj1uyLu bF0wdICiAL+3oVvwdCm1HXsQdOedXkBrPQ4ey6bqKGJUQIOEiZ6D7cYhPNLmEeA/PsOF NSBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g8HivGph; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a637e08000000b0054f9f9b333csi2864289pgc.686.2023.06.13.11.55.08; Tue, 13 Jun 2023 11:55:21 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g8HivGph; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239495AbjFMSYp (ORCPT + 99 others); Tue, 13 Jun 2023 14:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238881AbjFMSYl (ORCPT ); Tue, 13 Jun 2023 14:24:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B60421709; Tue, 13 Jun 2023 11:24:40 -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 CF1526340C; Tue, 13 Jun 2023 18:24:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0319C433F2; Tue, 13 Jun 2023 18:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686680679; bh=Edls777YKMqINxfhwzexWbmVYJbfX6Dotujbh1uSNaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8HivGphNlKC/BBPzZXi/F+QEtdGXeSaIEMGlnYZPhGe9/MX/ReZv2APD1N5QxYSY quMgGsWg1BjNQi/KfpR1o0rSbkzzU7yR8bfYVC59aGPBDmgdKMfgmyhiQwv7vABsW0 8zReTYbeOO/RRLR7mUEbeFeZ2EGmtB6+KyaiiIVT+ZSQzCGQXKPkShwB6hv1FKClY9 vg0DGwD5FPmm4ttLlXiIcVo6FCxCkeMAIhytJi1qVlDMtpYueIf2AoByOdp9qJwyPo G+Y9mRMdxeEdhXWmB72Ex7DFQXJrIj8tLkus/j7fE9i4fXyb4uISDS/g+zMjilyIII OecBzWPuCyTIA== From: SeongJae Park To: paulmck@kernel.org Cc: SeongJae Park , joel@joelfernandes.org, mmpgouride@gmail.com, corbet@lwn.net, rcu@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] Docs/RCU/rculist_nulls: Fix trivial coding style Date: Tue, 13 Jun 2023 18:24:31 +0000 Message-Id: <20230613182434.88317-2-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230613182434.88317-1-sj@kernel.org> References: <20230613182434.88317-1-sj@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768614812171762148?= X-GMAIL-MSGID: =?utf-8?q?1768614812171762148?= Lookup example of non-hlist_nulls management is missing a semicolon, and having inconsistent indentation (one line is using single space indentation while others are using two spaces indentation). Fix the trivial issues. Signed-off-by: SeongJae Park Reviewed-by: Joel Fernandes (Google) --- Documentation/RCU/rculist_nulls.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/RCU/rculist_nulls.rst b/Documentation/RCU/rculist_nulls.rst index 9a734bf54b76..253ecd869fc2 100644 --- a/Documentation/RCU/rculist_nulls.rst +++ b/Documentation/RCU/rculist_nulls.rst @@ -26,7 +26,7 @@ algorithms: :: begin: - rcu_read_lock() + rcu_read_lock(); obj = lockless_lookup(key); if (obj) { if (!try_get_ref(obj)) // might fail for free objects @@ -68,8 +68,8 @@ And note the traditional hlist_for_each_entry_rcu() misses this smp_rmb():: pos && ({ prefetch(pos->next); 1; }) && ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); pos = rcu_dereference(pos->next)) - if (obj->key == key) - return obj; + if (obj->key == key) + return obj; return NULL; Quoting Corey Minyard::