public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: andrew hendry <andrew.hendry@gmail.com>
Cc: netdev@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-x25@vger.kernel.org
Subject: Re: [PATCH 1/3] X25: Move SYSCTL ifdefs into header
Date: Fri, 27 Nov 2009 14:34:44 -0800	[thread overview]
Message-ID: <m1fx7ztx4r.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <d45a3acc0911241715jcb41224y7871ea0878b9df9e@mail.gmail.com> (andrew hendry's message of "Wed\, 25 Nov 2009 12\:15\:26 +1100")

andrew hendry <andrew.hendry@gmail.com> writes:

> Moves the CONFIG_SYSCTL ifdefs in x25_init into header.

This looks like a reasonable change and it doesn't conflict
with my pending changes in the sysctl tree.

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>

>
> Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
>
> diff -uprN -X a/Documentation/dontdiff a/include/net/x25.h b/include/net/x25.h
> --- a/include/net/x25.h	2009-11-10 11:32:31.000000000 +1100
> +++ b/include/net/x25.h	2009-11-25 09:05:21.000000000 +1100
> @@ -287,8 +287,14 @@ extern unsigned long x25_display_timer(s
>  extern void x25_check_rbuf(struct sock *);
>
>  /* sysctl_net_x25.c */
> +#ifdef CONFIG_SYSCTL
>  extern void x25_register_sysctl(void);
>  extern void x25_unregister_sysctl(void);
> +#else
> +static inline void x25_register_sysctl(void) {};
> +static inline void x25_unregister_sysctl(void) {};
> +#endif /* CONFIG_SYSCTL */
> +
>  struct x25_skb_cb {
>  	unsigned flags;
>  };
> diff -uprN -X a/Documentation/dontdiff a/net/x25/af_x25.c b/net/x25/af_x25.c
> --- a/net/x25/af_x25.c	2009-11-17 10:30:18.000000000 +1100
> +++ b/net/x25/af_x25.c	2009-11-25 09:04:25.000000000 +1100
> @@ -1667,9 +1667,7 @@ static int __init x25_init(void)
>
>  	printk(KERN_INFO "X.25 for Linux Version 0.2\n");
>
> -#ifdef CONFIG_SYSCTL
>  	x25_register_sysctl();
> -#endif
>  	x25_proc_init();
>  out:
>  	return rc;
> @@ -1682,9 +1680,7 @@ static void __exit x25_exit(void)
>  	x25_link_free();
>  	x25_route_free();
>
> -#ifdef CONFIG_SYSCTL
>  	x25_unregister_sysctl();
> -#endif
>
>  	unregister_netdevice_notifier(&x25_dev_notifier);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2009-11-27 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25  1:15 [PATCH 1/3] X25: Move SYSCTL ifdefs into header andrew hendry
2009-11-27 22:34 ` Eric W. Biederman [this message]

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=m1fx7ztx4r.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=andrew.hendry@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-x25@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox