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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2376FD0047 for ; Sun, 1 Mar 2026 19:59:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FDFA10E3F2; Sun, 1 Mar 2026 19:59:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Bu1SLlPE"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 02E6E10E3F2 for ; Sun, 1 Mar 2026 19:59:52 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id CAE7360008; Sun, 1 Mar 2026 19:59:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93A73C116C6; Sun, 1 Mar 2026 19:59:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772395191; bh=c7Lf0pg//jvb+3j7ibNw1PDnDJENzEb1R7UG7EkUWBo=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=Bu1SLlPExanZzJBk/3KZ/KJEQNSweZ38bl1tkZtVFxhnq0oJlUvJegoCFn4bRC5Uz 8JDJaAmHXk5dhybtqUAV/W3yC/U52oInYwdv69V1GK+nnTYouG94WW/x7Xw8lxDOZW NLQl7cIpj6VKUwwEwSu3f2J+rajFU7zgPKfetnELrePj1Nlrv58tgQA8w7IEJTypc8 IkJhPuewEYoACBnMZr2n7CuzKUSdrgsOeKZ16KgdW5hPuSMIlSi+farv4EpkH6PCj9 YYCQdHxF61C67tz1eYO2FCji1QDBfhLkU34F5H3EpcsZm3OxSXvAcfEcGrmjaGYIaG zXQ1ANgq2n3QQ== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sun, 01 Mar 2026 20:59:41 +0100 Message-Id: Cc: , , , , , , , , Subject: Re: [PATCH v16 01/10] rust: alloc: add `KBox::into_nonnull` From: "Benno Lossin" To: "Gary Guo" , "Andreas Hindborg" , "Miguel Ojeda" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Alice Ryhl" , "Trevor Gross" , "Danilo Krummrich" , "Greg Kroah-Hartman" , "Dave Ertman" , "Ira Weiny" , "Leon Romanovsky" , "Paul Moore" , "Serge Hallyn" , "Rafael J. Wysocki" , "David Airlie" , "Simona Vetter" , "Alexander Viro" , "Christian Brauner" , "Jan Kara" , "Igor Korotin" , "Daniel Almeida" , "Lorenzo Stoakes" , "Liam R. Howlett" , "Viresh Kumar" , "Nishanth Menon" , "Stephen Boyd" , "Bjorn Helgaas" , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , "Boqun Feng" , "Vlastimil Babka" , "Uladzislau Rezki" X-Mailer: aerc 0.21.0 References: <20260224-unique-ref-v16-0-c21afcb118d3@kernel.org> <20260224-unique-ref-v16-1-c21afcb118d3@kernel.org> <87ldgbbjal.fsf@t14s.mail-host-address-is-not-set> In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sun Mar 1, 2026 at 8:25 PM CET, Gary Guo wrote: > `#[inline]` is a hint to make it more likely for compilers to inline. Wit= hout > them, you're relying on compiler heurstics only. There're cases (especial= ly with > abstractions) where the function may look complex as it contains lots of > function calls (so compiler heurstics avoid inlining them), but they're a= ll > zero-cost abstractions so eventually things get optimized away. > > For non-generic functions, there is additional issue where only very smal= l > functions get automatically inlined, otherwise a single copy is generated= at the > defining crate and compiler run on a dependant crate has no chance to eve= n peek > what's in the function. > > If you know a function should be inlined, it's better to just mark them a= s such, > so there're no surprises. Should we set clippy::missing_inline_in_public_items [1] to "warn"? [1]: https://rust-lang.github.io/rust-clippy/master/index.html?search=3Dmis= sing_inline_in_public_items Cheers, Benno