mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
configfs changes for v7.0
-----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEEEsH5R1a/fCoV1sAS4bgaPnkoY3cFAmmMPp0WHGEuaGluZGJv cmdAa2VybmVsLm9yZwAKCRDhuBo+eShjdx9+D/4hz5pC/L0w21231hz00CLJqHps Mv4uPhy3vd0QqQ8/S25gQNesCirjGuC57NSQ4K1O3+UBJKaPNEnGJYS6nlc8/vsI 4heTR+F7QPu34RD/kgzeUu03/VhQyhQzHx10+e3qiQBEn6lwKqfZaKHnsUD5M2Zk eL8LydI87rXoC9TL5ASPEq33jB7d7ec8uH2fgPhUbysTmiFTIJkaOvIv6ukRo0y7 skdSJemXRjlknXqrhLtAxe5Bt7Ycq1BzEaPYc3xRGXT1B/jp/fJxhfK9AHc5ej+T 7A/Ewjdf9IEHZYKGnUDappXC/7SWsZw47BDrqljj/6a+aODYXlt+E4q1kNBBnA4L I8oVMf485BaZhLbpWdtVTztlLzO6DQg5MvN5KWxdhbz4JSn54eumLmvSjvvPfi0S FhRfR0+/vAvY7nSzZ2FXLQWt3Yg34mUUQUkJWb09TcNSts7WpdwcJP7gEwQSSVif wtEL65CNGoJlKH+KmImHFh4hINrwac53Jl5+qCbj+sfXmCRehb2XPSOZCHa+ivXq +0p9hneOgaPOfFZ67GSU6OAGtnT5X0tL69PiK3gvVD3P/t9W7/Qr8KF4E1Ksc00H CRxzhk2GkRgLaNR00xIY2L0vaeLO6R1Dsg+HFVJGMCM+8fm/Swsy3Mt0/LpG7Rl7 8EOqsbwRIBWySEz6og== =eFAh -----END PGP SIGNATURE----- Merge tag 'configfs-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/linux Pull configfs updates from Andreas Hindborg: - Switch the configfs rust bindings to use c string literals provided by the compiler, rather than a macro - A follow up on constifying `configfs_item_operations`, applying the change to the configfs sample * tag 'configfs-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/linux: samples: configfs: Constify struct configfs_item_operations and configfs_group_operations rust: configfs: replace `kernel::c_str!` with C-Strings
This commit is contained in:
commit
8c0901b6f9
4 changed files with 11 additions and 12 deletions
|
|
@ -21,7 +21,6 @@
|
|||
//!
|
||||
//! ```ignore
|
||||
//! use kernel::alloc::flags;
|
||||
//! use kernel::c_str;
|
||||
//! use kernel::configfs_attrs;
|
||||
//! use kernel::configfs;
|
||||
//! use kernel::new_mutex;
|
||||
|
|
@ -50,7 +49,7 @@
|
|||
//!
|
||||
//! try_pin_init!(Self {
|
||||
//! config <- configfs::Subsystem::new(
|
||||
//! c_str!("rust_configfs"), item_type, Configuration::new()
|
||||
//! c"rust_configfs", item_type, Configuration::new()
|
||||
//! ),
|
||||
//! })
|
||||
//! }
|
||||
|
|
@ -66,7 +65,7 @@
|
|||
//! impl Configuration {
|
||||
//! fn new() -> impl PinInit<Self, Error> {
|
||||
//! try_pin_init!(Self {
|
||||
//! message: c_str!("Hello World\n"),
|
||||
//! message: c"Hello World\n",
|
||||
//! bar <- new_mutex!((KBox::new([0; PAGE_SIZE], flags::GFP_KERNEL)?, 0)),
|
||||
//! })
|
||||
//! }
|
||||
|
|
@ -1000,7 +999,9 @@ macro_rules! configfs_attrs {
|
|||
static [< $data:upper _ $name:upper _ATTR >]:
|
||||
$crate::configfs::Attribute<$attr, $data, $data> =
|
||||
unsafe {
|
||||
$crate::configfs::Attribute::new(c_str!(::core::stringify!($name)))
|
||||
$crate::configfs::Attribute::new(
|
||||
$crate::c_str!(::core::stringify!($name)),
|
||||
)
|
||||
};
|
||||
)*
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue