Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp207101rdb; Thu, 18 Jan 2024 00:42:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpO31mTR+xOAnTeIwr5i3qgw7OiKW4uzL2uPNxe5tEe7CWUL2vXK/l87vGn7t9/DeJGYu4 X-Received: by 2002:a17:906:780c:b0:a2d:4f9a:f764 with SMTP id u12-20020a170906780c00b00a2d4f9af764mr260492ejm.8.1705567329123; Thu, 18 Jan 2024 00:42:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705567329; cv=pass; d=google.com; s=arc-20160816; b=IU7wY5FS2VlI6A0AMd5lGJ3HnTJkaZsoNgbCfcCNvwJsei0qa+ScbKGGR0bcguJ4rG tLwr3+RpjC/UTwPRTvu4pJHmLqXWxAVdqikOklwIJvYXPD/8f8LC2GndeoAg6WMmEuQq XHmECwEc14inn6eTuOb0B9VqyWSGVZy5BbiAiGjwJT/D2AOOjthm9flwaA3UP03qsGC6 c/X4sx1p1V8uhJVZ90PBOkqK5lx/7pCIUwawSH4gnhGgqTlnzwmDKAgz4ZvB1weXzbBE Yo+Ip7ttlOgiXH8PGmNcue9IJ8WSx7WY0vnWispkwtZyLO+OGMg4+sYCOiMsxmnurD51 0TMA== ARC-Message-Signature: i=2; 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:references :in-reply-to:message-id:date:subject:cc:to:from; bh=VeYrrYWpoZVUPoscJsPQQQN7OjTfaka8JcueZVUH6Pw=; fh=IF0w2v/E4p/IK3jC7R+sBBqa/9l/RLP0C8/+aN02PE8=; b=iYpLdbJm6zvr0it3C1j6+9puqGZ0/Qalo6yoyfamALBfjkGFpOs0Cpv9Xc7gs8fDro P5L8etVC6KjuFbrTtt/znt2mKBVJWOybtAL5vhRHKq/2ujzo00SYEBEm1aLJtdO1V7+i XJxKLNscfxYjNMs8jtXQun/Alk9RhGZ+rB5aJWbGQvQQKMdXRMen97vJyIEOeqRie7Wf sUshA5EAX/Dwyyi73jfkAkjfQy+jiMrh8RRQUz130RNPbrtzYqVp/yVYosHlOYCF+3gK 1xT/WxioyQXQBc8FiV5dYkphPENSPziFvJbrg4TO316zO3/TL/E99lXoLJXJhCCkOeUP PqhQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=valentinobst.de); spf=pass (google.com: domain of linux-kernel+bounces-29907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29907-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x7-20020a1709064bc700b00a2d183431acsi5031892ejv.991.2024.01.18.00.42.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 00:42:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=valentinobst.de); spf=pass (google.com: domain of linux-kernel+bounces-29907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29907-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id DB4F51F22E8E for ; Thu, 18 Jan 2024 08:42:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B54A81BC2E; Thu, 18 Jan 2024 08:41:59 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (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 E512313FEF; Thu, 18 Jan 2024 08:41:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.72.192.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705567319; cv=none; b=trdmi4uqRwYfK5Xsi7sQgPCIw+bV70UUvCKE/5HiryQpTVo1vbo+4A8EBzDmMFsoUG2Jv3W+3/KNGnSUkV/X/45dxX4lDfPJE/AdnNNXMQBonrHPiSRpyepFsU/72lQoSZt3N511HOjYIz4Sj6knstzBgFmPuod1kteG/OBtpyg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705567319; c=relaxed/simple; bh=l1PjlL5e4MQAE4/Y2FMckoWQVMDVNwecD1FWAP5XIpU=; h=Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:X-Provags-ID: X-Spam-Flag:UI-OutboundReport; b=rVWBulzEn0wVZlQgbG+teftF/jWX5agn7WypyCeiEog9uCIuE7KlJBS6RSMzUaA1TPdo9bkDnyTYENoIsdBK8dtVKKehAT0mpVUmSgqgPGB74nf7s7lYFPXZo/SLhJTcSGFFdpFF59SUxUerZ0zgNv8M2bByOXLrHG5WsTB3G+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=valentinobst.de; spf=pass smtp.mailfrom=valentinobst.de; arc=none smtp.client-ip=217.72.192.73 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 ([95.223.130.98]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MX0TX-1rbaFI2baz-00XMOM; Thu, 18 Jan 2024 09:41:25 +0100 From: Valentin Obst To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Trevor Gross Cc: Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Valentin Obst Subject: Re: [PATCH 10/13] rust: kernel: add doclinks Date: Thu, 18 Jan 2024 09:41:09 +0100 Message-ID: <20240118084109.21400-1-kernel@valentinobst.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:QKWd6qtDxzAW4k18sUWFEXUEXuCo871OBeHjQxznK7aUdZnrHsi +J7LI4Bm9oMgXtYYrcygyrdqHY2WbdLh0iZMy8ryx1hLMtJG8A9dAEo7R5ZRz/wLjLaYjNx 0EM6FzrJJpNccUVGCp35eEWFMOymGgCBf2cF+q++cKIo28xUcCe3IecoEmawIJUiZmgFo7v Rcwq19CMc5TnRpdSebLUg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:zI/P7vMDheI=;V8EodjK8E1xpKZ4NeALmkkDV3Cj HMbEqmAg5rWmV0xplS1ZzLbH9Bh5sL4MfA7QgoU/4zdzMUWBuy0xzVCyy2BihWyALvN7fQ87r KTuLYLDkEMl+O8HvawbougSD/UeDVgW4HVC3lk4bjXuFFzUd6NPQwEgUuSJD0cYvmnjpMpfQg URNtaHxbL/4ZejI6HkX4WbgHtgxrkey66VFGNvH2j+pH+vRbkwT3HDs0jFhziHRRApUI78PXe Sx0SFMbrXp8iqeQzBWz6gMW/TkHREvgYkdFS4KaLA60O1D44gHOnzJuqrRFAkHPvX73uQ/r27 hXOHl4+6Asnvm03eXt3zUBsu2b+y3HPse790BqruhkzkblystWlicpr4Px6pHSQgm8c6wd9ti fnh6MxKA/Mb/NFSqIE4ord5RuqM/ONTNUfKSFSD58wPzWqkGm65LPAzC/LcbQQeCtOATvNfiQ my08RBahN7+cOwQq6lgTzHDCa7TWp18+rW7XBqP4fMj0pY0fs0RTf5Wn9P7KvaO7V8I+iTZ3x aQixfAinckUalF9Kdr6cyT+p/Ef/jAaJWTpB8MmCSJx9nxMOaW/Kt7oB3ZnDlHwzHtB/5mk8S F0FVSLlZ1/Wo/IzSV5a39C+nMW7uskj8tCmGOjNCLH1pJVP39yK4mgWtfqj8WvSUDbXqEXyk8 Xur1FcR9rDptvKsrGUgsor3ehxNOcMmI5OIZOdXx7dyKCUfhzeNd1sBynVn52cxfwQdq5kb/Q FBBaj3YNW8pr8kvJTOVvrR7BlisBsuZst3IyssHaAqh0aoZZrtnGK7r+Cucx/V4lifLidomS1 S2Ld/eVzQogQCzUla8Vm9OCDSxTtrFItAmaD53WSf50a2xyl/f9tegENmyVnaIy/gRDkC0gxj UgqrrvMszeg3AtA== > > /// # Invariants > > diff --git a/rust/kernel/sync/lock.rs b/rust/kernel/sync/lock.rs > > index 467249b39f71..f14179d19d4e 100644 > > --- a/rust/kernel/sync/lock.rs > > +++ b/rust/kernel/sync/lock.rs > > @@ -21,14 +21,21 @@ > > /// # Safety > > /// > > /// - Implementers must ensure that only one thread/CPU may access the protected data once the lock > > -/// is owned, that is, between calls to `lock` and `unlock`. > > -/// - Implementers must also ensure that `relock` uses the same locking method as the original > > +/// is owned, that is, between calls to [`lock`] and [`unlock`]. > > +/// - Implementers must also ensure that [`relock`] uses the same locking method as the original > > /// lock operation. > The second lines of these list items should probably be indented > (doesn't have to be in this patch). Indeed. Will include it in the first commit in v2. > > [...] > > @@ -290,10 +294,11 @@ unsafe fn __enqueue(self, queue_work_on: F) -> Self::EnqueueOutput > > > > /// Defines the method that should be called directly when a work item is executed. > > /// > > -/// This trait is implemented by `Pin>` and `Arc`, and is mainly intended to be > > +/// This trait is implemented by `Pin>` and [`Arc`], and is mainly intended to be > `Pin` could be linked too. This requires the 'code' tags in the next commit and is done by linking both `Pin` and `Box`: ```rust /// This trait is implemented by [Pin]<[`Box`]> and [`Arc`], and is mainly ```