Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
       [not found] <20260122144444.265412-1-gary@kernel.org>
@ 2026-01-24 23:33 ` kernel test robot
  2026-01-25 20:19   ` Tamir Duberstein
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2026-01-24 23:33 UTC (permalink / raw)
  To: Gary Guo, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, Panagiotis Foliadis,
	Shankari Anand, FUJITA Tomonori
  Cc: llvm, oe-kbuild-all, kernel test robot, rust-for-linux,
	linux-kernel

Hi Gary,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 053966c344dbd346e71305f530e91ea77916189f]

url:    https://github.com/intel-lab-lkp/linux/commits/Gary-Guo/rust-disallow-use-of-CStr-as_ptr/20260122-224657
base:   053966c344dbd346e71305f530e91ea77916189f
patch link:    https://lore.kernel.org/r/20260122144444.265412-1-gary%40kernel.org
patch subject: [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
config: x86_64-buildonly-randconfig-004-20260125 (https://download.01.org/0day-ci/archive/20260125/202601250701.wXxtGd9z-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260125/202601250701.wXxtGd9z-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601250701.wXxtGd9z-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> warning: unused import: `str::CStrExt`
   --> rust/kernel/task.rs:12:5
   |
   12 |     str::CStrExt,
   |     ^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
  2026-01-24 23:33 ` [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()` kernel test robot
@ 2026-01-25 20:19   ` Tamir Duberstein
  2026-01-26  9:22     ` Alice Ryhl
  0 siblings, 1 reply; 4+ messages in thread
From: Tamir Duberstein @ 2026-01-25 20:19 UTC (permalink / raw)
  To: kernel test robot
  Cc: Gary Guo, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, Panagiotis Foliadis,
	Shankari Anand, FUJITA Tomonori, llvm, oe-kbuild-all,
	rust-for-linux, linux-kernel

On Sat, Jan 24, 2026 at 6:34 PM kernel test robot <lkp@intel.com> wrote:
>
> Hi Gary,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on 053966c344dbd346e71305f530e91ea77916189f]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Gary-Guo/rust-disallow-use-of-CStr-as_ptr/20260122-224657
> base:   053966c344dbd346e71305f530e91ea77916189f
> patch link:    https://lore.kernel.org/r/20260122144444.265412-1-gary%40kernel.org
> patch subject: [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
> config: x86_64-buildonly-randconfig-004-20260125 (https://download.01.org/0day-ci/archive/20260125/202601250701.wXxtGd9z-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260125/202601250701.wXxtGd9z-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202601250701.wXxtGd9z-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> warning: unused import: `str::CStrExt`
>    --> rust/kernel/task.rs:12:5
>    |
>    12 |     str::CStrExt,
>    |     ^^^^^^^^^^^^
>    |
>    = note: `#[warn(unused_imports)]` on by default

Seems like the import needs to be conditional on
CONFIG_DEBUG_ATOMIC_SLEEP. Aside: it can also be `as _` since it isn't
named directly.

>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>

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

* Re: [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
  2026-01-25 20:19   ` Tamir Duberstein
@ 2026-01-26  9:22     ` Alice Ryhl
  2026-01-26 12:25       ` Gary Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Alice Ryhl @ 2026-01-26  9:22 UTC (permalink / raw)
  To: Tamir Duberstein
  Cc: kernel test robot, Gary Guo, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Trevor Gross, Danilo Krummrich, Panagiotis Foliadis,
	Shankari Anand, FUJITA Tomonori, llvm, oe-kbuild-all,
	rust-for-linux, linux-kernel

On Sun, Jan 25, 2026 at 03:19:53PM -0500, Tamir Duberstein wrote:
> On Sat, Jan 24, 2026 at 6:34 PM kernel test robot <lkp@intel.com> wrote:
> >
> > Hi Gary,
> >
> > kernel test robot noticed the following build warnings:
> >
> > [auto build test WARNING on 053966c344dbd346e71305f530e91ea77916189f]
> >
> > url:    https://github.com/intel-lab-lkp/linux/commits/Gary-Guo/rust-disallow-use-of-CStr-as_ptr/20260122-224657
> > base:   053966c344dbd346e71305f530e91ea77916189f
> > patch link:    https://lore.kernel.org/r/20260122144444.265412-1-gary%40kernel.org
> > patch subject: [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
> > config: x86_64-buildonly-randconfig-004-20260125 (https://download.01.org/0day-ci/archive/20260125/202601250701.wXxtGd9z-lkp@intel.com/config)
> > compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> > rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260125/202601250701.wXxtGd9z-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202601250701.wXxtGd9z-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> warning: unused import: `str::CStrExt`
> >    --> rust/kernel/task.rs:12:5
> >    |
> >    12 |     str::CStrExt,
> >    |     ^^^^^^^^^^^^
> >    |
> >    = note: `#[warn(unused_imports)]` on by default
> 
> Seems like the import needs to be conditional on
> CONFIG_DEBUG_ATOMIC_SLEEP. Aside: it can also be `as _` since it isn't
> named directly.

Can we just import the prelude instead of having a conditional import?

Alice

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

* Re: [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
  2026-01-26  9:22     ` Alice Ryhl
@ 2026-01-26 12:25       ` Gary Guo
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Guo @ 2026-01-26 12:25 UTC (permalink / raw)
  To: Alice Ryhl, Tamir Duberstein
  Cc: kernel test robot, Gary Guo, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Trevor Gross, Danilo Krummrich, Panagiotis Foliadis,
	Shankari Anand, FUJITA Tomonori, llvm, oe-kbuild-all,
	rust-for-linux, linux-kernel

On Mon Jan 26, 2026 at 9:22 AM GMT, Alice Ryhl wrote:
> On Sun, Jan 25, 2026 at 03:19:53PM -0500, Tamir Duberstein wrote:
>> On Sat, Jan 24, 2026 at 6:34 PM kernel test robot <lkp@intel.com> wrote:
>> >
>> > Hi Gary,
>> >
>> > kernel test robot noticed the following build warnings:
>> >
>> > [auto build test WARNING on 053966c344dbd346e71305f530e91ea77916189f]
>> >
>> > url:    https://github.com/intel-lab-lkp/linux/commits/Gary-Guo/rust-disallow-use-of-CStr-as_ptr/20260122-224657
>> > base:   053966c344dbd346e71305f530e91ea77916189f
>> > patch link:    https://lore.kernel.org/r/20260122144444.265412-1-gary%40kernel.org
>> > patch subject: [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
>> > config: x86_64-buildonly-randconfig-004-20260125 (https://download.01.org/0day-ci/archive/20260125/202601250701.wXxtGd9z-lkp@intel.com/config)
>> > compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
>> > rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
>> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260125/202601250701.wXxtGd9z-lkp@intel.com/reproduce)
>> >
>> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> > the same patch/commit), kindly add following tags
>> > | Reported-by: kernel test robot <lkp@intel.com>
>> > | Closes: https://lore.kernel.org/oe-kbuild-all/202601250701.wXxtGd9z-lkp@intel.com/
>> >
>> > All warnings (new ones prefixed by >>):
>> >
>> > >> warning: unused import: `str::CStrExt`
>> >    --> rust/kernel/task.rs:12:5
>> >    |
>> >    12 |     str::CStrExt,
>> >    |     ^^^^^^^^^^^^
>> >    |
>> >    = note: `#[warn(unused_imports)]` on by default
>> 
>> Seems like the import needs to be conditional on
>> CONFIG_DEBUG_ATOMIC_SLEEP. Aside: it can also be `as _` since it isn't
>> named directly.
>
> Can we just import the prelude instead of having a conditional import?
>
> Alice

I'll do that in v2.

Best,
Gary

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

end of thread, other threads:[~2026-01-26 12:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260122144444.265412-1-gary@kernel.org>
2026-01-24 23:33 ` [PATCH v2 1/2] rust: task: use `as_char_ptr` instead of `as_ptr().cast()` kernel test robot
2026-01-25 20:19   ` Tamir Duberstein
2026-01-26  9:22     ` Alice Ryhl
2026-01-26 12:25       ` Gary Guo

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