)]}'
{
  "commit": "7643155dce1428fd63e47d7afe8bf3dbca20cc25",
  "tree": "2a00149b353eabe71538242b1ac89aee80e2f9c3",
  "parents": [
    "22193c586b43ee88d66954395885742a6e4a49a9"
  ],
  "author": {
    "name": "Alice Ryhl",
    "email": "aliceryhl@google.com",
    "time": "Mon Nov 18 20:27:26 2024 +0000"
  },
  "committer": {
    "name": "Steven Rostedt (Google)",
    "email": "rostedt@goodmis.org",
    "time": "Mon Nov 18 17:09:28 2024 -0500"
  },
  "message": "jump_label: rust: pass a mut ptr to `static_key_count`\n\nWhen building the rust_print sample with CONFIG_JUMP_LABEL\u003dn, the Rust\nstatic key support falls back to using static_key_count. This function\naccepts a mutable pointer to the `struct static_key`, but the Rust\nabstractions are incorrectly passing a const pointer.\n\nThis means that builds using CONFIG_JUMP_LABEL\u003dn and SAMPLE_RUST_PRINT\u003dy\nfail with the following error message:\n\n\terror[E0308]: mismatched types\n\t  --\u003e \u003croot\u003e/samples/rust/rust_print_main.rs:87:5\n\t   |\n\t87 | /     kernel::declare_trace! {\n\t88 | |         /// # Safety\n\t89 | |         ///\n\t90 | |         /// Always safe to call.\n\t91 | |         unsafe fn rust_sample_loaded(magic: c_int);\n\t92 | |     }\n\t   | |     ^\n\t   | |     |\n\t   | |_____types differ in mutability\n\t   |       arguments to this function are incorrect\n\t   |\n\t   \u003d note: expected raw pointer `*mut kernel::bindings::static_key`\n\t              found raw pointer `*const kernel::bindings::static_key`\n\tnote: function defined here\n\t  --\u003e \u003croot\u003e/rust/bindings/bindings_helpers_generated.rs:33:12\n\t   |\n\t33 |     pub fn static_key_count(key: *mut static_key) -\u003e c_int;\n\t   |            ^^^^^^^^^^^^^^^^\n\nTo fix this, insert a pointer cast so that the pointer is mutable.\n\nLink: https://lore.kernel.org/20241118202727.73646-1-aliceryhl@google.com\nReported-by: kernel test robot \u003clkp@intel.com\u003e\nCloses: https://lore.kernel.org/oe-kbuild-all/202411181440.qEdcuyh6-lkp@intel.com/\nFixes: 169484ab6677 (\"rust: add arch_static_branch\")\nSigned-off-by: Alice Ryhl \u003caliceryhl@google.com\u003e\nAcked-by: Miguel Ojeda \u003cojeda@kernel.org\u003e\nSigned-off-by: Steven Rostedt (Google) \u003crostedt@goodmis.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2f2df03a3275e1bb44c3ce9f506616c8fbc98a94",
      "old_mode": 33188,
      "old_path": "rust/kernel/jump_label.rs",
      "new_id": "b5aff632ecc736837c85c416666e387b10ae9a62",
      "new_mode": 33188,
      "new_path": "rust/kernel/jump_label.rs"
    }
  ]
}
