Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1676733
| From | walter harms <wharms@bfs.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: speakup: make function ser_to_dev static |
| Date | 2017-06-28 16:50 +0200 |
| Message-ID | <tXms1-81a-11@gated-at.bofh.it> (permalink) |
| References | <tXl2W-7fD-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: speakup: make function ser_to_dev static Colin King <colin.king@canonical.com> - 2017-06-28 15:20 +0200
Re: [PATCH] staging: speakup: make function ser_to_dev static walter harms <wharms@bfs.de> - 2017-06-28 16:50 +0200
Re: [PATCH] staging: speakup: make function ser_to_dev static Samuel Thibault <samuel.thibault@ens-lyon.org> - 2017-06-28 17:10 +0200
Re: [PATCH] staging: speakup: make function ser_to_dev static Okash Khawaja <okash.khawaja@gmail.com> - 2017-06-28 22:40 +0200
csiph-web