[B.A.T.M.A.N.] [PATCH v2 0/4] batman-adv: cleanups patches for Linux 4.12

Sven Eckelmann
2017-02-22T16:16:01Z

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

Hi,

here is the second version of cleanup patches. It addresses a couple of new
checks from checkpatch.pl:

* CHECK: Macro argument reuse '%s' - possible side-effects?
* CHECK: Unbalanced braces around else statement

The last check currently creates a lot of false positives but a fix for it was
already submitted to Andrew Morton (+ accepted).

It also contains a patch which converts the preprocessor blocks in
multicast.c to simple inline checks. The compiler can directly take care of
removing the unused code when some CONFIG_* option disabled.

changes in v2:

* rebased on top of master
* split "Fix possible side-effects in macros" in two patches
* converted BATADV_PRINT_VID to an inline function

Kind regards,
Sven

Sven Eckelmann (4):
batman-adv: Remove preprocessor checks in multicast.c
batman-adv: Fix unbalanced braces around else statement
batman-adv: Fix possible side-effects in _batadv_dbg
batman-adv: Convert BATADV_PRINT_VID macro to function

net/batman-adv/bridge_loop_avoidance.c | 38 +++++++++++++++---------------
net/batman-adv/distributed-arp-table.c | 6 ++---
net/batman-adv/log.h | 5 ++--
net/batman-adv/main.h | 16 +++++++++++--
net/batman-adv/multicast.c | 16 +++++--------
net/batman-adv/translation-table.c | 42 ++++++++++++++++++----------------
6 files changed, 67 insertions(+), 56 deletions(-)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]