The annotated tag, v2.6.39 has been created
at 8b0753a3df28c21b0570fa21362c5f1b3b4f59bf (tag)
tagging 61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (commit)
replaces v2.6.39-rc7
tagged by Linus Torvalds
on Wed May 18 21:06:42 2011 -0700
- Shortlog ------------------------------------------------------------
Linux 2.6.39
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEABECAAYFAk3Ul1oACgkQF3YsRnbiHLuyUACgt9Z+/LJ9ETZfBjHdJyfBRcLr
wcQAoLWhHm8s0IVpzjzfW3lmRLTJ87VE
=ztrd
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
The following commit has been merged in the master branch:
commit 409c211addf538311287bfa350486027614970e7
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 14 23:14:53 2011 +0200
batman-adv: Remove casts from type x to type x
Casting from pointer like 'struct orig_node*' to 'struct orig_node *'
doesn't provide any additional functionality and can be savely removed.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/unicast.c b/unicast.c
index e2deb44..82717fd 100644
--- a/unicast.c
+++ b/unicast.c
@@ -295,7 +295,7 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
/* get routing information */
if (is_multicast_ether_addr(ethhdr->h_dest)) {
- orig_node = (struct orig_node *)gw_get_selected_orig(bat_priv);
+ orig_node = gw_get_selected_orig(bat_priv);
if (orig_node)
goto find_router;
}
diff --git a/vis.c b/vis.c
index adb0327..b48954c 100644
--- a/vis.c
+++ b/vis.c
@@ -621,7 +621,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
struct hlist_head *head;
struct orig_node *orig_node;
struct neigh_node *router;
- struct vis_info *info = (struct vis_info *)bat_priv->my_vis_info;
+ struct vis_info *info = bat_priv->my_vis_info;
struct vis_packet *packet = (struct vis_packet *)info->skb_packet->data;
struct vis_info_entry *entry;
struct tt_local_entry *tt_local_entry;
--
batman-adv
The following commit has been merged in the master branch:
commit 0414519e19493d781da9bc368110cbe9bedc4124
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 14 23:14:52 2011 +0200
batman-adv: Remove explicit casts cast from void* for store
It is not necessary to cast a void* to the pointer type when we just
store it and don't want to do pointer arithmetic before the actual
assignment.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/bitarray.c b/bitarray.c
index 767e237..700ee4f 100644
--- a/bitarray.c
+++ b/bitarray.c
@@ -130,7 +130,7 @@ static void bit_reset_window(unsigned long *seq_bits)
char bit_get_packet(void *priv, unsigned long *seq_bits,
int32_t seq_num_diff, int8_t set_mark)
{
- struct bat_priv *bat_priv = (struct bat_priv *)priv;
+ struct bat_priv *bat_priv = priv;
/* sequence number is slightly older. We already got a sequence number
* higher than this one, so we just mark it. */
diff --git a/hard-interface.c b/hard-interface.c
index 915e12b..e626e75 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -523,7 +523,7 @@ void hardif_remove_interfaces(void)
static int hard_if_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
- struct net_device *net_dev = (struct net_device *)ptr;
+ struct net_device *net_dev = ptr;
struct hard_iface *hard_iface = hardif_get_by_netdev(net_dev);
struct hard_iface *primary_if = NULL;
struct bat_priv *bat_priv;
diff --git a/translation-table.c b/translation-table.c
index be7b5cc..802eace 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -313,7 +313,7 @@ out:
static void _tt_local_del(struct hlist_node *node, void *arg)
{
- struct bat_priv *bat_priv = (struct bat_priv *)arg;
+ struct bat_priv *bat_priv = arg;
void *data = container_of(node, struct tt_local_entry, hash_entry);
kfree(data);
--
batman-adv
The following commit has been merged in the master branch:
commit ff26dcdca935d2f61416ab534c04ec233101b06c
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 14 23:14:51 2011 +0200
batman-adv: Only use in up and down gw representation
It is not save to provide memory for an int and then cast the pointer to
it to long*. It is better to standardize the up and down gateway
bandwith representation to simple ints and only use long inside
conversation routines.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/gateway_common.c b/gateway_common.c
index 50d3a59..ed3bd36 100644
--- a/gateway_common.c
+++ b/gateway_common.c
@@ -76,10 +76,11 @@ void gw_bandwidth_to_kbit(uint8_t gw_srv_class, int *down, int *up)
}
static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
- long *up, long *down)
+ int *up, int *down)
{
int ret, multi = 1;
char *slash_ptr, *tmp_ptr;
+ long ldown, lup;
slash_ptr = strchr(buff, '/');
if (slash_ptr)
@@ -96,7 +97,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
*tmp_ptr = '\0';
}
- ret = strict_strtoul(buff, 10, down);
+ ret = strict_strtoul(buff, 10, &ldown);
if (ret) {
bat_err(net_dev,
"Download speed of gateway mode invalid: %s\n",
@@ -104,7 +105,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
return false;
}
- *down *= multi;
+ *down = ldown * multi;
/* we also got some upload info */
if (slash_ptr) {
@@ -121,7 +122,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
*tmp_ptr = '\0';
}
- ret = strict_strtoul(slash_ptr + 1, 10, up);
+ ret = strict_strtoul(slash_ptr + 1, 10, &lup);
if (ret) {
bat_err(net_dev,
"Upload speed of gateway mode invalid: "
@@ -129,7 +130,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
return false;
}
- *up *= multi;
+ *up = lup * multi;
}
return true;
@@ -138,7 +139,8 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
ssize_t gw_bandwidth_set(struct net_device *net_dev, char *buff, size_t count)
{
struct bat_priv *bat_priv = netdev_priv(net_dev);
- long gw_bandwidth_tmp = 0, up = 0, down = 0;
+ long gw_bandwidth_tmp = 0;
+ int up = 0, down = 0;
bool ret;
ret = parse_gw_bandwidth(net_dev, buff, &up, &down);
@@ -158,12 +160,11 @@ ssize_t gw_bandwidth_set(struct net_device *net_dev, char *buff, size_t count)
* speeds, hence we need to calculate it back to show the number
* that is going to be propagated
**/
- gw_bandwidth_to_kbit((uint8_t)gw_bandwidth_tmp,
- (int *)&down, (int *)&up);
+ gw_bandwidth_to_kbit((uint8_t)gw_bandwidth_tmp, &down, &up);
gw_deselect(bat_priv);
bat_info(net_dev, "Changing gateway bandwidth from: '%i' to: '%ld' "
- "(propagating: %ld%s/%ld%s)\n",
+ "(propagating: %d%s/%d%s)\n",
atomic_read(&bat_priv->gw_bandwidth), gw_bandwidth_tmp,
(down > 2048 ? down / 1024 : down),
(down > 2048 ? "MBit" : "KBit"),
--
batman-adv
The following commit has been merged in the master branch:
commit f896bd9280543d0e35f45d3fd404bf9dba0e46d0
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 14 23:14:49 2011 +0200
batman-adv: Don't do pointer arithmetic with void*
The size of void is currently set by gcc to 1, but is not well defined
in general. Therefore it is more advisable to cast it to char* before
doing pointer arithmetic.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/originator.c b/originator.c
index 080ec88..9843b68 100644
--- a/originator.c
+++ b/originator.c
@@ -567,7 +567,7 @@ static int orig_node_del_if(struct orig_node *orig_node,
memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size);
/* copy second part */
- memcpy(data_ptr + del_if_num * chunk_size,
+ memcpy((char *)data_ptr + del_if_num * chunk_size,
orig_node->bcast_own + ((del_if_num + 1) * chunk_size),
(max_if_num - del_if_num) * chunk_size);
@@ -587,7 +587,7 @@ free_bcast_own:
memcpy(data_ptr, orig_node->bcast_own_sum,
del_if_num * sizeof(uint8_t));
- memcpy(data_ptr + del_if_num * sizeof(uint8_t),
+ memcpy((char *)data_ptr + del_if_num * sizeof(uint8_t),
orig_node->bcast_own_sum + ((del_if_num + 1) * sizeof(uint8_t)),
(max_if_num - del_if_num) * sizeof(uint8_t));
--
batman-adv