]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
batman-adv: unbloat batadv_priv if debug is not enabled
authorMarek Lindner <lindner_marek@yahoo.de>
Sun, 16 Dec 2012 05:53:15 +0000 (13:53 +0800)
committerAntonio Quartulli <ordex@autistici.org>
Sat, 12 Jan 2013 10:58:23 +0000 (20:58 +1000)
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/debugfs.c
net/batman-adv/soft-interface.c
net/batman-adv/types.h

index 5136d32bc9b9547e352c10bcf5a08758aedce48a..55a90078dc6635909f8d318fdccabdeda70bb085 100644 (file)
@@ -229,7 +229,6 @@ static void batadv_debug_log_cleanup(struct batadv_priv *bat_priv)
 #else /* CONFIG_BATMAN_ADV_DEBUG */
 static int batadv_debug_log_setup(struct batadv_priv *bat_priv)
 {
-       bat_priv->debug_log = NULL;
        return 0;
 }
 
index 57714f83ede4231a7e9826a1978644f37348a694..3d6816667bfc5e385ca491a37d72c8edbb7b608f 100644 (file)
@@ -493,7 +493,9 @@ struct net_device *batadv_softif_create(const char *name)
        atomic_set(&bat_priv->gw_bandwidth, 41);
        atomic_set(&bat_priv->orig_interval, 1000);
        atomic_set(&bat_priv->hop_penalty, 30);
+#ifdef CONFIG_BATMAN_ADV_DEBUG
        atomic_set(&bat_priv->log_level, 0);
+#endif
        atomic_set(&bat_priv->fragmentation, 1);
        atomic_set(&bat_priv->bcast_queue_left, BATADV_BCAST_QUEUE_LEN);
        atomic_set(&bat_priv->batman_queue_left, BATADV_BATMAN_QUEUE_LEN);
index 441880a0caa7145da3ec9bea04a4e378efdf375f..d8061ac28409be13661757c11ad154480d001d6f 100644 (file)
@@ -284,12 +284,16 @@ struct batadv_priv {
        atomic_t gw_bandwidth;          /* gw bandwidth */
        atomic_t orig_interval;         /* uint */
        atomic_t hop_penalty;           /* uint */
+#ifdef CONFIG_BATMAN_ADV_DEBUG
        atomic_t log_level;             /* uint */
+#endif
        atomic_t bcast_seqno;
        atomic_t bcast_queue_left;
        atomic_t batman_queue_left;
        char num_ifaces;
+#ifdef CONFIG_BATMAN_ADV_DEBUG
        struct batadv_debug_log *debug_log;
+#endif
        struct kobject *mesh_obj;
        struct dentry *debug_dir;
        struct hlist_head forw_bat_list;