Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751658AbdF1OtU (ORCPT ); Wed, 28 Jun 2017 10:49:20 -0400 Received: from mx02-sz.bfs.de ([194.94.69.103]:45709 "EHLO mx02-sz.bfs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbdF1OtM (ORCPT ); Wed, 28 Jun 2017 10:49:12 -0400 Message-ID: <5953C1DF.5010201@bfs.de> Date: Wed, 28 Jun 2017 16:49:03 +0200 From: walter harms Reply-To: wharms@bfs.de User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 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@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 References: <20170628131351.22106-1-colin.king@canonical.com> In-Reply-To: <20170628131351.22106-1-colin.king@canonical.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1122 Lines: 35 Am 28.06.2017 15:13, schrieb Colin King: > From: Colin Ian King > > 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 > --- > 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