summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-05-18 10:19:53 +0100
committerMark Brown <broonie@kernel.org>2026-05-18 10:19:53 +0100
commit963d7698c2e48a57bc9953c5ac6546e27133012e (patch)
tree25d8fe1c33f47e3305fe0f3dec546f7f7452d0ee /scripts
parentd3873c5f4d6e86852dee427832105b36fb06aef8 (diff)
parentf3d1dc0bc65ae902a821bc2e03baaa107b319350 (diff)
spi: switch to managed controller allocation (part 3/3)
Johan Hovold <johan@kernel.org> says: In preparation for fixing the SPI controller API so that it no longer drops a reference when deregistering (non-managed) controllers (cf. [1]), this series converts drivers using managed registration to also use managed allocation. Included is also a related cleanup of a lp8841-rtc. This leaves us with 18 drivers using non-managed allocation, which is few enough to be able to fix the API in tree-wide change. Johan [1] https://lore.kernel.org/lkml/20260325145319.1132072-1-johan@kernel.org/ Link: https://patch.msgid.link/20260511150408.796155-1-johan@kernel.org
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gcc-plugins/gcc-common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
index 8f1b3500f8e2..abb1964c44d4 100644
--- a/scripts/gcc-plugins/gcc-common.h
+++ b/scripts/gcc-plugins/gcc-common.h
@@ -309,7 +309,9 @@ typedef const gimple *const_gimple_ptr;
#define gimple gimple_ptr
#define const_gimple const_gimple_ptr
#undef CONST_CAST_GIMPLE
-#define CONST_CAST_GIMPLE(X) CONST_CAST(gimple, (X))
+#define CONST_CAST_GIMPLE(X) const_cast<gimple>((X))
+#undef CONST_CAST_TREE
+#define CONST_CAST_TREE(X) const_cast<tree>((X))
/* gimple related */
static inline gimple gimple_build_assign_with_ops(enum tree_code subcode, tree lhs, tree op1, tree op2 MEM_STAT_DECL)