diff mbox series

[v2,12/21] pinctrl: core: Embed struct pingroup into struct group_desc

Message ID 20231123193355.3400852-13-andriy.shevchenko@linux.intel.com
State Superseded
Headers show
Series pinctrl: Convert struct group_desc to use struct pingroup | expand

Commit Message

Andy Shevchenko Nov. 23, 2023, 7:31 p.m. UTC
struct group_desc is a particular version of the struct pingroup
with associated opaque data. Start switching pin control core and
drivers to use it explicitly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/core.c | 15 ++++++++++++---
 drivers/pinctrl/core.h |  5 +++++
 2 files changed, 17 insertions(+), 3 deletions(-)

Comments

kernel test robot Nov. 24, 2023, 11:39 p.m. UTC | #1
Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next next-20231124]
[cannot apply to geert-renesas-drivers/renesas-pinctrl pinctrl-samsung/for-next linus/master v6.7-rc2]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-qcom-lpass-lpi-Remove-unused-member-in-struct-lpi_pingroup/20231124-043212
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link:    https://lore.kernel.org/r/20231123193355.3400852-13-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v2 12/21] pinctrl: core: Embed struct pingroup into struct group_desc
config: i386-buildonly-randconfig-006-20231125 (https://download.01.org/0day-ci/archive/20231125/202311250448.uz5Yom3N-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231125/202311250448.uz5Yom3N-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311250448.uz5Yom3N-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:21: error: initializer element is not constant
    (struct group_desc) {      \
                        ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:200:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-1bit", jz4730_mmc_1bit, 1),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:21: note: (near initialization for 'jz4730_groups')
    (struct group_desc) {      \
                        ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:200:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-1bit", jz4730_mmc_1bit, 1),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:21: error: initializer element is not constant
    (struct group_desc) {      \
                        ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:296:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-1bit", jz4740_mmc_1bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:21: note: (near initialization for 'jz4740_groups')
    (struct group_desc) {      \
                        ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:296:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-1bit", jz4740_mmc_1bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:297:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:297:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:297:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit, 0),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:297:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].grp.name')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:297:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:297:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].grp.name')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:297:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("mmc-4bit", jz4740_mmc_4bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:298:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data, 1),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:298:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data, 1),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:298:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data, 1),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:298:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data, 1),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].grp.pins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:298:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data, 1),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:298:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data, 1),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].grp.pins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:298:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-data", jz4740_uart0_data, 1),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:299:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow, 1),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:299:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow, 1),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:299:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow, 1),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:299:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow, 1),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].grp.npins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:299:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow, 1),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:299:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow, 1),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].grp.npins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:299:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart0-hwflow", jz4740_uart0_hwflow, 1),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:300:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data, 2),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:300:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data, 2),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:300:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data, 2),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:300:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data, 2),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].name')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:300:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data, 2),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:300:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data, 2),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].name')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:300:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("uart1-data", jz4740_uart1_data, 2),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:301:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:301:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:301:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit, 0),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:301:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].pins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:301:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:301:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].pins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:301:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-8bit", jz4740_lcd_8bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:302:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:302:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:302:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit, 0),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:302:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].num_pins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:302:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:302:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].num_pins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:302:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-16bit", jz4740_lcd_16bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:303:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-18bit", jz4740_lcd_18bit, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:303:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-18bit", jz4740_lcd_18bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:303:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-18bit", jz4740_lcd_18bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:303:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-18bit", jz4740_lcd_18bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:303:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-18bit", jz4740_lcd_18bit, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[1].data')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:303:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-18bit", jz4740_lcd_18bit, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:304:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-special", jz4740_lcd_special, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:304:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-special", jz4740_lcd_special, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:304:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-special", jz4740_lcd_special, 0),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:304:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-special", jz4740_lcd_special, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[2].grp.name')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:304:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-special", jz4740_lcd_special, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:304:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-special", jz4740_lcd_special, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[2].grp.name')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:304:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-special", jz4740_lcd_special, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:305:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-generic", jz4740_lcd_generic, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:305:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-generic", jz4740_lcd_generic, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:305:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-generic", jz4740_lcd_generic, 0),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:305:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-generic", jz4740_lcd_generic, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[2].grp.pins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:305:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-generic", jz4740_lcd_generic, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:305:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-generic", jz4740_lcd_generic, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[2].grp.pins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:305:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("lcd-generic", jz4740_lcd_generic, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:306:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:306:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:306:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1, 0),
     ^~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.h:217:1: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:306:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[2].grp.npins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:306:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:306:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[2].grp.npins')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:306:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs1", jz4740_nand_cs1, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
