Skip to contentSkip to conversation

linux-next: build failure after merge of the pinctrl tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Mar 30, 2020 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the pinctrl tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pinctrl/qcom/pinctrl-msm.c:909:4: error: expected identifier or '(' before 'else'

  909 |  } else {
      |    ^~~~
drivers/pinctrl/qcom/pinctrl-msm.c:921:2: warning: data definition has no type or storage class
  921 |  val = msm_readl_intr_cfg(pctrl, g);
      |  ^~~
drivers/pinctrl/qcom/pinctrl-msm.c:921:2: error: type defaults to 'int' in declaration of 'val' [-Werror=implicit-int]
drivers/pinctrl/qcom/pinctrl-msm.c:921:27: error: 'pctrl' undeclared here (not in a function); did you mean 'pinctrl'?
  921 |  val = msm_readl_intr_cfg(pctrl, g);
      |                           ^~~~~
      |                           pinctrl

drivers/pinctrl/qcom/pinctrl-msm.c:921:34: error: 'g' undeclared here (not in a function)
921 | val = msm_readl_intr_cfg(pctrl, g);
| ^
drivers/pinctrl/qcom/pinctrl-msm.c:922:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '|=' token

  922 |  val |= BIT(g->intr_raw_status_bit);
      |      ^~
drivers/pinctrl/qcom/pinctrl-msm.c:923:2: error: expected identifier or '(' before 'if'
  923 |  if (g->intr_detection_width == 2) {
      |  ^~
drivers/pinctrl/qcom/pinctrl-msm.c:945:4: error: expected identifier or '(' before 'else'
  945 |  } else if (g->intr_detection_width == 1) {
      |    ^~~~
drivers/pinctrl/qcom/pinctrl-msm.c:966:4: error: expected identifier or '(' before 'else'
  966 |  } else {
      |    ^~~~
drivers/pinctrl/qcom/pinctrl-msm.c:969:2: warning: data definition has no type or storage class
  969 |  msm_writel_intr_cfg(val, pctrl, g);
      |  ^~~~~~~~~~~~~~~~~~~

drivers/pinctrl/qcom/pinctrl-msm.c:969:2: error: type defaults to 'int' in declaration of 'msm_writel_intr_cfg' [-Werror=implicit-int] drivers/pinctrl/qcom/pinctrl-msm.c:969:2: warning: parameter names (without types) in function declaration drivers/pinctrl/qcom/pinctrl-msm.c:969:2: error: conflicting types for 'msm_writel_intr_cfg' drivers/pinctrl/qcom/pinctrl-msm.c:84:13: note: previous definition of 'msm_writel_intr_cfg' was here

   84 | static void msm_writel_##name(u32 val, struct msm_pinctrl *pctrl, \
      |             ^~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:92:1: note: in expansion of macro 'MSM_ACCESSOR'
   92 | MSM_ACCESSOR(intr_cfg)
      | ^~~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:971:2: error: expected identifier or '(' before 'if'
  971 |  if (test_bit(d->hwirq, pctrl->dual_edge_irqs))
      |  ^~
In file included from include/linux/vmalloc.h:5,
                 from include/asm-generic/io.h:887,
                 from arch/arm/include/asm/io.h:438,
                 from include/linux/io.h:13,
                 from drivers/pinctrl/qcom/pinctrl-msm.c:9:
include/linux/spinlock.h:287:2: error: expected identifier or '(' before 'do'
  287 |  do {       \
      |  ^~
drivers/pinctrl/qcom/pinctrl-msm.c:974:2: note: in expansion of macro 'raw_spin_unlock_irqrestore'
  974 |  raw_spin_unlock_irqrestore(&pctrl->lock, flags);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:290:4: error: expected identifier or '(' before 'while'
  290 |  } while (0)
      |    ^~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:974:2: note: in expansion of macro 'raw_spin_unlock_irqrestore'
  974 |  raw_spin_unlock_irqrestore(&pctrl->lock, flags);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:976:2: error: expected identifier or '(' before 'if'
  976 |  if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
      |  ^~
drivers/pinctrl/qcom/pinctrl-msm.c:978:2: error: expected identifier or '(' before 'else'
  978 |  else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
      |  ^~~~
drivers/pinctrl/qcom/pinctrl-msm.c:981:2: error: expected identifier or '(' before 'return'
  981 |  return 0;
      |  ^~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:982:1: error: expected identifier or '(' before '}' token
  982 | }
      | ^
drivers/pinctrl/qcom/pinctrl-msm.c: In function 'msm_gpio_irq_set_type':
drivers/pinctrl/qcom/pinctrl-msm.c:909:2: warning: control reaches end of non-void function [-Wreturn-type]
  909 |  } else {
      |  ^
At top level:
drivers/pinctrl/qcom/pinctrl-msm.c:84:13: warning: 'msm_writel_intr_target' defined but not used [-Wunused-function]
   84 | static void msm_writel_##name(u32 val, struct msm_pinctrl *pctrl, \
      |             ^~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:94:1: note: in expansion of macro 'MSM_ACCESSOR'
   94 | MSM_ACCESSOR(intr_target)
      | ^~~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:79:12: warning: 'msm_readl_intr_target' defined but not used [-Wunused-function]
   79 | static u32 msm_readl_##name(struct msm_pinctrl *pctrl, \
      |            ^~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:94:1: note: in expansion of macro 'MSM_ACCESSOR'
   94 | MSM_ACCESSOR(intr_target)
      | ^~~~~~~~~~~~

Caused by commit

13bec8d49bdf ("pinctrl: qcom: use scm_call to route GPIO irq to Apps")

I have reverted that commit for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

R: linux-next: build failure after merge of the pinctrl tree

Quoted 6 lines

Hi all,

After merging the pinctrl tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pinctrl/qcom/pinctrl-msm.c:909:4: error: expected identifier or

'('

Quoted 11 lines

before 'else'

  909 |  } else {
      |    ^~~~
drivers/pinctrl/qcom/pinctrl-msm.c:921:2: warning: data definition has no
type or storage class
  921 |  val = msm_readl_intr_cfg(pctrl, g);
      |  ^~~

drivers/pinctrl/qcom/pinctrl-msm.c:921:2: error: type defaults to 'int' in declaration of 'val' [-Werror=implicit-int] drivers/pinctrl/qcom/pinctrl-msm.c:921:27: error: 'pctrl' undeclared here (not in a function); did you mean 'pinctrl'?

Quoted 8 lines
  921 |  val = msm_readl_intr_cfg(pctrl, g);
      |                           ^~~~~
      |                           pinctrl

drivers/pinctrl/qcom/pinctrl-msm.c:921:34: error: 'g' undeclared here (not in a function)
921 | val = msm_readl_intr_cfg(pctrl, g);
| ^
drivers/pinctrl/qcom/pinctrl-msm.c:922:6: error: expected '=', ',', ';',

'asm'

Quoted 4 lines

or '__attribute__' before '|=' token

  922 |  val |= BIT(g->intr_raw_status_bit);
      |      ^~

drivers/pinctrl/qcom/pinctrl-msm.c:923:2: error: expected identifier or

'('

Quoted 4 lines

before 'if'

  923 |  if (g->intr_detection_width == 2) {
      |  ^~

drivers/pinctrl/qcom/pinctrl-msm.c:945:4: error: expected identifier or

'('

Quoted 4 lines

before 'else'

  945 |  } else if (g->intr_detection_width == 1) {
      |    ^~~~

drivers/pinctrl/qcom/pinctrl-msm.c:966:4: error: expected identifier or

'('

Quoted 16 lines

before 'else'

  966 |  } else {
      |    ^~~~
drivers/pinctrl/qcom/pinctrl-msm.c:969:2: warning: data definition has no
type or storage class
  969 |  msm_writel_intr_cfg(val, pctrl, g);
      |  ^~~~~~~~~~~~~~~~~~~

drivers/pinctrl/qcom/pinctrl-msm.c:969:2: error: type defaults to 'int' in declaration of 'msm_writel_intr_cfg' [-Werror=implicit-int] drivers/pinctrl/qcom/pinctrl-msm.c:969:2: warning: parameter names (without types) in function declaration drivers/pinctrl/qcom/pinctrl-msm.c:969:2: error: conflicting types for 'msm_writel_intr_cfg' drivers/pinctrl/qcom/pinctrl-msm.c:84:13: note: previous definition of 'msm_writel_intr_cfg' was here
84 | static void msm_writel_##name(u32 val, struct msm_pinctrl *pctrl,

Quoted 7 lines
\
      |             ^~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:92:1: note: in expansion of macro
'MSM_ACCESSOR'
   92 | MSM_ACCESSOR(intr_cfg)
      | ^~~~~~~~~~~~

drivers/pinctrl/qcom/pinctrl-msm.c:971:2: error: expected identifier or

'('

Quoted 9 lines

before 'if'

  971 |  if (test_bit(d->hwirq, pctrl->dual_edge_irqs))
      |  ^~
In file included from include/linux/vmalloc.h:5,
                 from include/asm-generic/io.h:887,
                 from arch/arm/include/asm/io.h:438,
                 from include/linux/io.h:13,
                 from drivers/pinctrl/qcom/pinctrl-msm.c:9:

include/linux/spinlock.h:287:2: error: expected identifier or '(' before

'do'

Quoted 7 lines
  287 |  do {       \
      |  ^~
drivers/pinctrl/qcom/pinctrl-msm.c:974:2: note: in expansion of macro
'raw_spin_unlock_irqrestore'
  974 |  raw_spin_unlock_irqrestore(&pctrl->lock, flags);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

include/linux/spinlock.h:290:4: error: expected identifier or '(' before

'while'

Quoted 7 lines

290 | } while (0)

      |    ^~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:974:2: note: in expansion of macro
'raw_spin_unlock_irqrestore'
  974 |  raw_spin_unlock_irqrestore(&pctrl->lock, flags);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/pinctrl/qcom/pinctrl-msm.c:976:2: error: expected identifier or

'('

Quoted 4 lines

before 'if'

  976 |  if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
      |  ^~

drivers/pinctrl/qcom/pinctrl-msm.c:978:2: error: expected identifier or

'('

Quoted 5 lines

before 'else'
978 | else if (type & (IRQ_TYPE_EDGE_FALLING |
IRQ_TYPE_EDGE_RISING))

      |  ^~~~

drivers/pinctrl/qcom/pinctrl-msm.c:981:2: error: expected identifier or

'('

Quoted 4 lines

before 'return'

  981 |  return 0;
      |  ^~~~~~

drivers/pinctrl/qcom/pinctrl-msm.c:982:1: error: expected identifier or

'('

Quoted 29 lines

before '}' token
982 | }

      | ^
drivers/pinctrl/qcom/pinctrl-msm.c: In function 'msm_gpio_irq_set_type':
drivers/pinctrl/qcom/pinctrl-msm.c:909:2: warning: control reaches end of
non-void function [-Wreturn-type]
  909 |  } else {
      |  ^

At top level:
drivers/pinctrl/qcom/pinctrl-msm.c:84:13: warning:
'msm_writel_intr_target' defined but not used [-Wunused-function]
84 | static void msm_writel_##name(u32 val, struct msm_pinctrl *pctrl,

\
      |             ^~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:94:1: note: in expansion of macro
'MSM_ACCESSOR'
   94 | MSM_ACCESSOR(intr_target)
      | ^~~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:79:12: warning:
'msm_readl_intr_target' defined but not used [-Wunused-function]
   79 | static u32 msm_readl_##name(struct msm_pinctrl *pctrl, \
      |            ^~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:94:1: note: in expansion of macro
'MSM_ACCESSOR'
   94 | MSM_ACCESSOR(intr_target)
      | ^~~~~~~~~~~~

Caused by commit

Quoted 7 lines

13bec8d49bdf ("pinctrl: qcom: use scm_call to route GPIO irq to Apps")

I have reverted that commit for today.

--
Cheers,
Stephen Rothwell

Hello I sent a v4 of the broken patch. I'm really sorry for the mess... If I should fix
this in a different way pls tell me how and I will do ASAP.