Commit 25d2e41c authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Linus Walleij
Browse files

pinctrl: thunderbay: 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. It fixes:
drivers/pinctrl/pinctrl-thunderbay.c: In function 'thunderbay_add_functions':
drivers/pinctrl/pinctrl-thunderbay.c:815:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  815 |    grp = func->group_names;
      |        ^

Ref: c26c4bfc

 ("pinctrl: keembay: rework loops looking for groups names")
Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20220111172919.6567-2-zajec5@gmail.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 30cc5389
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment