The following commit has been merged in the merge/master branch: commit b521d19518b4bc9390c367bcf7cac12cf6bdf542 Author: Antonio Quartulli ordex@autistici.org Date: Wed Apr 18 09:28:12 2012 +0200
batman-adv: use uint32_t instead of unsigned long to avoid cast
Signed-off-by: Antonio Quartulli ordex@autistici.org
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 994369d..ab2085c 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -58,12 +58,12 @@ out: static int bat_iv_ogm_iface_enable(struct hard_iface *hard_iface) { struct batman_ogm_packet *batman_ogm_packet; - unsigned long random_seqno; + uint32_t random_seqno; int res = -1;
/* randomize initial seqno to avoid collision */ - get_random_bytes(&random_seqno, sizeof(unsigned long)); - atomic_set(&hard_iface->seqno, (uint32_t)random_seqno); + get_random_bytes(&random_seqno, sizeof(random_seqno)); + atomic_set(&hard_iface->seqno, random_seqno);
hard_iface->packet_len = BATMAN_OGM_HLEN; hard_iface->packet_buff = kmalloc(hard_iface->packet_len, GFP_ATOMIC);