All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: walter harms <wharms@bfs.de>
Cc: Colin King <colin.king@canonical.com>,
	William Hubbs <w.d.hubbs@gmail.com>,
	Chris Brannon <chris@the-brannons.com>,
	Kirk Reiser <kirk@reisers.ca>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Okash Khawaja <okash.khawaja@gmail.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Rui Teng <rui.teng@linux.vnet.ibm.com>,
	speakup@linux-speakup.org, devel@driverdev.osuosl.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: speakup: make function ser_to_dev static
Date: Wed, 28 Jun 2017 17:02:14 +0200	[thread overview]
Message-ID: <20170628150214.fvajwpuxgoz537sp@var.youpi.perso.aquilenet.fr> (raw)
In-Reply-To: <5953C1DF.5010201@bfs.de>

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

WARNING: multiple messages have this Message-ID (diff)
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: walter harms <wharms@bfs.de>
Cc: Colin King <colin.king@canonical.com>,
	William Hubbs <w.d.hubbs@gmail.com>,
	Chris Brannon <chris@the-brannons.com>,
	Kirk Reiser <kirk@reisers.ca>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Okash Khawaja <okash.khawaja@gmail.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Rui Teng <rui.teng@linux.vnet.ibm.com>,
	speakup@linux-speakup.org, devel@driverdev.osuosl.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: speakup: make function ser_to_dev static
Date: Wed, 28 Jun 2017 15:02:14 +0000	[thread overview]
Message-ID: <20170628150214.fvajwpuxgoz537sp@var.youpi.perso.aquilenet.fr> (raw)
In-Reply-To: <5953C1DF.5010201@bfs.de>

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

  reply	other threads:[~2017-06-28 15:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-06-28 15:02     ` Samuel Thibault
2017-06-28 20:29 ` Okash Khawaja
2017-06-28 20:29   ` Okash Khawaja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170628150214.fvajwpuxgoz537sp@var.youpi.perso.aquilenet.fr \
    --to=samuel.thibault@ens-lyon.org \
    --cc=alex@ghiti.fr \
    --cc=andy.shevchenko@gmail.com \
    --cc=chris@the-brannons.com \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kirk@reisers.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=okash.khawaja@gmail.com \
    --cc=rui.teng@linux.vnet.ibm.com \
    --cc=speakup@linux-speakup.org \
    --cc=w.d.hubbs@gmail.com \
    --cc=wharms@bfs.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.