lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 6 Jun 2012 11:16:39 +0100
From:	Ian Abbott <abbotti@....co.uk>
To:	H Hartley Sweeten <hartleys@...ionengravers.com>
CC:	Linux Kernel <linux-kernel@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	Ian Abbott <ian.abbott@....co.uk>,
	"fmhess@...rs.sourceforge.net" <fmhess@...rs.sourceforge.net>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] staging: comedi: ni_mio_common.c: local functions should
 be static

On 2012-06-05 19:20, H Hartley Sweeten wrote:
> Local functions should be marked static to prevent them from
> being exposed globally.
>
> This quiets the following sparse warnings:
>
> warning: symbol 'ni_release_gpct_mite_channel' was not declared. Should it be static?
> warning: symbol 'ni_prime_channelgain_list' was not declared. Should it be static?
>
> Signed-off-by: H Hartley Sweeten<hsweeten@...ionengravers.com>
> Cc: Ian Abbott<abbotti@....co.uk>
> Cc: Mori Hess<fmhess@...rs.sourceforge.net>
> Cc: Greg Kroah-Hartman<gregkh@...uxfoundation.org>
>
> ---
>
> diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
> index fd232bc..3b3a0b1 100644
> --- a/drivers/staging/comedi/drivers/ni_mio_common.c
> +++ b/drivers/staging/comedi/drivers/ni_mio_common.c
> @@ -644,7 +644,7 @@ static void ni_release_ao_mite_channel(struct comedi_device *dev)
>   #endif /*  PCIDMA */
>   }
>
> -void ni_release_gpct_mite_channel(struct comedi_device *dev,
> +static void ni_release_gpct_mite_channel(struct comedi_device *dev,
>   				  unsigned gpct_index)
>   {
>   #ifdef PCIDMA
> @@ -1880,7 +1880,7 @@ static int ni_ai_insn_read(struct comedi_device *dev,
>   	return insn->n;
>   }

This results in a compiler warning about the unused function 
ni_release_gpct_mite_channel when compiling ni_atmio.c.  It was unused 
before of course, but now it is static, the compiler realizes it!

It could be fixed for now by moving the '#ifdef PCIDMA' and matching 
'#endif' to surround the whole function, though I guess we want to try 
and get rid of the #ifdef's eventually.  It's tricky because 
ni_mio_common.c isn't a standalone compilation unit, it's #include'd by 
some other .c files.  We might need to have a go at splitting it up at 
some point.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