Skip to content
Commit c26c4bfc authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Linus Walleij
Browse files

pinctrl: keembay: rework loops looking for groups names



Make the outer loop iterate over functions as that's the real subject.
This simplifies code (and reduces amount of lines of code) as allocating
memory for names doesn't require extra checks anymore.

While at it use local "group_names" variable. The plan for
"struct function_desc" is to make its "group_names" /double/ const. That
will allow drivers to use it with static const data.

This keembay "group_names" change is required to avoid:
drivers/pinctrl/pinctrl-keembay.c: In function 'keembay_add_functions':
drivers/pinctrl/pinctrl-keembay.c:1594:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 1594 |    grp = func->group_names;
      |        ^

Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20211216162206.8027-3-zajec5@gmail.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5d067499
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment