Re: [patch 1/3] speakup: Add synth parameter to io functions

From: Greg KH
Date: Thu Dec 10 2020 - 10:22:59 EST


On Wed, Dec 09, 2020 at 09:58:30PM +0100, samuel.thibault@xxxxxxxxxxxx wrote:
> This merely adds the missing synth parameter to all io functions.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
>

The build still breaks when this patch is applied:

CC [M] drivers/accessibility/speakup/spk_ttyio.o
In file included from drivers/accessibility/speakup/spk_ttyio.c:9:
drivers/accessibility/speakup/spk_ttyio.c: In function ‘spk_ttyio_in’:
drivers/accessibility/speakup/spk_priv.h:31:27: warning: passing argument 1 of ‘ttyio_in’ makes pointer from integer without a cast [-Wint-conversion]
31 | #define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */
| ^~~~~~
| |
| int
drivers/accessibility/speakup/spk_ttyio.c:344:18: note: in expansion of macro ‘SPK_SYNTH_TIMEOUT’
344 | return ttyio_in(SPK_SYNTH_TIMEOUT);
| ^~~~~~~~~~~~~~~~~
drivers/accessibility/speakup/spk_ttyio.c:315:49: note: expected ‘struct spk_synth *’ but argument is of type ‘int’
315 | static unsigned char ttyio_in(struct spk_synth *in_synth, int timeout)
| ~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/accessibility/speakup/spk_ttyio.c:344:9: error: too few arguments to function ‘ttyio_in’
344 | return ttyio_in(SPK_SYNTH_TIMEOUT);
| ^~~~~~~~
drivers/accessibility/speakup/spk_ttyio.c:315:22: note: declared here
315 | static unsigned char ttyio_in(struct spk_synth *in_synth, int timeout)
| ^~~~~~~~
drivers/accessibility/speakup/spk_ttyio.c: In function ‘spk_ttyio_in_nowait’:
drivers/accessibility/speakup/spk_ttyio.c:349:10: error: too few arguments to function ‘ttyio_in’
349 | u8 rv = ttyio_in(0);
| ^~~~~~~~
drivers/accessibility/speakup/spk_ttyio.c:315:22: note: declared here
315 | static unsigned char ttyio_in(struct spk_synth *in_synth, int timeout)
| ^~~~~~~~
drivers/accessibility/speakup/spk_ttyio.c: In function ‘spk_ttyio_in’:
drivers/accessibility/speakup/spk_ttyio.c:345:1: error: control reaches end of non-void function [-Werror=return-type]
345 | }
| ^
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:279: drivers/accessibility/speakup/spk_ttyio.o] Error 1
make[2]: *** [scripts/Makefile.build:496: drivers/accessibility/speakup] Error 2
make[1]: *** [scripts/Makefile.build:496: drivers/accessibility] Error 2
make: *** [Makefile:1805: drivers] Error 2


You can't break the build on any patches in a series :(

thanks,

greg k-h