* [PATCH 1/5] batman-adv: Start new development cycle
2020-04-27 15:06 [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27 Simon Wunderlich
@ 2020-04-27 15:06 ` Simon Wunderlich
2020-04-27 15:06 ` [PATCH 2/5] batman-adv: Fix spelling error in term buffer Simon Wunderlich
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Simon Wunderlich @ 2020-04-27 15:06 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
net/batman-adv/main.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 2a234d0ad445..61d8dbe8c954 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -13,7 +13,7 @@
#define BATADV_DRIVER_DEVICE "batman-adv"
#ifndef BATADV_SOURCE_VERSION
-#define BATADV_SOURCE_VERSION "2020.1"
+#define BATADV_SOURCE_VERSION "2020.2"
#endif
/* B.A.T.M.A.N. parameters */
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] batman-adv: Fix spelling error in term buffer
2020-04-27 15:06 [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27 Simon Wunderlich
2020-04-27 15:06 ` [PATCH 1/5] batman-adv: Start new development cycle Simon Wunderlich
@ 2020-04-27 15:06 ` Simon Wunderlich
2020-04-27 15:06 ` [PATCH 3/5] batman-adv: trace: Drop unneeded types.h include Simon Wunderlich
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Simon Wunderlich @ 2020-04-27 15:06 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Sven Eckelmann, Simon Wunderlich
From: Sven Eckelmann <sven@narfation.org>
checkpatch warns about a typo in the word bufFer which was introduced in
commit 2191c1bcbc64 ("batman-adv: kernel doc for types.h").
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
net/batman-adv/types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 4a17a66cc572..d152b8e81f61 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -1086,7 +1086,7 @@ struct batadv_priv_bla {
* struct batadv_priv_debug_log - debug logging data
*/
struct batadv_priv_debug_log {
- /** @log_buff: buffer holding the logs (ring bufer) */
+ /** @log_buff: buffer holding the logs (ring buffer) */
char log_buff[BATADV_LOG_BUF_LEN];
/** @log_start: index of next character to read */
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] batman-adv: trace: Drop unneeded types.h include
2020-04-27 15:06 [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27 Simon Wunderlich
2020-04-27 15:06 ` [PATCH 1/5] batman-adv: Start new development cycle Simon Wunderlich
2020-04-27 15:06 ` [PATCH 2/5] batman-adv: Fix spelling error in term buffer Simon Wunderlich
@ 2020-04-27 15:06 ` Simon Wunderlich
2020-04-27 15:06 ` [PATCH 4/5] batman-adv: Utilize prandom_u32_max for random [0, max) values Simon Wunderlich
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Simon Wunderlich @ 2020-04-27 15:06 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Sven Eckelmann, Simon Wunderlich
From: Sven Eckelmann <sven@narfation.org>
The commit 04ae87a52074 ("ftrace: Rework event_create_dir()") restructured
various macros in the ftrace framework. These changes also had the nice
side effect that the linux/types.h include is no longer necessary to define
some of the types used by these macros.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
net/batman-adv/trace.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/batman-adv/trace.h b/net/batman-adv/trace.h
index f631b1e01b89..a87547570b4e 100644
--- a/net/batman-adv/trace.h
+++ b/net/batman-adv/trace.h
@@ -15,7 +15,6 @@
#include <linux/percpu.h>
#include <linux/printk.h>
#include <linux/tracepoint.h>
-#include <linux/types.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM batadv
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] batman-adv: Utilize prandom_u32_max for random [0, max) values
2020-04-27 15:06 [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27 Simon Wunderlich
` (2 preceding siblings ...)
2020-04-27 15:06 ` [PATCH 3/5] batman-adv: trace: Drop unneeded types.h include Simon Wunderlich
@ 2020-04-27 15:06 ` Simon Wunderlich
2020-04-27 15:06 ` [PATCH 5/5] batman-adv: remove unused inline function batadv_arp_change_timeout Simon Wunderlich
2020-04-27 20:04 ` [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27 David Miller
5 siblings, 0 replies; 7+ messages in thread
From: Simon Wunderlich @ 2020-04-27 15:06 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Sven Eckelmann
From: Sven Eckelmann <sven@narfation.org>
The kernel provides a function to create random values from 0 - (max-1)
since commit f337db64af05 ("random32: add prandom_u32_max and convert open
coded users"). Simply use this function to replace code sections which use
prandom_u32 and a handcrafted method to map it to the correct range.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
net/batman-adv/bat_iv_ogm.c | 4 ++--
net/batman-adv/bat_v_elp.c | 2 +-
net/batman-adv/bat_v_ogm.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index a7c8dd7ae513..e87f19c82e8d 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -280,7 +280,7 @@ batadv_iv_ogm_emit_send_time(const struct batadv_priv *bat_priv)
unsigned int msecs;
msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
- msecs += prandom_u32() % (2 * BATADV_JITTER);
+ msecs += prandom_u32_max(2 * BATADV_JITTER);
return jiffies + msecs_to_jiffies(msecs);
}
@@ -288,7 +288,7 @@ batadv_iv_ogm_emit_send_time(const struct batadv_priv *bat_priv)
/* when do we schedule a ogm packet to be sent */
static unsigned long batadv_iv_ogm_fwd_send_time(void)
{
- return jiffies + msecs_to_jiffies(prandom_u32() % (BATADV_JITTER / 2));
+ return jiffies + msecs_to_jiffies(prandom_u32_max(BATADV_JITTER / 2));
}
/* apply hop penalty for a normal link */
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index 1e3172db7492..353e49c40e7f 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -49,7 +49,7 @@ static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface)
unsigned int msecs;
msecs = atomic_read(&hard_iface->bat_v.elp_interval) - BATADV_JITTER;
- msecs += prandom_u32() % (2 * BATADV_JITTER);
+ msecs += prandom_u32_max(2 * BATADV_JITTER);
queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.elp_wq,
msecs_to_jiffies(msecs));
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index 969466218999..0959d32be65c 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -88,7 +88,7 @@ static void batadv_v_ogm_start_queue_timer(struct batadv_hard_iface *hard_iface)
unsigned int msecs = BATADV_MAX_AGGREGATION_MS * 1000;
/* msecs * [0.9, 1.1] */
- msecs += prandom_u32() % (msecs / 5) - (msecs / 10);
+ msecs += prandom_u32_max(msecs / 5) - (msecs / 10);
queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.aggr_wq,
msecs_to_jiffies(msecs / 1000));
}
@@ -107,7 +107,7 @@ static void batadv_v_ogm_start_timer(struct batadv_priv *bat_priv)
return;
msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
- msecs += prandom_u32() % (2 * BATADV_JITTER);
+ msecs += prandom_u32_max(2 * BATADV_JITTER);
queue_delayed_work(batadv_event_workqueue, &bat_priv->bat_v.ogm_wq,
msecs_to_jiffies(msecs));
}
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] batman-adv: remove unused inline function batadv_arp_change_timeout
2020-04-27 15:06 [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27 Simon Wunderlich
` (3 preceding siblings ...)
2020-04-27 15:06 ` [PATCH 4/5] batman-adv: Utilize prandom_u32_max for random [0, max) values Simon Wunderlich
@ 2020-04-27 15:06 ` Simon Wunderlich
2020-04-27 20:04 ` [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27 David Miller
5 siblings, 0 replies; 7+ messages in thread
From: Simon Wunderlich @ 2020-04-27 15:06 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, YueHaibing, Sven Eckelmann, Simon Wunderlich
From: YueHaibing <yuehaibing@huawei.com>
There's no callers in-tree.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
net/batman-adv/distributed-arp-table.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/batman-adv/distributed-arp-table.h b/net/batman-adv/distributed-arp-table.h
index 2bff2f4a325c..4e031661682a 100644
--- a/net/batman-adv/distributed-arp-table.h
+++ b/net/batman-adv/distributed-arp-table.h
@@ -163,11 +163,6 @@ static inline void batadv_dat_init_own_addr(struct batadv_priv *bat_priv,
{
}
-static inline void batadv_arp_change_timeout(struct net_device *soft_iface,
- const char *name)
-{
-}
-
static inline int batadv_dat_init(struct batadv_priv *bat_priv)
{
return 0;
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27
2020-04-27 15:06 [PATCH 0/5] pull request for net-next: batman-adv 2020-04-27 Simon Wunderlich
` (4 preceding siblings ...)
2020-04-27 15:06 ` [PATCH 5/5] batman-adv: remove unused inline function batadv_arp_change_timeout Simon Wunderlich
@ 2020-04-27 20:04 ` David Miller
5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2020-04-27 20:04 UTC (permalink / raw)
To: sw; +Cc: netdev, b.a.t.m.a.n
From: Simon Wunderlich <sw@simonwunderlich.de>
Date: Mon, 27 Apr 2020 17:06:02 +0200
> here is a small cleanup pull request of batman-adv to go into net-next.
>
> Please pull or let me know of any problem!
Also pulled, thanks again.
^ permalink raw reply [flat|nested] 7+ messages in thread