From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) (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 6F8E42475D8 for ; Tue, 18 Feb 2025 12:41:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739882510; cv=none; b=hFUKBoeh7pBnR8GlezaMOSDn4ScpfXH0qIv5pq/cvcACdbXxVqFrPuX6QT0Iq/fF6PReG/bgBScGHKgoKq5jU/exyfFNS2uKTEGQgQgKG/ALZxJRU5i3cmzWYngjfdQ9bPwWypJ+Qb2hjK8Vk3E7Ba4FO7owsw8zQ8jkPF5RBvM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739882510; c=relaxed/simple; bh=LzEymOzbsaFCfZbS8DvP7Xa5WpoPyDkfBS8NNNj1zBs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UfzENkyDyr7IRQ2bIbnUSA4ytXpQNu1xEf4euZJrVmGnEZGWVf65Cj7B8SZjoiHjc768zzzqlxFHWZ0g8aWW1rf3r85wnV/8c8zR1HSTVKARUabzKb1S/ON+6Y23a8xwozfr1aCC/Qd41Gv1px/Pi9FyxmlfVsnMFAxeuY0dxMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=OtwbyIby; arc=none smtp.client-ip=185.70.40.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="OtwbyIby" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1739882499; x=1740141699; bh=LzEymOzbsaFCfZbS8DvP7Xa5WpoPyDkfBS8NNNj1zBs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=OtwbyIbyZ12RfK0U18KBp0C8/Kw4Q4+weM+sx73BEMPrYwwAR7Rmo+p+yLMRqplCd HSZxuNl/vcP6IJYgR8JqCCD61bFQHywIcEILWZ0qOXljtHL+7yPaIMSfDTy/dg7ei2 Ubn8G6mTe+2NBXR5zasSq8VxxB+XnaamstrKpsF+QBRsr8E89xPLDHLfZ+7BlBbcfG DpX1MLvdX2ySI0EHrtHj1qnjfGXH4zPrMgGHxvBMaQd19rtyPz+xkXksb9oN5/x7ny e1+XsnLqvfxTwnQjZVQmd2XzIW4ahjIHC37kApzhp5U6JuXU9GHvVfFYoc0HPZTJJc 7au8hbqILgmGA== Date: Tue, 18 Feb 2025 12:41:35 +0000 To: Andreas Hindborg From: Benno Lossin Cc: Danilo Krummrich , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Alice Ryhl , Trevor Gross , Joel Becker , Christoph Hellwig , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Fiona Behrens , Charalampos Mitrodimas , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] rust: configfs: introduce rust support for configfs Message-ID: In-Reply-To: <87ldu3fnwf.fsf@kernel.org> References: <20250207-configfs-v2-0-f7a60b24d38e@kernel.org> <20250207-configfs-v2-2-f7a60b24d38e@kernel.org> <87h64su8ux.fsf@kernel.org> <87bjv0u5j0.fsf@kernel.org> <87ldu3fnwf.fsf@kernel.org> Feedback-ID: 71780778:user:proton X-Pm-Message-ID: a9d121d1e911990ed26e6657f63e404cfee26057 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 18.02.25 13:17, Andreas Hindborg wrote: > Andreas Hindborg writes: >=20 >> "Benno Lossin" writes: >> >>> On 17.02.25 12:08, Andreas Hindborg wrote: >> >> [...] >> >>>>> >>>>>> +//! >>>>>> +//! See the [rust_configfs.rs] sample for a full example use of thi= s module. >>>>> >>>>> It could also be useful to just put the example directly here into th= e >>>>> docs instead of/additionally to having it as a sample. >>>> >>>> I don't think we should duplicate the code. As long as the link works,= I >>>> think having it separately is fine. >>> >>> When I'm coding in my editor and read some docs directly in it, it ofte= n >>> is annoying to find a link, because then I have to open the docs in my >>> web-browser. >>> I understand that you don't want to duplicate the code (and it also is = a >>> bit too much for a short example), so how about having a simpler >>> example? Maybe with only a single operation that has no associated data >>> (use `()`)? >> >> Sure, we can do that. >=20 > Actually, I am having some problems making the inline example compile. > `configfs_attrs!` references `THIS_MODULE`, which is not present for > doctests. I see. Does KUNIT have a THIS_MODULE that we could use? If so, we might want to make that accessible in the test harness. Does anyone know more about this? > I'll add the example but mark it `ignore` ? Sounds good. If we end up adding a THIS_MODULE to the test harness, we can remove the ignore later. --- Cheers, Benno