From patchwork Thu Jul 16 07:44:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 5101 Return-Path: Received: from ascomax.hasler.ascom.ch (ascomax.hasler.ascom.ch [139.79.135.1]) by open-mesh.net (Postfix) with ESMTPS id E8B9315438B for ; Thu, 16 Jul 2009 08:07:59 +0000 (UTC) Received: from eiger.ma.tech.ascom.ch (eiger.ma.tech.ascom.ch [139.79.100.1]) by ascomax.hasler.ascom.ch (8.14.3/8.14.3) with ESMTP id n6G7i1RD016529 for ; Thu, 16 Jul 2009 09:44:02 +0200 (MEST) Received: from [139.79.100.143] (helo=donkey.ma.tech.ascom.ch) by eiger.ma.tech.ascom.ch with esmtp (Exim 3.16 #1) id 1MRLdI-0002gJ-00 for b.a.t.m.a.n@lists.open-mesh.net; Thu, 16 Jul 2009 09:44:00 +0200 Received: from lunn by donkey.ma.tech.ascom.ch with local (Exim 4.69) (envelope-from ) id 1MRLdJ-0001ZS-AD for b.a.t.m.a.n@lists.open-mesh.net; Thu, 16 Jul 2009 09:44:01 +0200 Date: Thu, 16 Jul 2009 09:44:01 +0200 From: Andrew Lunn To: The list for a Better Approach To Mobile Ad-hoc Networking Message-ID: <20090716074401.GT19071@ma.tech.ascom.ch> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: [B.A.T.M.A.N.] [batman-adv]: move vis_format from vis.c to proc.c X-BeenThere: b.a.t.m.a.n@lists.open-mesh.net X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 08:08:00 -0000 vis_format is currently in vis.c however this variable is only used in proc.c. Move it into proc, and remove the volatile, which should not be needed. Signed-off-by: Andrew Lunn Index: vis.c =================================================================== --- vis.c (revision 1345) +++ vis.c (working copy) @@ -42,7 +42,6 @@ void free_info(void *data); void send_vis_packet(struct vis_info *info); void start_vis_timer(void); -volatile uint8_t vis_format = DOT_DRAW; int vis_info_cmp(void *data1, void *data2) { Index: vis.h =================================================================== --- vis.h (revision 1345) +++ vis.h (working copy) @@ -51,7 +51,6 @@ extern struct hashtable_t *vis_hash; extern spinlock_t vis_hash_lock; -extern volatile uint8_t vis_format; void receive_vis_packet(struct ethhdr *ethhdr, struct vis_packet *vis_packet, int vis_info_len); void vis_set_mode(int mode); Index: proc.c =================================================================== --- proc.c (revision 1345) +++ proc.c (working copy) @@ -31,6 +31,7 @@ #include "types.h" #include "hash.h" +static uint8_t vis_format = DOT_DRAW; static struct proc_dir_entry *proc_batman_dir = NULL, *proc_interface_file = NULL, *proc_orig_interval_file = NULL, *proc_originators_file = NULL;