mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpu: nova-core: fsp: use KVec::zeroed() in recv_msg()
@ 2026-10-06  6:54 Thorsten Blum
  2026-10-06 22:19 ` Danilo Krummrich
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-10-06  6:54 UTC (permalink / raw)
  To: Danilo Krummrich, Alice Ryhl, Alexandre Courbot, David Airlie,
	Simona Vetter, Eliot Courtney, John Hubbard, Gary Guo,
	Tim Kovalenko
  Cc: Thorsten Blum, nova-gpu, dri-devel, linux-kernel

Use KVec::zeroed() to create the message buffer in recv_msg() instead of
creating an empty vector and resizing it.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/gpu/nova-core/falcon/fsp.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/nova-core/falcon/fsp.rs b/drivers/gpu/nova-core/falcon/fsp.rs
index 0437180b8829..4190f4f8e8c9 100644
--- a/drivers/gpu/nova-core/falcon/fsp.rs
+++ b/drivers/gpu/nova-core/falcon/fsp.rs
@@ -172,9 +172,7 @@ pub(crate) fn recv_msg(&mut self) -> Result<KVec<u8>> {
             return Err(EMSGSIZE);
         }
 
-        let mut buffer = KVec::<u8>::new();
-        buffer.resize(msg_size, 0, GFP_KERNEL)?;
-
+        let mut buffer = KVec::<u8>::zeroed(msg_size, GFP_KERNEL)?;
         self.read_emem(&mut buffer)?;
 
         // Reset message queue pointers after reading.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpu: nova-core: fsp: use KVec::zeroed() in recv_msg()
  2026-10-06  6:54 [PATCH] gpu: nova-core: fsp: use KVec::zeroed() in recv_msg() Thorsten Blum
@ 2026-10-06 22:19 ` Danilo Krummrich
  0 siblings, 0 replies; 2+ messages in thread
From: Danilo Krummrich @ 2026-10-06 22:19 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Danilo Krummrich, Alice Ryhl, Alexandre Courbot, David Airlie,
	Simona Vetter, Eliot Courtney, John Hubbard, Gary Guo,
	Tim Kovalenko, nova-gpu, dri-devel, linux-kernel

On Tue,  6 Oct 2026 08:54:35 +0200, Thorsten Blum wrote:
> [PATCH] gpu: nova-core: fsp: use KVec::zeroed() in recv_msg()

Applied, thanks!

  Branch: drm-rust-next
  Tree:   https://gitlab.freedesktop.org/drm/rust/kernel.git

[1/1] gpu: nova-core: fsp: use KVec::zeroed() in recv_msg()
      commit: 3e3404c52370

      [ Avoid the unnecessary turbofish syntax. - Danilo ]

The patch will appear in the next linux-next integration (typically within 24
hours on weekdays).

The patch is queued up for the upcoming merge window for the next major kernel
release.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-06 22:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06  6:54 [PATCH] gpu: nova-core: fsp: use KVec::zeroed() in recv_msg() Thorsten Blum
2026-10-06 22:19 ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®