Hi Marek
I'm preparing a set of patches for GregKH for linux-next. I compared the resulting mainline tree to maint and found a few differences. These patches bring maint into line with linux-next.
I've no idea if these patches affect backwards compatibility with old kernels. The last one might...
Andrew Lunn (4): batman-adv: Update README to match mainline README. batman-adv: Import sparse fixes from mainline. batman-adv: whitespace fixes from mainline. batman-adv: include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
README | 35 +++++++++-------------------------- bat_sysfs.c | 9 ++++++--- bitarray.c | 2 +- device.c | 3 +-- main.h | 5 +++-- routing.c | 3 ++- send.c | 3 ++- soft-interface.c | 2 +- vis.c | 14 +++++++------- 9 files changed, 32 insertions(+), 44 deletions(-)
Signed-off-by: Andrew Lunn andrew@lunn.ch --- README | 35 +++++++++-------------------------- 1 files changed, 9 insertions(+), 26 deletions(-)
diff --git a/README b/README index 4c2a6c6..e2a7271 100644 --- a/README +++ b/README @@ -15,19 +15,6 @@ above B.A.T.M.A.N. Advanced, prominent examples are: IPv4, IPv6, DHCP, IPX. This is batman-advanced implemented as Linux kernel driver. It does not depend on any network (other) driver, and can be used on wifi as well as ethernet, vpn, etc ... (anything with ethernet-style layer 2). -It compiles against and should work with Linux 2.6.20 - 2.6.33. Supporting older -versions is not planned, but it's probably easy to backport it. If you work on a -backport, feel free to contact us. :-) - -COMPILE -------- -To compile against your currently installed kernel, just type: - -# make - -if you want to compile against some other kernel, use: - -# make KERNELPATH=/path/to/kernel
USAGE ----- @@ -123,15 +110,11 @@ dmesg | grep batman-adv
When investigating problems with your mesh network it is sometimes necessary to see more detail debug messages. This must be enabled when -compiling the batman-adv module. When building batman-adv as part of -kernel, use "make menuconfig" and enable the option -"B.A.T.M.A.N. debugging". When compiling outside of the kernel tree it -is necessary to edit the file Makefile.kbuild and uncomment the line - -#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG +compiling the batman-adv module. Use "make menuconfig" and enable the +option "B.A.T.M.A.N. debugging".
The additional debug output is by default disabled. It can be enabled -either at kernel modules load time or during run time. To enable debug +either at kernel module load time or during run time. To enable debug output at module load time, add the module parameter debug=<value>. <value> can take one of four values.
@@ -160,12 +143,12 @@ to see the debug messages. BATCTL ------
-B.A.T.M.A.N. advanced operates on layer 2 and thus all hosts partici- -pating in the virtual switch are completely transparent for all proto- -cols above layer 2. Therefore the common diagnosis tools do not work as -expected. To overcome these problems batctl was created. At the moment -the batctl contains ping, traceroute, tcpdump and interfaces to the -kernel module settings. +B.A.T.M.A.N. advanced operates on layer 2 and thus all hosts +participating in the virtual switch are completely transparent for all +protocols above layer 2. Therefore the common diagnosis tools do not +work as expected. To overcome these problems batctl was created. At +the moment the batctl contains ping, traceroute, tcpdump and +interfaces to the kernel module settings.
For more information, please see the manpage (man batctl).
Andrew Lunn wrote:
Signed-off-by: Andrew Lunn andrew@lunn.ch
README | 35 +++++++++-------------------------- 1 files changed, 9 insertions(+), 26 deletions(-)
diff --git a/README b/README index 4c2a6c6..e2a7271 100644 --- a/README +++ b/README @@ -15,19 +15,6 @@ above B.A.T.M.A.N. Advanced, prominent examples are: IPv4, IPv6, DHCP, IPX. This is batman-advanced implemented as Linux kernel driver. It does not depend on any network (other) driver, and can be used on wifi as well as ethernet, vpn, etc ... (anything with ethernet-style layer 2). -It compiles against and should work with Linux 2.6.20 - 2.6.33. Supporting older -versions is not planned, but it's probably easy to backport it. If you work on a -backport, feel free to contact us. :-)
-COMPILE
-To compile against your currently installed kernel, just type:
-# make
-if you want to compile against some other kernel, use:
-# make KERNELPATH=/path/to/kernel
This should not be removed from maint or trunk.
USAGE
@@ -123,15 +110,11 @@ dmesg | grep batman-adv
When investigating problems with your mesh network it is sometimes necessary to see more detail debug messages. This must be enabled when -compiling the batman-adv module. When building batman-adv as part of -kernel, use "make menuconfig" and enable the option -"B.A.T.M.A.N. debugging". When compiling outside of the kernel tree it -is necessary to edit the file Makefile.kbuild and uncomment the line
-#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG +compiling the batman-adv module. Use "make menuconfig" and enable the +option "B.A.T.M.A.N. debugging".
This should not be changed in maint or trunk.
The additional debug output is by default disabled. It can be enabled -either at kernel modules load time or during run time. To enable debug +either at kernel module load time or during run time. To enable debug output at module load time, add the module parameter debug=<value>. <value> can take one of four values.
@@ -160,12 +143,12 @@ to see the debug messages. BATCTL
-B.A.T.M.A.N. advanced operates on layer 2 and thus all hosts partici- -pating in the virtual switch are completely transparent for all proto- -cols above layer 2. Therefore the common diagnosis tools do not work as -expected. To overcome these problems batctl was created. At the moment -the batctl contains ping, traceroute, tcpdump and interfaces to the -kernel module settings. +B.A.T.M.A.N. advanced operates on layer 2 and thus all hosts +participating in the virtual switch are completely transparent for all +protocols above layer 2. Therefore the common diagnosis tools do not +work as expected. To overcome these problems batctl was created. At +the moment the batctl contains ping, traceroute, tcpdump and +interfaces to the kernel module settings.
For more information, please see the manpage (man batctl).
This looks fine :)
Best regards, Sven
On Sat, May 01, 2010 at 03:53:12PM +0200, Sven Eckelmann wrote:
Andrew Lunn wrote:
Signed-off-by: Andrew Lunn andrew@lunn.ch
README | 35 +++++++++-------------------------- 1 files changed, 9 insertions(+), 26 deletions(-)
Humm. The README actually needs a lot of work. It still talks about using proc for files which are now in /sys. It is probably better to wait for Marek to update README then look at synchronizing what can be synchronized.
Andrew
I fixed sparce warnings as i moved patches from maint to mainline. This patch move the fixes back to maint.
Signed-off-by: Andrew Lunn andrew@lunn.ch --- bat_sysfs.c | 9 ++++++--- vis.c | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/bat_sysfs.c b/bat_sysfs.c index 7acf8d8..e2c000b 100644 --- a/bat_sysfs.c +++ b/bat_sysfs.c @@ -357,7 +357,8 @@ void sysfs_del_meshif(struct net_device *dev) static ssize_t show_mesh_iface(struct kobject *kobj, struct attribute *attr, char *buff) { - struct net_device *net_dev = to_net_dev(to_dev(kobj->parent)); + struct device *dev = to_dev(kobj->parent); + struct net_device *net_dev = to_net_dev(dev); struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
if (!batman_if) @@ -371,7 +372,8 @@ static ssize_t show_mesh_iface(struct kobject *kobj, struct attribute *attr, static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr, char *buff, size_t count) { - struct net_device *net_dev = to_net_dev(to_dev(kobj->parent)); + struct device *dev = to_dev(kobj->parent); + struct net_device *net_dev = to_net_dev(dev); struct batman_if *batman_if = get_batman_if_by_netdev(net_dev); int status_tmp = -1;
@@ -409,7 +411,8 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr, static ssize_t show_iface_status(struct kobject *kobj, struct attribute *attr, char *buff) { - struct net_device *net_dev = to_net_dev(to_dev(kobj->parent)); + struct device *dev = to_dev(kobj->parent); + struct net_device *net_dev = to_net_dev(dev); struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
if (!batman_if) diff --git a/vis.c b/vis.c index 3144439..bac1401 100644 --- a/vis.c +++ b/vis.c @@ -103,7 +103,7 @@ static int vis_info_choose(void *data, int size)
/* insert interface to the list of interfaces of one originator, if it * does not already exist in the list */ -void vis_data_insert_interface(const uint8_t *interface, +static void vis_data_insert_interface(const uint8_t *interface, struct hlist_head *if_list, bool primary) { @@ -124,7 +124,7 @@ void vis_data_insert_interface(const uint8_t *interface, hlist_add_head(&entry->list, if_list); }
-ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list) +static ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list) { struct if_list_entry *entry; struct hlist_node *pos; @@ -144,8 +144,8 @@ ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list) }
/* read an entry */ -ssize_t vis_data_read_entry(char *buff, struct vis_info_entry *entry, - uint8_t *src, bool primary) +static ssize_t vis_data_read_entry(char *buff, struct vis_info_entry *entry, + uint8_t *src, bool primary) { char to[40];
Andrew Lunn wrote:
diff --git a/bat_sysfs.c b/bat_sysfs.c index 7acf8d8..e2c000b 100644 --- a/bat_sysfs.c +++ b/bat_sysfs.c @@ -357,7 +357,8 @@ void sysfs_del_meshif(struct net_device *dev) static ssize_t show_mesh_iface(struct kobject *kobj, struct attribute *attr, char *buff) {
- struct net_device *net_dev = to_net_dev(to_dev(kobj->parent));
- struct device *dev = to_dev(kobj->parent);
- struct net_device *net_dev = to_net_dev(dev); struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
This has not real something to do with this patch (which is good), but to_net_dev was added in v2.6.20-236-g43cb76d and the README still states that we are compatible with linux 2.6.20. I think we must change that to 2.6.25 (explanation below).
I did a build test with 2.6.19-2.6.28 (have to update my buildenv...):
* 2.6.19: fails in many ways * 2.6.20: fails in bat_sys.c * 2.6.21: warnings in bat_sys.c (better call it fail) * 2.6.22: warnings in bat_sys.c (better call it fail) * 2.6.23: fails * 2.6.24: fails * 2.6.25: ok * 2.6.26: ok * 2.6.27: ok * 2.6.28: ok
But to your patch:
Acked-by: Sven Eckelmann sven.eckelmann@gmx.de
Best regards, Sven
On Sat, May 01, 2010 at 06:34:56PM +0200, Sven Eckelmann wrote:
Andrew Lunn wrote:
diff --git a/bat_sysfs.c b/bat_sysfs.c index 7acf8d8..e2c000b 100644 --- a/bat_sysfs.c +++ b/bat_sysfs.c @@ -357,7 +357,8 @@ void sysfs_del_meshif(struct net_device *dev) static ssize_t show_mesh_iface(struct kobject *kobj, struct attribute *attr, char *buff) {
- struct net_device *net_dev = to_net_dev(to_dev(kobj->parent));
- struct device *dev = to_dev(kobj->parent);
- struct net_device *net_dev = to_net_dev(dev); struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
This has not real something to do with this patch (which is good), but to_net_dev was added in v2.6.20-236-g43cb76d and the README still states that we are compatible with linux 2.6.20. I think we must change that to 2.6.25 (explanation below).
I did a build test with 2.6.19-2.6.28 (have to update my buildenv...):
- 2.6.19: fails in many ways
- 2.6.20: fails in bat_sys.c
- 2.6.21: warnings in bat_sys.c (better call it fail)
- 2.6.22: warnings in bat_sys.c (better call it fail)
- 2.6.23: fails
- 2.6.24: fails
- 2.6.25: ok
- 2.6.26: ok
- 2.6.27: ok
- 2.6.28: ok
Simon is good at testing with older kernels and fixing problems. I guess we can expect a patch to compat.h sometime soon to fix this....
But to your patch:
Acked-by: Sven Eckelmann sven.eckelmann@gmx.de
Thanks Andrew
On Sunday 02 May 2010 00:34:56 Sven Eckelmann wrote:
This has not real something to do with this patch (which is good), but to_net_dev was added in v2.6.20-236-g43cb76d and the README still states that we are compatible with linux 2.6.20. I think we must change that to 2.6.25 (explanation below).
I ran into a bat_sysfs issue today regarding kobject_create_and_add() on 2.6.21 and made a fix for it. With that patch it compiles fine but it needs some more testing though. I did not see any complaints about to_net_dev. It seems to be there: include/linux/netdevice.h line 538. We still might have some issues on 2.6.20 ..
Cheers, Marek
Marek Lindner wrote:
On Sunday 02 May 2010 00:34:56 Sven Eckelmann wrote:
This has not real something to do with this patch (which is good), but to_net_dev was added in v2.6.20-236-g43cb76d and the README still states
that we are compatible with linux 2.6.20. I think we must change that to 2.6.25 (explanation below).
I ran into a bat_sysfs issue today regarding kobject_create_and_add() on 2.6.21 and made a fix for it. With that patch it compiles fine but it needs some more testing though. I did not see any complaints about to_net_dev. It seems to be there: include/linux/netdevice.h line 538. We still might have some issues on 2.6.20 ..
Yes, v2.6.20-236-g43cb76d was merged into v2.6.21-rc1.
I started to create a compat lib with the new kobject stuff, but as you have done it already... nice reaction time ;)
The v2.6.20 stuff seems even more tricky as the data stored in the structs was changed too. The new stuff looks nice, but it gets really ugly if we want to support both.
Best regards. Sven
The mainline driver has some whitespace patches which are not in maint. This patch brings imports them.
Signed-off-by: Andrew Lunn andrew@lunn.ch --- bitarray.c | 2 +- main.h | 4 ++-- routing.c | 3 ++- send.c | 3 ++- vis.c | 6 +++--- 5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/bitarray.c b/bitarray.c index 437cff8..2fef6e3 100644 --- a/bitarray.c +++ b/bitarray.c @@ -150,7 +150,7 @@ char bit_get_packet(TYPE_OF_WORD *seq_bits, int16_t seq_num_diff,
/* sequence number is much newer, probably missed a lot of packets */
- if ((seq_num_diff >= TQ_LOCAL_WINDOW_SIZE) + if ((seq_num_diff >= TQ_LOCAL_WINDOW_SIZE) || (seq_num_diff < EXPECTED_SEQNO_RANGE)) { bat_dbg(DBG_BATMAN, "We missed a lot of packets (%i) !\n", diff --git a/main.h b/main.h index 2ce3b45..55e2214 100644 --- a/main.h +++ b/main.h @@ -69,8 +69,8 @@ #define MODULE_ACTIVE 1 #define MODULE_DEACTIVATING 2
-#define BCAST_QUEUE_LEN 256 -#define BATMAN_QUEUE_LEN 256 +#define BCAST_QUEUE_LEN 256 +#define BATMAN_QUEUE_LE 256
/* * Debug Messages diff --git a/routing.c b/routing.c index 0ab8f89..cd2b4d6 100644 --- a/routing.c +++ b/routing.c @@ -875,7 +875,8 @@ int recv_unicast_packet(struct sk_buff *skb)
/* TTL exceeded */ if (unicast_packet->ttl < 2) { - printk(KERN_WARNING "batman-adv:Warning - can't forward unicast packet from %pM to %pM: ttl exceeded\n", ethhdr->h_source, unicast_packet->dest); + printk(KERN_WARNING "batman-adv:Warning - can't forward unicast packet from %pM to %pM: ttl exceeded\n", + ethhdr->h_source, unicast_packet->dest); return NET_RX_DROP; }
diff --git a/send.c b/send.c index caec6ef..8413ddc 100644 --- a/send.c +++ b/send.c @@ -128,7 +128,8 @@ static void send_packet_to_if(struct forw_packet *forw_packet, if (batman_if->if_status != IF_ACTIVE) return;
- packet_num = buff_pos = 0; + packet_num = 0; + buff_pos = 0; batman_packet = (struct batman_packet *) (forw_packet->packet_buff);
diff --git a/vis.c b/vis.c index bac1401..ff511ca 100644 --- a/vis.c +++ b/vis.c @@ -40,9 +40,9 @@ * before adding more than 127 to the starting value - it is a predecessor, * when adding 128 - it is neither a predecessor nor a successor, * after adding more than 127 to the starting value - it is a successor */ -#define seq_before(x,y) ({typeof(x) _dummy = (x - y); \ - _dummy > smallest_signed_int(_dummy); }) -#define seq_after(x,y) seq_before(y,x) +#define seq_before(x, y) ({typeof(x) _dummy = (x - y); \ + _dummy > smallest_signed_int(_dummy); }) +#define seq_after(x, y) seq_before(y, x)
struct hashtable_t *vis_hash; DEFINE_SPINLOCK(vis_hash_lock);
Andrew Lunn wrote:
The mainline driver has some whitespace patches which are not in maint. This patch brings imports them.
Signed-off-by: Andrew Lunn andrew@lunn.ch
Please be aware that this one conflicts heavily with * [PATCH-maint 1/2] batman-adv: Fix whitespace problems criticized by checkpatch.pl * [PATCH-maint 2/2v2] batman-adv: Reduce max characters on a line to 80
Only following part seems to be new:
diff --git a/send.c b/send.c index caec6ef..8413ddc 100644 --- a/send.c +++ b/send.c @@ -128,7 +128,8 @@ static void send_packet_to_if(struct forw_packet *forw_packet, if (batman_if->if_status != IF_ACTIVE) return;
- packet_num = buff_pos = 0;
- packet_num = 0;
- buff_pos = 0; batman_packet = (struct batman_packet *) (forw_packet->packet_buff);
Best regards, Sven
From: Andrea Gelmini andrea.gelmini@gelma.net
drivers/staging/batman-adv/send.c:137: CHECK: multiple assignments should be avoided
Signed-off-by: Andrea Gelmini andrea.gelmini@gelma.net Signed-off-by: Greg Kroah-Hartman gregkh@suse.de --- drivers/staging/batman-adv/send.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c index 2a9fac8..ff7b1f1 100644 --- a/drivers/staging/batman-adv/send.c +++ b/drivers/staging/batman-adv/send.c @@ -134,7 +134,8 @@ static void send_packet_to_if(struct forw_packet *forw_packet, if (batman_if->if_active != IF_ACTIVE) return;
- packet_num = buff_pos = 0; + packet_num = 0; + buff_pos = 0; batman_packet = (struct batman_packet *) (forw_packet->packet_buff);
On Sat, May 01, 2010 at 03:46:16PM +0200, Sven Eckelmann wrote:
From: Andrea Gelmini andrea.gelmini@gelma.net
drivers/staging/batman-adv/send.c:137: CHECK: multiple assignments should be avoided
Signed-off-by: Andrea Gelmini andrea.gelmini@gelma.net Signed-off-by: Greg Kroah-Hartman gregkh@suse.de
drivers/staging/batman-adv/send.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c index 2a9fac8..ff7b1f1 100644 --- a/drivers/staging/batman-adv/send.c +++ b/drivers/staging/batman-adv/send.c @@ -134,7 +134,8 @@ static void send_packet_to_if(struct forw_packet *forw_packet, if (batman_if->if_active != IF_ACTIVE) return;
- packet_num = buff_pos = 0;
- packet_num = 0;
- buff_pos = 0; batman_packet = (struct batman_packet *) (forw_packet->packet_buff);
--
I was too lazy to go searching upstream. We can just import this patch and use your three checkpatch patches.
Andrew
On Sat, May 01, 2010 at 03:33:39PM +0200, Sven Eckelmann wrote:
Andrew Lunn wrote:
The mainline driver has some whitespace patches which are not in maint. This patch brings imports them.
Signed-off-by: Andrew Lunn andrew@lunn.ch
Please be aware that this one conflicts heavily with
- [PATCH-maint 1/2] batman-adv: Fix whitespace problems criticized by checkpatch.pl
- [PATCH-maint 2/2v2] batman-adv: Reduce max characters on a line to 80
Yes. I was expecting that. It would be nice if your three patches got into maint sooner rather than later. I guess it is a superset of these fixes, plus other fixes.
I'm happy to wait for your patches.
Andrew
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files.
2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files.
3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch.
Signed-off-by: Tejun Heo tj@kernel.org Guess-its-ok-by: Christoph Lameter cl@linux-foundation.org Cc: Ingo Molnar mingo@redhat.com Cc: Lee Schermerhorn Lee.Schermerhorn@hp.com Signed-off-by: Andrew Lunn andrew@lunn.ch --- device.c | 3 +-- main.h | 1 + soft-interface.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/device.c b/device.c index 5f7655b..b2ecba2 100644 --- a/device.c +++ b/device.c @@ -20,6 +20,7 @@ */
#include <linux/device.h> +#include <linux/slab.h> #include "main.h" #include "device.h" #include "send.h" @@ -27,8 +28,6 @@ #include "hash.h" #include "hard-interface.h"
-#include "compat.h" - static struct class *batman_class;
static int Major; /* Major number assigned to our device driver */ diff --git a/main.h b/main.h index 55e2214..6749ce0 100644 --- a/main.h +++ b/main.h @@ -113,6 +113,7 @@ extern int bat_debug_type(int type); #include <linux/kthread.h> /* kernel threads */ #include <linux/pkt_sched.h> /* schedule types */ #include <linux/workqueue.h> /* workqueue */ +#include <linux/slab.h> #include <net/sock.h> /* struct sock */ #include <linux/jiffies.h> #include "types.h" diff --git a/soft-interface.c b/soft-interface.c index 37a1f44..c3b5288 100644 --- a/soft-interface.c +++ b/soft-interface.c @@ -26,9 +26,9 @@ #include "translation-table.h" #include "types.h" #include "hash.h" +#include <linux/slab.h> #include <linux/ethtool.h> #include <linux/etherdevice.h> -#include "compat.h"
static uint16_t bcast_seqno = 1; /* give own bcast messages seq numbers to avoid * broadcast storms */
Andrew Lunn wrote:
diff --git a/device.c b/device.c index 5f7655b..b2ecba2 100644 --- a/device.c +++ b/device.c @@ -20,6 +20,7 @@ */
#include <linux/device.h> +#include <linux/slab.h> #include "main.h" #include "device.h" #include "send.h" @@ -27,8 +28,6 @@ #include "hash.h" #include "hard-interface.h"
-#include "compat.h"
static struct class *batman_class;
static int Major; /* Major number assigned to our device driver */
Can you explain why it is here ok to remove compat.h in maint?
Best regards, Sven
On Sat, May 01, 2010 at 03:28:30PM +0200, Sven Eckelmann wrote:
Andrew Lunn wrote:
diff --git a/device.c b/device.c index 5f7655b..b2ecba2 100644 --- a/device.c +++ b/device.c @@ -20,6 +20,7 @@ */
#include <linux/device.h> +#include <linux/slab.h> #include "main.h" #include "device.h" #include "send.h" @@ -27,8 +28,6 @@ #include "hash.h" #include "hard-interface.h"
-#include "compat.h"
static struct class *batman_class;
static int Major; /* Major number assigned to our device driver */
Can you explain why it is here ok to remove compat.h in maint?
It is not. My error. I will fix this.
Andrew
Hi Andrew, Sven,
I'm preparing a set of patches for GregKH for linux-next. I compared the resulting mainline tree to maint and found a few differences. These patches bring maint into line with linux-next.
thanks for the many patches. I'll go through this pile and submit them asap.
Regards, Marek
On Sun, May 02, 2010 at 01:14:51AM +0800, Marek Lindner wrote:
Hi Andrew, Sven,
I'm preparing a set of patches for GregKH for linux-next. I compared the resulting mainline tree to maint and found a few differences. These patches bring maint into line with linux-next.
thanks for the many patches. I'll go through this pile and submit them asap.
I suggest you add Sven's checkpatch patches first and then let me produce new patches on top of that.
Andrew
On Sunday 02 May 2010 02:17:29 Andrew Lunn wrote:
I suggest you add Sven's checkpatch patches first and then let me produce new patches on top of that.
Ok, Sven's patches are in the repos now. Thanks to his hint I also committed https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2010-May/002557.html and https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2010-May/002566.html as they seemed to be clean. No need to resend them.
Regards, Marek
b.a.t.m.a.n@lists.open-mesh.org