From patchwork Tue Jan 16 16:01:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Obst X-Patchwork-Id: 19082 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp354300dye; Tue, 16 Jan 2024 08:04:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHa2C7n6kD71y//MdWCbXsKBaLM2DfPQ7S2+BbSZGv/2TRNcy6WBCON1byzth5tvOAdWPk0 X-Received: by 2002:a05:6102:3676:b0:468:1414:48f0 with SMTP id bg22-20020a056102367600b00468141448f0mr4962044vsb.0.1705421049954; Tue, 16 Jan 2024 08:04:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705421049; cv=none; d=google.com; s=arc-20160816; b=AmSbKS1x7pEnHGZPOG4/SxYu+DsJ+/H0fLRED5BfjzxzjfBzkhTIweDasaplr3734h hI/OPcnw+1gQQ1LD+gfxA6XBkeD3f/hyYEa9ZhsgJnYnl0oyEIlhlZJLNlKnUG4heNuG xEVZ/KNPugjc+MsWKMn3kkB4PLpsMpl6j9JIs6ARK4S09ZzVAMt/5jNDzn9EiTW0IV4v F6jog0qccDlxNMyxODPbkKK8tvU841AhSvw/o3LkJdehUzDfSYi8wGNhLoU6DhGMymKO WRWNhlBxTGbcQVjGNRM3rO+pbCHJCku/BsvjchuKQYEBPLOL11c726Kd0BRf8UtCvPQz iX2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from; bh=N8K4SsXKjwj0/sWS9zmhfaPTluQBPTBHbPa/7uq3Xfo=; fh=mB5qiQ7ps5IWvjuQS9+zcxjK3ZInVolb8UwIN1mvAmg=; b=O8zVTgwZWH3/RHHfHUY4DfXs6t2WaYVM3A5SBvFFSpmieZD/SiqL4TASRpyYAqub9X MwtcyedfudgLYSG/4QoXcHF812oAya9wFJj0uNCIfU7QOz8M7o/VXwsybQyxpBd99if1 Cnc3GOPPr+z99IUgLFsgtk6d/bFJ0Z8RkRlinHxUjx3FREGaC6GsbGqsjeEfepaV6sT7 GncZHSurJ/sMcb9UgmbW9Juc/yMmvqWV0VKaIlasps/oC7u+okRofMvuoFy/BmqjhxP3 gXyK9PuWGIfkZZoGe+tNNa4ApUP+42HjtrCQmPrqaHgMIrncusD6io7boEy7sD4n3xz4 IIsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27556-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27556-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ho13-20020a056102396d00b00466b49eaed4si1018043vsb.650.2024.01.16.08.04.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 08:04:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27556-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27556-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27556-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B58231C236EE for ; Tue, 16 Jan 2024 16:04:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A27641CD07; Tue, 16 Jan 2024 16:03:13 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C32261CD00; Tue, 16 Jan 2024 16:03:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=valentinobst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valentinobst.de Received: from localhost.localdomain ([217.245.156.100]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1McpeM-1qpt7806QU-00ZyjJ; Tue, 16 Jan 2024 17:02:36 +0100 From: Valentin Obst To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho Cc: Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Valentin Obst Subject: [PATCH 00/13] rust: kernel: documentation improvements Date: Tue, 16 Jan 2024 17:01:25 +0100 Message-ID: <20240116160141.165951-1-kernel@valentinobst.de> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:EG1EJQ2T+MxnzM9vXBMa4M0AM2DOg9dyf9PxTLvaxg56lNxMTeY Cj7qOqpLZcXWXFWIkVETuZYzQ+4onbXwHf6zkCM7czNRcWo7sX+TMf36MTz+FY2mvKmeLkv Z8pk+OpvM5kBp5uEC455JC8Va89DaFXuNSGgyk4NeWJTaB6IEElFXce07L+x4it0ztq6vR7 yFrOxUU3+57k1Y+zcS8lQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ou0ixQg9zOE=;OR7N+PhTvh/+jbtNr1cIGYu6Xes vAKCQjZlsalMqmSuhMi9cPEb/urOLzbunQukJooDwu+onL1U5oMZtIwicpOtLGgB9OEfY47vQ DlVORb44I1f/mt/Qxn3DjafYJfbXJ4lyfkqCbGHDrFeqA5iQjJg1a2zmuVxpfnW8AR8chYNsF vQsh+HNmlMN/GoAe2gYzSnf76LLSknIOCkCABRohgR3mL6ZrsD8aDJ5rBI6dDgXft7kQLNyO4 MBnzvt/zgpmsoMhE82URcP1VnDxAA6uWqW0xo/00n9enpPGSDMdA5oMrwUKARs8qaKQpUeVRY Fz4Ml/3Ep4Fzrpxw/yMT0vVetXixv01RFItkNGaQRn9knfvpQE7bYFB4CiLXoM9wOUva4otRD +z8efttwyr+CLj9S45i7tRKyySrcpuB3i/5LkJYFPJu90Q4ylqvIin/oWfve7wadp9Qg+VrJv t/SsIfOniLtwAYhxLWvgcO6er7Fd68fjPRfe5Uiq5DiZJteNzDOtHHta9IzOPxuJItvCod1Vk 6GFX2wIT4MxoyEGVeAJ9E7et7LC/rVb65F1O2jj3A/zn9m7Hqvl/laxsHKgzYwa/pyo/K81Sm +33iNzbyi7cTJpJMsVi3wbOjg0aIenEmsS3s+oFClbt8etKOIrbH4ittlCSZlqS8LUtngFALN VqenVzsBNJmo+sEvUWFwegnhpK4hAormGyKx59qHLKkLl+pCDC6lzAiqV/I7NxKCL1WV1HPa/ ubpnq5KSQu/H0fK+ZkgV+2VmfBYpP+b6JwslQ6ipfUaG5fSV1crDd/E4ZVPT4Sl6BHGJ7jZDW GvlzH6lo5F/M9PNIvLBj6urxg9owVTG1V2XuMLbqGZBMdbbqjMZiSzn6QPD7cULW/2Mq1r3om xXRoCKxLM22o5KA== X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788263583105126124 X-GMAIL-MSGID: 1788263583105126124 This patch set aims to make small improvements to the documentation of the kernel crate. It engages in a few different activities: - fixing trivial typos (commit #1) - updating code examples to better reflect an idiomatic coding style (commits #2,6) - increasing the consistency within the crate's documentation as a whole (commits #3,5,7,8,9,12,13) - adding more intra-doc links as well as srctree-relative links to C header files (commits #4,10,11) Valentin Obst (13): rust: kernel: fix multiple typos in documentation rust: error: move unsafe block into function call rust: ioctl: end top level module docs with full stop rust: kernel: add srctree-relative doclinks rust: str: use `NUL` instead of 0 in doc comments rust: str: move SAFETY comment in front of unsafe block rust: kernel: unify spelling of refcount in docs rust: kernel: mark code fragments in docs with backticks rust: kernel: add blank lines in front of code blocks rust: kernel: add doclinks rust: kernel: add doclinks with html tags rust: kernel: remove unneeded doclink targets rust: locked_by: shorten doclink preview rust/kernel/allocator.rs | 2 +- rust/kernel/error.rs | 7 +--- rust/kernel/init.rs | 16 +++---- rust/kernel/ioctl.rs | 6 +-- rust/kernel/lib.rs | 2 +- rust/kernel/str.rs | 15 +++---- rust/kernel/sync/arc.rs | 34 ++++++++------- rust/kernel/sync/condvar.rs | 2 + rust/kernel/sync/lock.rs | 13 ++++-- rust/kernel/sync/lock/spinlock.rs | 2 +- rust/kernel/sync/locked_by.rs | 5 ++- rust/kernel/task.rs | 6 +-- rust/kernel/types.rs | 3 ++ rust/kernel/workqueue.rs | 70 +++++++++++++++---------------- 14 files changed, 98 insertions(+), 85 deletions(-) Reviewed-by: Martin Rodriguez Reboredo