On Tue, Mar 21, 2023 at 7:09 AM Chester Lin [off-list ref] wrote:
On Mon, Mar 20, 2023 at 07:10:40PM +0200, Andy Shevchenko wrote:
quoted
On Mon, Mar 20, 2023 at 6:39 PM Chester Lin [off-list ref] wrote:
...
quoted
quoted
for_each_child_of_node(np, child) {
- func->groups[i] = child->name;
+ groups[i] = (char *)child->name;
Here is also questionable casting.
...
quoted
quoted
+ func->groups = (const char **)groups;
Hmm... Why is casting needed?
It's used for fulfilling the type checking done by kbuild otherwise an error will occur:
drivers/pinctrl/nxp/pinctrl-s32cc.c:815:22: error: assignment to 'const char * const*' from incompatible pointer type 'char **' [-Werror=incompatible-pointer-types]
In 'struct pinfunction', the member 'groups' is declared as (const char * const *).
So, please decouple `struct pingroup` change to a separate patch and
hence `struct pinfunction` on its own.
After, consider changing types elsewhere that are following the types
in that data structures.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel