From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61D98C10F27 for ; Sun, 8 Mar 2020 19:57:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D650206D5 for ; Sun, 8 Mar 2020 19:57:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="XhvPeb8b" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726385AbgCHT5B (ORCPT ); Sun, 8 Mar 2020 15:57:01 -0400 Received: from mout.gmx.net ([212.227.17.22]:51669 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726322AbgCHT5B (ORCPT ); Sun, 8 Mar 2020 15:57:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1583697399; bh=swNXo8sf/A1Z5VWORhX8PS1wDsET0aIhHcJl33nMJa8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=XhvPeb8bgnV8/IAZQYhe/hBjChfjtsV2UMgFtqhaOL5BS/3xv4J3BpoI30BZZeYHj WX5GGb2vn2CWJy0MbyesiPpMF5lu0tn2Uuk2tORAQ2OjYBbNqnBSrmsThmtLgO7fEY dCWUb/M3NkEz8LeoFDl9XdlfbDqewIT7ZMX9UJOo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.214.212]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M2f5T-1jCOYC0l9b-0048U7; Sun, 08 Mar 2020 20:56:39 +0100 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= To: linux-doc@vger.kernel.org Cc: Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Subject: [PATCH 2/3] docs: atomic_ops: Move two paragraphs into the warning block above Date: Sun, 8 Mar 2020 20:56:17 +0100 Message-Id: <20200308195618.22768-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200308195618.22768-1-j.neuschaefer@gmx.net> References: <20200308195618.22768-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:eVTShVIjcqITjrjrt3hSHiQJv3jRqCqEsB/zW9mt8QRJpl3Bw/Q pgjPvWebRuAt+Z7AqwbkR0NHGm+Mm2cImwkAJHZPlOG6bAhuNsXQZDPRFuP8+dpaZyeDulG GaSr0Boj5Wr/mzdrrVZU2ADCOQkWfb+5VMomxXAp8wfAm3wPYWtn1JyxKGeHazSpBpa7+KJ 4xcal4jwbfV+a5j6sJ0vg== X-UI-Out-Filterresults: notjunk:1;V03:K0:Nwpz9xQ4q4A=:n8BILpeGYEEWHtbCQXwwu6 ZF3mJ/j8kyR9jC+o5rYWTLcG3m3qFTuPrIEhVJvSxusZgBTVxjoV1Jemr0r+kw5yAb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fihou4QnA+3mbabgYfjVekV/wC+c8un Y8a0GR8/ouCsU9r26p4OtivdZxJyKGxpVCcT4D5GDljlnp9cEA44kXxWSXhxLV1+oyXIyEl2R mCewJvfEjAf1m1qEX Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org These two paragraphs seem to be semantically part of the warning text, so let's adjust the formatting accordingly. Signed-off-by: Jonathan Neusch=C3=A4fer =2D-- Documentation/core-api/atomic_ops.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/core-api/atomic_ops.rst b/Documentation/core-ap= i/atomic_ops.rst index 650b9693469a..73033fc954ad 100644 =2D-- a/Documentation/core-api/atomic_ops.rst +++ b/Documentation/core-api/atomic_ops.rst @@ -473,14 +473,14 @@ operation. above to return "long" and just returning something like "old_val= & mask" because that will not work. -For one thing, this return value gets truncated to int in many code -paths using these interfaces, so on 64-bit if the bit is set in the -upper 32-bits then testers will never see that. - -One great example of where this problem crops up are the thread_info -flag operations. Routines such as test_and_set_ti_thread_flag() chop -the return value into an int. There are other places where things -like this occur as well. + For one thing, this return value gets truncated to int in many co= de + paths using these interfaces, so on 64-bit if the bit is set in t= he + upper 32-bits then testers will never see that. + + One great example of where this problem crops up are the thread_i= nfo + flag operations. Routines such as test_and_set_ti_thread_flag() = chop + the return value into an int. There are other places where thing= s + like this occur as well. These routines, like the atomic_t counter operations returning values, must provide explicit memory barrier semantics around their execution. =2D- 2.20.1