Re: [PATCH 35/46] kernel: Mark function as static in kernel/seccomp.c

From: Kees Cook
Date: Thu Feb 27 2014 - 10:33:37 EST


On Thu, Feb 27, 2014 at 4:20 AM, Rashika Kheria
<rashika.kheria@xxxxxxxxx> wrote:
> Mark function as static in kernel/seccomp.c because it is not used
> outside this file.
>
> This eliminates the following warning in kernel/seccomp.c:
> kernel/seccomp.c:296:6: warning: no previous prototype for âseccomp_attach_user_filterâ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@xxxxxxxxx>
> Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>

Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>

Thanks!

-Kees

> ---
> kernel/seccomp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/seccomp.c b/kernel/seccomp.c
> index b7a1004..0e004a7 100644
> --- a/kernel/seccomp.c
> +++ b/kernel/seccomp.c
> @@ -293,7 +293,7 @@ fail:
> *
> * Returns 0 on success and non-zero otherwise.
> */
> -long seccomp_attach_user_filter(char __user *user_filter)
> +static long seccomp_attach_user_filter(char __user *user_filter)
> {
> struct sock_fprog fprog;
> long ret = -EFAULT;
> --
> 1.7.9.5
>



--
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/