* [PATCH] staging: speakup: make function ser_to_dev static
@ 2017-06-28 13:13 ` Colin King
0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2017-06-28 13:13 UTC (permalink / raw)
To: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, Okash Khawaja, Andy Shevchenko,
Alexandre Ghiti, Dan Carpenter, Rui Teng, speakup, devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The helper function ser_to_dev does not need to be in global scope, so
make it static.
Cleans up sparse warning:
"warning: symbol 'ser_to_dev' was not declared. Should it be static?"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/staging/speakup/spk_ttyio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
index 442f191a017e..ed8e96b06ead 100644
--- a/drivers/staging/speakup/spk_ttyio.c
+++ b/drivers/staging/speakup/spk_ttyio.c
@@ -21,7 +21,7 @@ struct spk_ldisc_data {
static struct spk_synth *spk_ttyio_synth;
static struct tty_struct *speakup_tty;
-int ser_to_dev(int ser, dev_t *dev_no)
+static int ser_to_dev(int ser, dev_t *dev_no)
{
if (ser < 0 || ser > (255 - 64)) {
pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n");
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] staging: speakup: make function ser_to_dev static
@ 2017-06-28 13:13 ` Colin King
0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2017-06-28 13:13 UTC (permalink / raw)
To: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, Okash Khawaja, Andy Shevchenko,
Alexandre Ghiti, Dan Carpenter, Rui Teng, speakup, devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The helper function ser_to_dev does not need to be in global scope, so
make it static.
Cleans up sparse warning:
"warning: symbol 'ser_to_dev' was not declared. Should it be static?"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/staging/speakup/spk_ttyio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
index 442f191a017e..ed8e96b06ead 100644
--- a/drivers/staging/speakup/spk_ttyio.c
+++ b/drivers/staging/speakup/spk_ttyio.c
@@ -21,7 +21,7 @@ struct spk_ldisc_data {
static struct spk_synth *spk_ttyio_synth;
static struct tty_struct *speakup_tty;
-int ser_to_dev(int ser, dev_t *dev_no)
+static int ser_to_dev(int ser, dev_t *dev_no)
{
if (ser < 0 || ser > (255 - 64)) {
pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n");
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: speakup: make function ser_to_dev static
2017-06-28 13:13 ` Colin King
@ 2017-06-28 14:49 ` walter harms
-1 siblings, 0 replies; 8+ messages in thread
From: walter harms @ 2017-06-28 14:49 UTC (permalink / raw)
To: Colin King
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, Okash Khawaja, Andy Shevchenko,
Alexandre Ghiti, Dan Carpenter, Rui Teng, speakup, devel,
kernel-janitors, linux-kernel
Am 28.06.2017 15:13, schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
>
> The helper function ser_to_dev does not need to be in global scope, so
> make it static.
>
> Cleans up sparse warning:
> "warning: symbol 'ser_to_dev' was not declared. Should it be static?"
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/staging/speakup/spk_ttyio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
> index 442f191a017e..ed8e96b06ead 100644
> --- a/drivers/staging/speakup/spk_ttyio.c
> +++ b/drivers/staging/speakup/spk_ttyio.c
> @@ -21,7 +21,7 @@ struct spk_ldisc_data {
> static struct spk_synth *spk_ttyio_synth;
> static struct tty_struct *speakup_tty;
>
> -int ser_to_dev(int ser, dev_t *dev_no)
> +static int ser_to_dev(int ser, dev_t *dev_no)
> {
> if (ser < 0 || ser > (255 - 64)) {
> pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n");
Is there any remark, why the programmer decided to use (255 - 64) instead of 191 ?
re,
wh
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: speakup: make function ser_to_dev static
@ 2017-06-28 14:49 ` walter harms
0 siblings, 0 replies; 8+ messages in thread
From: walter harms @ 2017-06-28 14:49 UTC (permalink / raw)
To: Colin King
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, Okash Khawaja, Andy Shevchenko,
Alexandre Ghiti, Dan Carpenter, Rui Teng, speakup, devel,
kernel-janitors, linux-kernel
Am 28.06.2017 15:13, schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
>
> The helper function ser_to_dev does not need to be in global scope, so
> make it static.
>
> Cleans up sparse warning:
> "warning: symbol 'ser_to_dev' was not declared. Should it be static?"
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/staging/speakup/spk_ttyio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
> index 442f191a017e..ed8e96b06ead 100644
> --- a/drivers/staging/speakup/spk_ttyio.c
> +++ b/drivers/staging/speakup/spk_ttyio.c
> @@ -21,7 +21,7 @@ struct spk_ldisc_data {
> static struct spk_synth *spk_ttyio_synth;
> static struct tty_struct *speakup_tty;
>
> -int ser_to_dev(int ser, dev_t *dev_no)
> +static int ser_to_dev(int ser, dev_t *dev_no)
> {
> if (ser < 0 || ser > (255 - 64)) {
> pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n");
Is there any remark, why the programmer decided to use (255 - 64) instead of 191 ?
re,
wh
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: speakup: make function ser_to_dev static
2017-06-28 14:49 ` walter harms
@ 2017-06-28 15:02 ` Samuel Thibault
-1 siblings, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2017-06-28 15:02 UTC (permalink / raw)
To: walter harms
Cc: Colin King, William Hubbs, Chris Brannon, Kirk Reiser,
Greg Kroah-Hartman, Okash Khawaja, Andy Shevchenko,
Alexandre Ghiti, Dan Carpenter, Rui Teng, speakup, devel,
kernel-janitors, linux-kernel
walter harms, on mer. 28 juin 2017 16:49:03 +0200, wrote:
> Am 28.06.2017 15:13, schrieb Colin King:
> > diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
> > index 442f191a017e..ed8e96b06ead 100644
> > --- a/drivers/staging/speakup/spk_ttyio.c
> > +++ b/drivers/staging/speakup/spk_ttyio.c
> > @@ -21,7 +21,7 @@ struct spk_ldisc_data {
> > static struct spk_synth *spk_ttyio_synth;
> > static struct tty_struct *speakup_tty;
> >
> > -int ser_to_dev(int ser, dev_t *dev_no)
> > +static int ser_to_dev(int ser, dev_t *dev_no)
> > {
> > if (ser < 0 || ser > (255 - 64)) {
> > pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n");
>
>
> Is there any remark, why the programmer decided to use (255 - 64) instead of 191 ?
That's because minor numbers for ttyS* are starting from 64.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: speakup: make function ser_to_dev static
@ 2017-06-28 15:02 ` Samuel Thibault
0 siblings, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2017-06-28 15:02 UTC (permalink / raw)
To: walter harms
Cc: Colin King, William Hubbs, Chris Brannon, Kirk Reiser,
Greg Kroah-Hartman, Okash Khawaja, Andy Shevchenko,
Alexandre Ghiti, Dan Carpenter, Rui Teng, speakup, devel,
kernel-janitors, linux-kernel
walter harms, on mer. 28 juin 2017 16:49:03 +0200, wrote:
> Am 28.06.2017 15:13, schrieb Colin King:
> > diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
> > index 442f191a017e..ed8e96b06ead 100644
> > --- a/drivers/staging/speakup/spk_ttyio.c
> > +++ b/drivers/staging/speakup/spk_ttyio.c
> > @@ -21,7 +21,7 @@ struct spk_ldisc_data {
> > static struct spk_synth *spk_ttyio_synth;
> > static struct tty_struct *speakup_tty;
> >
> > -int ser_to_dev(int ser, dev_t *dev_no)
> > +static int ser_to_dev(int ser, dev_t *dev_no)
> > {
> > if (ser < 0 || ser > (255 - 64)) {
> > pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n");
>
>
> Is there any remark, why the programmer decided to use (255 - 64) instead of 191 ?
That's because minor numbers for ttyS* are starting from 64.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: speakup: make function ser_to_dev static
2017-06-28 13:13 ` Colin King
@ 2017-06-28 20:29 ` Okash Khawaja
-1 siblings, 0 replies; 8+ messages in thread
From: Okash Khawaja @ 2017-06-28 20:29 UTC (permalink / raw)
To: Colin King
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, Andy Shevchenko, Alexandre Ghiti,
Dan Carpenter, Rui Teng, speakup, devel, kernel-janitors,
linux-kernel
Hi,
On Wed, Jun 28, 2017 at 02:13:51PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The helper function ser_to_dev does not need to be in global scope, so
> make it static.
>
> Cleans up sparse warning:
> "warning: symbol 'ser_to_dev' was not declared. Should it be static?"
Thanks very much!
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Okash Khawaja <okash.khawaja@gmail.com>
> ---
> drivers/staging/speakup/spk_ttyio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
> index 442f191a017e..ed8e96b06ead 100644
> --- a/drivers/staging/speakup/spk_ttyio.c
> +++ b/drivers/staging/speakup/spk_ttyio.c
> @@ -21,7 +21,7 @@ struct spk_ldisc_data {
> static struct spk_synth *spk_ttyio_synth;
> static struct tty_struct *speakup_tty;
>
> -int ser_to_dev(int ser, dev_t *dev_no)
> +static int ser_to_dev(int ser, dev_t *dev_no)
> {
> if (ser < 0 || ser > (255 - 64)) {
> pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n");
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: speakup: make function ser_to_dev static
@ 2017-06-28 20:29 ` Okash Khawaja
0 siblings, 0 replies; 8+ messages in thread
From: Okash Khawaja @ 2017-06-28 20:29 UTC (permalink / raw)
To: Colin King
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, Andy Shevchenko, Alexandre Ghiti,
Dan Carpenter, Rui Teng, speakup, devel, kernel-janitors,
linux-kernel
Hi,
On Wed, Jun 28, 2017 at 02:13:51PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The helper function ser_to_dev does not need to be in global scope, so
> make it static.
>
> Cleans up sparse warning:
> "warning: symbol 'ser_to_dev' was not declared. Should it be static?"
Thanks very much!
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Okash Khawaja <okash.khawaja@gmail.com>
> ---
> drivers/staging/speakup/spk_ttyio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
> index 442f191a017e..ed8e96b06ead 100644
> --- a/drivers/staging/speakup/spk_ttyio.c
> +++ b/drivers/staging/speakup/spk_ttyio.c
> @@ -21,7 +21,7 @@ struct spk_ldisc_data {
> static struct spk_synth *spk_ttyio_synth;
> static struct tty_struct *speakup_tty;
>
> -int ser_to_dev(int ser, dev_t *dev_no)
> +static int ser_to_dev(int ser, dev_t *dev_no)
> {
> if (ser < 0 || ser > (255 - 64)) {
> pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n");
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-06-28 20:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28 13:13 [PATCH] staging: speakup: make function ser_to_dev static Colin King
2017-06-28 13:13 ` Colin King
2017-06-28 14:49 ` walter harms
2017-06-28 14:49 ` walter harms
2017-06-28 15:02 ` Samuel Thibault
2017-06-28 15:02 ` Samuel Thibault
2017-06-28 20:29 ` Okash Khawaja
2017-06-28 20:29 ` Okash Khawaja
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.