linux-next: manual merge of the mfd tree with the origin tree
From: Mark Brown
Date: Mon Nov 09 2026 - 09:22:43 EST
Hi all,
Today's linux-next merge of the mfd tree got a conflict in:
drivers/mfd/twl-core.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
88f84144a35f8 ("mfd: twl-core: Embed the twl_client array in twl_private")
from the mfd tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined drivers/mfd/twl-core.c
index 88296178f77e7,e5b79c9ffbba1..0000000000000
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@@ -153,13 -153,15 +153,15 @@@ struct twl_mapping
unsigned char base; /* base address */
};
+ #define TWL_MAX_SLAVES 4
+
struct twl_private {
bool ready; /* The core driver is ready to be used */
u32 twl_idcode; /* TWL IDCODE Register value */
unsigned int twl_id;
struct twl_mapping *twl_map;
- struct twl_client *twl_modules;
+ struct twl_client twl_modules[TWL_MAX_SLAVES];
};
static struct twl_private *twl_priv;
@@@ -770,7 -772,8 +772,7 @@@ twl_probe(struct i2c_client *client
goto out;
}
- twl_priv = devm_kzalloc(&client->dev, sizeof(struct twl_private),
- GFP_KERNEL);
+ twl_priv = devm_kzalloc_obj(&client->dev, struct twl_private);
if (!twl_priv) {
status = -ENOMEM;
goto out;
@@@ -787,13 -790,6 +789,6 @@@
}
num_slaves = twl_get_num_slaves();
- twl_priv->twl_modules = devm_kzalloc_objs(&client->dev,
- struct twl_client, num_slaves);
- if (!twl_priv->twl_modules) {
- status = -ENOMEM;
- goto out;
- }
-
for (i = 0; i < num_slaves; i++) {
struct twl_client *twl = &twl_priv->twl_modules[i];
Attachment:
signature.asc
Description: PGP signature