>> include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:307:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:307:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:307:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:307:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[2].name')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:307:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: error: initializer element is not constant
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:307:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2, 0),
     ^~~~~~~~~~~~~~~~~
   drivers/pinctrl/core.h:217:1: note: (near initialization for 'jz4740_groups[2].name')
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:307:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs2", jz4740_nand_cs2, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from include/linux/gpio/driver.h:13:0,
                    from drivers/pinctrl/pinctrl-ingenic.c:11:
   include/linux/pinctrl/pinctrl.h:43:1: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:308:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs3", jz4740_nand_cs3, 0),
     ^~~~~~~~~~~~~~~~~
   include/linux/pinctrl/pinctrl.h:43:1: note: (near initialization for '(anonymous).grp.name')
    (struct pingroup) {    \
    ^
   drivers/pinctrl/core.h:218:9: note: in expansion of macro 'PINCTRL_PINGROUP'
     .grp = PINCTRL_PINGROUP(_name, _pins, _num_pins), \
            ^~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'
     PINCTRL_GROUP_DESC(name, id##_pins, ARRAY_SIZE(id##_pins), (void *)(func))
     ^~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:308:2: note: in expansion of macro 'INGENIC_PIN_GROUP'
     INGENIC_PIN_GROUP("nand-cs3", jz4740_nand_cs3, 0),
     ^~~~~~~~~~~~~~~~~
   In file included from drivers/pinctrl/pinctrl-ingenic.c:29:0:
   drivers/pinctrl/core.h:217:1: warning: missing braces around initializer [-Wmissing-braces]
    (struct group_desc) {      \
    ^
   drivers/pinctrl/pinctrl-ingenic.c:89:2: note: in expansion of macro 'PINCTRL_GROUP_DESC'


vim +43 include/linux/pinctrl/pinctrl.h

003cbe04617159 Basavaraj Natikar 2022-06-01  40  
003cbe04617159 Basavaraj Natikar 2022-06-01  41  /* Convenience macro to define a single named or anonymous pingroup */
003cbe04617159 Basavaraj Natikar 2022-06-01  42  #define PINCTRL_PINGROUP(_name, _pins, _npins)	\
003cbe04617159 Basavaraj Natikar 2022-06-01 @43  (struct pingroup) {				\
003cbe04617159 Basavaraj Natikar 2022-06-01  44  	.name = _name,				\
003cbe04617159 Basavaraj Natikar 2022-06-01  45  	.pins = _pins,				\
003cbe04617159 Basavaraj Natikar 2022-06-01  46  	.npins = _npins,			\
003cbe04617159 Basavaraj Natikar 2022-06-01  47  }
003cbe04617159 Basavaraj Natikar 2022-06-01  48
Andy Shevchenko Nov. 28, 2023, 3:53 p.m. UTC | #2
On Sat, Nov 25, 2023 at 07:39:02AM +0800, kernel test robot wrote:
> Hi Andy,
> 
> kernel test robot noticed the following build errors:

> [also build test ERROR on linusw-pinctrl/for-next next-20231124]

Hmm... I have compiled tested on Linux Next it several times, I can't reproduce
this neither with GCC nor with LLVM.
Andy Shevchenko Nov. 28, 2023, 3:58 p.m. UTC | #3
On Tue, Nov 28, 2023 at 05:53:21PM +0200, Andy Shevchenko wrote:
> On Sat, Nov 25, 2023 at 07:39:02AM +0800, kernel test robot wrote:
> > Hi Andy,
> > 
> > kernel test robot noticed the following build errors:
> 
> > [also build test ERROR on linusw-pinctrl/for-next next-20231124]
> 
> Hmm... I have compiled tested on Linux Next it several times, I can't reproduce
> this neither with GCC nor with LLVM.

Actually it rings a bell that some versions of GCC have a bug (?) that they may
not identify initializations like this to be converted to constants as we are
using compound literal it should make no difference.
diff mbox series

Patch

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 3f1fd50fbb10..e08d4b3b0a56 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -559,7 +559,10 @@  const char *pinctrl_generic_get_group_name(struct pinctrl_dev *pctldev,
 	if (!group)
 		return NULL;
 
-	return group->name;
+	if (group->name)
+		return group->name;
+
+	return group->grp.name;
 }
 EXPORT_SYMBOL_GPL(pinctrl_generic_get_group_name);
 
@@ -585,8 +588,14 @@  int pinctrl_generic_get_group_pins(struct pinctrl_dev *pctldev,
 		return -EINVAL;
 	}
 
-	*pins = group->pins;
-	*num_pins = group->num_pins;
+	if (group->pins) {
+		*pins = group->pins;
+		*num_pins = group->num_pins;
+		return 0;
+	}
+
+	*pins = group->grp.pins;
+	*num_pins = group->grp.npins;
 
 	return 0;
 }
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
index 276a631fd49c..863b4956a41e 100644
--- a/drivers/pinctrl/core.h
+++ b/drivers/pinctrl/core.h
@@ -194,14 +194,18 @@  struct pinctrl_maps {
 
 #ifdef CONFIG_GENERIC_PINCTRL_GROUPS
 
+#include <linux/pinctrl/pinctrl.h>
+
 /**
  * struct group_desc - generic pin group descriptor
+ * @grp: generic data of the pin group (name and pins)
  * @name: name of the pin group
  * @pins: array of pins that belong to the group
  * @num_pins: number of pins in the group
  * @data: pin controller driver specific data
  */
 struct group_desc {
+	struct pingroup grp;
 	const char *name;
 	const int *pins;
 	int num_pins;
@@ -211,6 +215,7 @@  struct group_desc {
 /* Convenience macro to define a generic pin group descriptor */
 #define PINCTRL_GROUP_DESC(_name, _pins, _num_pins, _data)	\
 (struct group_desc) {						\
+	.grp = PINCTRL_PINGROUP(_name, _pins, _num_pins),	\
 	.name = _name,						\
 	.pins = _pins,						\
 	.num_pins = _num_pins,					\