Andrew Lunn | 1 May 2010 15:10
Picon

[PATCH 2/4] batman-adv: Import sparse fixes from mainline.

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@...>
---
 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
 <at>  <at>  -357,7 +357,8  <at>  <at>  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)
 <at>  <at>  -371,7 +372,8  <at>  <at>  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);
(Continue reading)

Andrew Lunn | 1 May 2010 15:10
Picon

[PATCH 0/4] *** SUBJECT HERE ***

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(-)

Andrew Lunn | 1 May 2010 15:10
Picon

[PATCH 4/4] batman-adv: include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...

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
(Continue reading)

Andrew Lunn | 1 May 2010 15:10
Picon

[PATCH 1/4] batman-adv: Update README to match mainline README.

Signed-off-by: Andrew Lunn <andrew@...>
---
 README |   35 +++++++++--------------------------
 1 files changed, 9 insertions(+), 26 deletions(-)

diff --git a/README b/README
index 4c2a6c6..e2a7271 100644
--- a/README
+++ b/README
 <at>  <at>  -15,19 +15,6  <at>  <at>  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
 -----
 <at>  <at>  -123,15 +110,11  <at>  <at>  dmesg | grep batman-adv
(Continue reading)

Andrew Lunn | 1 May 2010 15:10
Picon

[PATCH 3/4] batman-adv: whitespace fixes from mainline.

The mainline driver has some whitespace patches which are not in
maint. This patch brings imports them.

Signed-off-by: Andrew Lunn <andrew@...>
---
 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
 <at>  <at>  -150,7 +150,7  <at>  <at>  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
 <at>  <at>  -69,8 +69,8  <at>  <at> 
(Continue reading)

Sven Eckelmann | 1 May 2010 15:28
Picon
Picon

Re: [PATCH 4/4] batman-adv: include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...

Andrew Lunn wrote:
> diff --git a/device.c b/device.c
> index 5f7655b..b2ecba2 100644
> --- a/device.c
> +++ b/device.c
>  <at>  <at>  -20,6 +20,7  <at>  <at> 
>   */
> 
>  #include <linux/device.h>
> +#include <linux/slab.h>
>  #include "main.h"
>  #include "device.h"
>  #include "send.h"
>  <at>  <at>  -27,8 +28,6  <at>  <at> 
>  #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
Sven Eckelmann | 1 May 2010 15:33
Picon
Picon

Re: [PATCH 3/4] batman-adv: whitespace fixes from mainline.

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@...>

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
>  <at>  <at>  -128,7 +128,8  <at>  <at>  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
(Continue reading)

Sven Eckelmann | 1 May 2010 15:46
Picon
Picon

[PATCH] Staging: batman-adv: send.c: Checkpatch cleanup

From: Andrea Gelmini <andrea.gelmini@...>

drivers/staging/batman-adv/send.c:137: CHECK: multiple assignments should be avoided

Signed-off-by: Andrea Gelmini <andrea.gelmini@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 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
 <at>  <at>  -134,7 +134,8  <at>  <at>  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);

--

-- 
1.7.1

Sven Eckelmann | 1 May 2010 15:53
Picon
Picon

Re: [PATCH 1/4] batman-adv: Update README to match mainline README.

Andrew Lunn wrote:
> Signed-off-by: Andrew Lunn <andrew@...>
> ---
>  README |   35 +++++++++--------------------------
>  1 files changed, 9 insertions(+), 26 deletions(-)
> 
> diff --git a/README b/README
> index 4c2a6c6..e2a7271 100644
> --- a/README
> +++ b/README
>  <at>  <at>  -15,19 +15,6  <at>  <at>  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.
(Continue reading)

Andrew Lunn | 1 May 2010 16:05
Picon

Re: [PATCH 4/4] batman-adv: include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...

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
> >  <at>  <at>  -20,6 +20,7  <at>  <at> 
> >   */
> > 
> >  #include <linux/device.h>
> > +#include <linux/slab.h>
> >  #include "main.h"
> >  #include "device.h"
> >  #include "send.h"
> >  <at>  <at>  -27,8 +28,6  <at>  <at> 
> >  #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

(Continue reading)


Gmane