linux-next: build failure after merge of the tty tree
Mark Brown
maintainerHi all,
After merging the tty tree, today's linux-next build (x86_64 allmodconfig) failed like this:
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1925:4: error:
cannot jump from this goto statement to its label
1925 | goto error;
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 | PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1916:3: error:
cannot jump from this goto statement to its label
1916 | goto error;
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 | PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1911:3: error:
cannot jump from this goto statement to its label
1911 | goto error;
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 | PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1887:3: error:
cannot jump from this goto statement to its label
1887 | goto error;
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 | PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1881:3: error:
cannot jump from this goto statement to its label
1881 | goto error;
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 | PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1872:4: error:
cannot jump from this goto statement to its label
1872 | goto error;
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 | PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1864:4: error:
cannot jump from this goto statement to its label
1864 | goto error;
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 | PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1848:3: error:
cannot jump from this goto statement to its label
1848 | goto error;
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 | PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^
8 errors generated.
Caused by commit
3d71f8d7eeb37 (serial: qcom-geni: remove .pm callback, use runtime PM in startup/shutdown)
I have used the tree from next-20260710 instead.
Hi Mark,
Quoted 63 lines · Mark Brown
Hi all,
After merging the tty tree, today's linux-next build (
x86_64allmodconfig) failed like this:
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1925:4: error:
cannot jump from this goto statement to its label1925 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1916:3: error:
cannot jump from this goto statement to its label1916 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1911:3: error:
cannot jump from this goto statement to its label1911 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1887:3: error:
cannot jump from this goto statement to its label1887 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1881:3: error:
cannot jump from this goto statement to its label1881 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1872:4: error:
cannot jump from this goto statement to its label1872 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1864:4: error:
cannot jump from this goto statement to its label1864 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1848:3: error:
cannot jump from this goto statement to its label
Quoted 7 lines
1848 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^
8 errors generated.
I don't see these errors in my local build. Is there any specific way to build to see these errors?
Thanks,
Praveen Talari
Quoted 6 lines
Caused by commit
3d71f8d7eeb37(serial: qcom-geni: remove .pm callback, use runtime PM in startup/shutdown)I have used the tree from next-20260710 instead.
Quoted 74 lines · Praveen Talari
Hi Mark,
Quoted 63 lines · Mark Brown
Hi all,
After merging the tty tree, today's linux-next build (
x86_64allmodconfig) failed like this:
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1925:4: error:
cannot jump from this goto statement to its label1925 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1916:3: error:
cannot jump from this goto statement to its label1916 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1911:3: error:
cannot jump from this goto statement to its label1911 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1887:3: error:
cannot jump from this goto statement to its label1887 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1881:3: error:
cannot jump from this goto statement to its label1881 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1872:4: error:
cannot jump from this goto statement to its label1872 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1864:4: error:
cannot jump from this goto statement to its label1864 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1848:3: error:
cannot jump from this goto statement to its labelQuoted 7 lines
1848 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^
8 errors generated.
Quoted 2 lines
I don't see these errors in my local build. Is there any specific way to build to see these errors?
Have you tried 'allmodconfig'? I'll go do that now too...
thanks,
greg k-h
Quoted 74 lines · Praveen Talari
Hi Mark,
Quoted 63 lines · Mark Brown
Hi all,
After merging the tty tree, today's linux-next build (
x86_64allmodconfig) failed like this:
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1925:4: error:
cannot jump from this goto statement to its label1925 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1916:3: error:
cannot jump from this goto statement to its label1916 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1911:3: error:
cannot jump from this goto statement to its label1911 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1887:3: error:
cannot jump from this goto statement to its label1887 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1881:3: error:
cannot jump from this goto statement to its label1881 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1872:4: error:
cannot jump from this goto statement to its label1872 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1864:4: error:
cannot jump from this goto statement to its label1864 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1848:3: error:
cannot jump from this goto statement to its labelQuoted 7 lines
1848 | goto error; | ^
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1931:44: note:
jump bypasses initialization of variable with __attribute__((cleanup))
1931 |PM_RUNTIME_ACQUIRE_IF_ENABLED(uport->dev, pm);
| ^
8 errors generated.
Quoted 2 lines
I don't see these errors in my local build. Is there any specific way to build to see these errors?
Nope, I can't duplicate this either on my side just by building this branch. Is this coming from a change somewhere else that modifies PM_RUNTIME_ACQUIRE_IF_ENABLED()?
thanks,
greg k-h
Mark Brown
maintainerQuoted 8 lines · Greg KH
Quoted 2 lines · Praveen Talari
I don't see these errors in my local build. Is there any specific way to build to see these errors?
Nope, I can't duplicate this either on my side just by building this branch. Is this coming from a change somewhere else that modifies
PM_RUNTIME_ACQUIRE_IF_ENABLED()?
It's something clang reports.
Quoted 11 lines · Mark Brown
Quoted 8 lines · Greg KH
Quoted 2 lines · Praveen Talari
I don't see these errors in my local build. Is there any specific way to build to see these errors?
Nope, I can't duplicate this either on my side just by building this branch. Is this coming from a change somewhere else that modifies
PM_RUNTIME_ACQUIRE_IF_ENABLED()?It's something clang reports.
Right, this change is broken, as the cleanup function will be called with an uninitialized pointer on any of the 'goto error' paths before the PM_RUNTIME_ACQUIRE_IF_ENABLED(). This goes against the documentation in include/linux/cleanup.h:
Lastly, given that the benefit of cleanup helpers is removal of “goto”, and that the “goto” statement can jump between scopes, the expectation is that usage of “goto” and cleanup helpers is never mixed in the same function. I.e. for a given routine, convert all resources that need a “goto” cleanup to scope-based cleanup, or convert none of them.
Signature · 2 lines
Cheers, Nathan
Quoted 18 lines · Nathan Chancellor
Quoted 11 lines · Mark Brown
Quoted 8 lines · Greg KH
Quoted 2 lines · Praveen Talari
I don't see these errors in my local build. Is there any specific way to build to see these errors?
Nope, I can't duplicate this either on my side just by building this branch. Is this coming from a change somewhere else that modifies
PM_RUNTIME_ACQUIRE_IF_ENABLED()?It's something clang reports.
Right, this change is broken, as the cleanup function will be called with an uninitialized pointer on any of the 'goto error' paths before the
PM_RUNTIME_ACQUIRE_IF_ENABLED(). This goes against the documentation ininclude/linux/cleanup.h:
Quoted 6 lines
Lastly, given that the benefit of cleanup helpers is removal of “goto”, and that the “goto” statement can jump between scopes, the expectation is that usage of “goto” and cleanup helpers is never mixed in the same function. I.e. for a given routine, convert all resources that need a “goto” cleanup to scope-based cleanup, or convert none of them.
Ok, thanks, I'll go revert the offending commit now, sorry for the delay.
greg k-h