Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5892548rwp; Mon, 17 Jul 2023 11:05:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHAgHQTroW1MkQf5ARH6y0m5IPRumDpUOci7pV4U0kvQtMHHAacbmJut59+jUb2vnmFotuj X-Received: by 2002:a05:6870:4306:b0:1b0:3d61:553e with SMTP id w6-20020a056870430600b001b03d61553emr15041282oah.15.1689617100879; Mon, 17 Jul 2023 11:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689617100; cv=none; d=google.com; s=arc-20160816; b=0AcuYEHmIC1ScNJeZFOdrM7PXQX/N8xlywkb/7pUk0VZcPSlHe7pLTimZBF0BYADiG ovXPPWshjkx4N1xxHt/qwc3YdnP9NeLx4qg58Tu6IX9ZTDvA/XjtZ8PB56sBxmg7lzYT H/lrpDTatHIsdjICXifipl7kads23aEC2CkRiy2hV8+iPx3G6PxZ0/lPsT7plfjzIUse 4hE9z1dmk/fWTqo7XC7+52y6DkxcYKXBadEvmcI3UuXHrxzGd5pk+LZAPdRx6VrRo+XJ L2rvSrWVY9Hr/uYqojblDGSHq4AP6xqctVYooKxHLQmLEwLhVb2J6OLkuXOn7eOXLdGF Nm9Q== 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=zhzhjYBQkNjW7AkK77WqarRZoFymgOR1wLg470/v7js=; fh=Ye47rP3FOsjQJPqExfLK2r+v4Pyu1H+4etPb0SpsSLg=; b=JDh55DGZQ/Db4T0DCdfXyUghkt6V6cSUIKtRKYpYWdUslR+YO/2N8zt83L/CK2/6mg HuNTZuE5QLd3nPChPz11W6wGQphWSnUkN3iaQMsZ8Xfk9RJJfF/H6WKxNJAYu+56bPbE mpxy0T4e+9vIbE2+WqBflL877pytlAmrg5U7tkxujPuDUwAGGXwZivWfpKeuPgLrImxU 0UQkREeq8m0MpXsanrDVOH1CbpIEakx/CG2VZpzT+g2vGfxTYd1cMBfg0DbjrI0gAALc 9H9zwlU/ZFjfZSWePIMELFXKU58PRMVZ4xpzlLamawACjRM2r4bBNCK378/SdhMM2LtR dBSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=afXPWLmb; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z27-20020a63191b000000b0053ff537164fsi109021pgl.783.2023.07.17.11.04.47; Mon, 17 Jul 2023 11:05:00 -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=afXPWLmb; 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 S231255AbjGQSBV (ORCPT + 99 others); Mon, 17 Jul 2023 14:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbjGQSBO (ORCPT ); Mon, 17 Jul 2023 14:01:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FBC9E76; Mon, 17 Jul 2023 11:01:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D961B611CD; Mon, 17 Jul 2023 18:01:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44FACC433C7; Mon, 17 Jul 2023 18:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689616872; bh=3M0SpVkyWqfYcXcGZBOE8myfp0f75lb5pDV5D9CsGeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=afXPWLmb4HPEM6fiia71/JKSX40Lvp7TBlcEji2LtAn9S9oRB+ZMODyrPR5gjN7B6 wzJsYdjGlJX9aQsI9GuuEulcxHqfek81LzayTYxTqOfTxlrXmhrDXcstXa07HeDxim SezmFQVm65dlBNQST2StigcXNJiGCMCJXqKiZAaegLT/8uXmHwGT0JbARInUsIk083 ZvSASeRPAjV+HraDMQm7aI37pjiL8tHN6OvlU1RKKgW6I0rnNKfSshRgAOMil5d7a+ BeMlWLDhvc0krR7ouaabAIr3vSoLQFm8ZP4Sgmw44uNa4AVfEY1NCAOqlbarkDOqGG l+AY2Cg4whPWQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id D65F4CE0806; Mon, 17 Jul 2023 11:01:11 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, SeongJae Park , Joel Fernandes , "Paul E . McKenney" Subject: [PATCH rcu 3/7] Docs/RCU/rculist_nulls: Fix trivial coding style Date: Mon, 17 Jul 2023 11:01:06 -0700 Message-Id: <20230717180110.1097362-3-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 From: SeongJae Park 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) Signed-off-by: Paul E. McKenney --- 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 0612a6387d8e..25b739885cfa 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 @@ -70,8 +70,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:: -- 2.40.1