All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: speakup: fix warning for static declaration
@ 2017-03-27  6:37 Gustavo A. R. Silva
  2017-03-27  7:51 ` Okash Khawaja
  2017-03-27  7:55 ` Samuel Thibault
  0 siblings, 2 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2017-03-27  6:37 UTC (permalink / raw)
  To: gregkh, w.d.hubbs, chris, kirk, samuel.thibault, okash.khawaja,
	rvarsha016, arushisinghal19971997, shiva
  Cc: speakup, devel, linux-kernel

Fix the following sparse warning:
symbol 'spk_serial_out' was not declared. Should it be static?

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/staging/speakup/serialio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c
index 5e31aca..3fab1c3 100644
--- a/drivers/staging/speakup/serialio.c
+++ b/drivers/staging/speakup/serialio.c
@@ -243,7 +243,7 @@ unsigned char spk_serial_in_nowait(void)
 }
 EXPORT_SYMBOL_GPL(spk_serial_in_nowait);
 
-int spk_serial_out(struct spk_synth *in_synth, const char ch)
+static int spk_serial_out(struct spk_synth *in_synth, const char ch)
 {
 	if (in_synth->alive && spk_wait_for_xmitr(in_synth)) {
 		outb_p(ch, speakup_info.port_tts);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: speakup: fix warning for static declaration
  2017-03-27  6:37 [PATCH] staging: speakup: fix warning for static declaration Gustavo A. R. Silva
@ 2017-03-27  7:51 ` Okash Khawaja
  2017-03-27  7:58   ` Samuel Thibault
  2017-03-27  7:55 ` Samuel Thibault
  1 sibling, 1 reply; 5+ messages in thread
From: Okash Khawaja @ 2017-03-27  7:51 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: gregkh, w.d.hubbs, chris, kirk, samuel.thibault, rvarsha016,
	arushisinghal19971997, shiva, speakup, devel, linux-kernel

Hi Gustavo,

On Mon, Mar 27, 2017 at 01:37:29AM -0500, Gustavo A. R. Silva wrote:
> Fix the following sparse warning:
> symbol 'spk_serial_out' was not declared. Should it be static?
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  drivers/staging/speakup/serialio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c
> index 5e31aca..3fab1c3 100644
> --- a/drivers/staging/speakup/serialio.c
> +++ b/drivers/staging/speakup/serialio.c
> @@ -243,7 +243,7 @@ unsigned char spk_serial_in_nowait(void)
>  }
>  EXPORT_SYMBOL_GPL(spk_serial_in_nowait);
>  
> -int spk_serial_out(struct spk_synth *in_synth, const char ch)
> +static int spk_serial_out(struct spk_synth *in_synth, const char ch)
>  {
>  	if (in_synth->alive && spk_wait_for_xmitr(in_synth)) {
>  		outb_p(ch, speakup_info.port_tts);
> -- 
> 2.5.0
> 

Thanks for this :) Could you also move the function higher in the same
file - above line 139 where all static functions are defined?

Okash

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: speakup: fix warning for static declaration
  2017-03-27  6:37 [PATCH] staging: speakup: fix warning for static declaration Gustavo A. R. Silva
  2017-03-27  7:51 ` Okash Khawaja
@ 2017-03-27  7:55 ` Samuel Thibault
  1 sibling, 0 replies; 5+ messages in thread
From: Samuel Thibault @ 2017-03-27  7:55 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: gregkh, w.d.hubbs, chris, kirk, okash.khawaja, rvarsha016,
	arushisinghal19971997, shiva, speakup, devel, linux-kernel

Gustavo A. R. Silva, on lun. 27 mars 2017 01:37:29 -0500, wrote:
> Fix the following sparse warning:
> symbol 'spk_serial_out' was not declared. Should it be static?
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Yes, indeed.

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Thanks

> ---
>  drivers/staging/speakup/serialio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c
> index 5e31aca..3fab1c3 100644
> --- a/drivers/staging/speakup/serialio.c
> +++ b/drivers/staging/speakup/serialio.c
> @@ -243,7 +243,7 @@ unsigned char spk_serial_in_nowait(void)
>  }
>  EXPORT_SYMBOL_GPL(spk_serial_in_nowait);
>  
> -int spk_serial_out(struct spk_synth *in_synth, const char ch)
> +static int spk_serial_out(struct spk_synth *in_synth, const char ch)
>  {
>  	if (in_synth->alive && spk_wait_for_xmitr(in_synth)) {
>  		outb_p(ch, speakup_info.port_tts);
> -- 
> 2.5.0
> 

-- 
Samuel
 Je suis maintenant possesseur d'un ordinateur portable Compaq Armada
 1592DT avec port infra-rouge. Auriez-vous connaissance de programmes
 suceptibles d'utiliser ce port afin de servir de télécommande ?
 -+- JN in NPC : ben quoi, c'est pas à ça que ça sert ?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: speakup: fix warning for static declaration
  2017-03-27  7:51 ` Okash Khawaja
@ 2017-03-27  7:58   ` Samuel Thibault
  2017-03-27  8:39     ` Okash Khawaja
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Thibault @ 2017-03-27  7:58 UTC (permalink / raw)
  To: Okash Khawaja
  Cc: Gustavo A. R. Silva, gregkh, w.d.hubbs, chris, kirk, rvarsha016,
	arushisinghal19971997, shiva, speakup, devel, linux-kernel

Okash Khawaja, on lun. 27 mars 2017 08:51:02 +0100, wrote:
> Thanks for this :) Could you also move the function higher in the same
> file - above line 139 where all static functions are defined?

I'd say no need for this. spk_serial_in is just above.  Moving functions
just for the sake of static vs non-static does not make the code more
readable to my eyes :)
(and it makes tracking changes harder in git annotate)

Samuel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: speakup: fix warning for static declaration
  2017-03-27  7:58   ` Samuel Thibault
@ 2017-03-27  8:39     ` Okash Khawaja
  0 siblings, 0 replies; 5+ messages in thread
From: Okash Khawaja @ 2017-03-27  8:39 UTC (permalink / raw)
  To: Samuel Thibault, Gustavo A. R. Silva, gregkh, w.d.hubbs, chris,
	kirk, rvarsha016, arushisinghal19971997, shiva, speakup, devel,
	linux-kernel

On Mon, Mar 27, 2017 at 09:58:53AM +0200, Samuel Thibault wrote:
> Okash Khawaja, on lun. 27 mars 2017 08:51:02 +0100, wrote:
> > Thanks for this :) Could you also move the function higher in the same
> > file - above line 139 where all static functions are defined?
> 
> I'd say no need for this. spk_serial_in is just above.  Moving functions
> just for the sake of static vs non-static does not make the code more
> readable to my eyes :)
> (and it makes tracking changes harder in git annotate)
> 
> Samuel

Fair enough. When I marked it as static and moved it higher, I
misinterpreted your comment as we neither want it static nor moved. You
probably meant the latter :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-27  8:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-27  6:37 [PATCH] staging: speakup: fix warning for static declaration Gustavo A. R. Silva
2017-03-27  7:51 ` Okash Khawaja
2017-03-27  7:58   ` Samuel Thibault
2017-03-27  8:39     ` Okash Khawaja
2017-03-27  7:55 ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.