[PATCH 01/10] gpu: nova-core: use `core::ffi::CStr` method names

Tamir Duberstein posted 10 patches 2 months, 4 weeks ago
There is a newer version of this series
[PATCH 01/10] gpu: nova-core: use `core::ffi::CStr` method names
Posted by Tamir Duberstein 2 months, 4 weeks ago
Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
avoid methods that only exist on the latter.

Link: https://github.com/Rust-for-Linux/linux/issues/1075
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 drivers/gpu/drm/drm_panic_qr.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs
index 6b59d19ab631..fea062cc0383 100644
--- a/drivers/gpu/drm/drm_panic_qr.rs
+++ b/drivers/gpu/drm/drm_panic_qr.rs
@@ -948,7 +948,7 @@ fn draw_all(&mut self, data: impl Iterator<Item = u8>) {
         // nul-terminated string.
         let url_cstr: &CStr = unsafe { CStr::from_char_ptr(url) };
         let segments = &[
-            &Segment::Binary(url_cstr.as_bytes()),
+            &Segment::Binary(url_cstr.to_bytes()),
             &Segment::Numeric(&data_slice[0..data_len]),
         ];
         match EncodedMsg::new(segments, tmp_slice) {

-- 
2.50.0
Re: [PATCH 01/10] gpu: nova-core: use `core::ffi::CStr` method names
Posted by Danilo Krummrich 2 months, 3 weeks ago
On Wed Jul 9, 2025 at 9:58 PM CEST, Tamir Duberstein wrote:
> Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
> avoid methods that only exist on the latter.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1075
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
>  drivers/gpu/drm/drm_panic_qr.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This doesn't look like nova-core. :)
Re: [PATCH 01/10] gpu: nova-core: use `core::ffi::CStr` method names
Posted by Tamir Duberstein 2 months, 3 weeks ago
On Mon, Jul 14, 2025 at 7:11 AM Danilo Krummrich <dakr@kernel.org> wrote:
>
> On Wed Jul 9, 2025 at 9:58 PM CEST, Tamir Duberstein wrote:
> > Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
> > avoid methods that only exist on the latter.
> >
> > Link: https://github.com/Rust-for-Linux/linux/issues/1075
> > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> > Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> > ---
> >  drivers/gpu/drm/drm_panic_qr.rs | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> This doesn't look like nova-core. :)

Oops :(

How should I respin this one? the subject should be drm/panic, I think.
Re: [PATCH 01/10] gpu: nova-core: use `core::ffi::CStr` method names
Posted by Miguel Ojeda 2 months, 3 weeks ago
On Mon, Jul 14, 2025 at 2:35 PM Tamir Duberstein <tamird@gmail.com> wrote:
>
> How should I respin this one? the subject should be drm/panic, I think.

I would mimic what the previous commits did, i.e. drm/panic indeed.

(If I happen to pick it up before a resend, I could fix it on my side)

Cheers,
Miguel
Re: [PATCH 01/10] gpu: nova-core: use `core::ffi::CStr` method names
Posted by Tamir Duberstein 2 months, 3 weeks ago
On Mon, Jul 14, 2025 at 11:18 AM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Mon, Jul 14, 2025 at 2:35 PM Tamir Duberstein <tamird@gmail.com> wrote:
> >
> > How should I respin this one? the subject should be drm/panic, I think.
>
> I would mimic what the previous commits did, i.e. drm/panic indeed.
>
> (If I happen to pick it up before a resend, I could fix it on my side)

Yep, that's what I was going to do - but do I resend the whole series,
or somehow just this patch?
Re: [PATCH 01/10] gpu: nova-core: use `core::ffi::CStr` method names
Posted by Miguel Ojeda 2 months, 3 weeks ago
On Mon, Jul 14, 2025 at 5:28 PM Tamir Duberstein <tamird@gmail.com> wrote:
>
> Yep, that's what I was going to do - but do I resend the whole series,
> or somehow just this patch?

Whole series is simpler, I think.

Cheers,
Miguel