The following commit has been merged in the merge/master branch: commit a6d3936843b7050528117ab14a3de7a67de48bfa Author: Antonio Quartulli ordex@autistici.org Date: Sat Apr 28 21:21:15 2012 +0200
batman-adv: remove biggest_unsigned_int() macro
As suggested by David S. Miller, this macro is not very useful. So we can remove it and use its expanded version instead.
Signed-off-by: Antonio Quartulli ordex@autistici.org
diff --git a/net/batman-adv/distributed-arp-table.h b/net/batman-adv/distributed-arp-table.h index 5e23577..6c0acde 100644 --- a/net/batman-adv/distributed-arp-table.h +++ b/net/batman-adv/distributed-arp-table.h @@ -29,7 +29,7 @@
#include <linux/if_arp.h>
-#define DAT_ADDR_MAX biggest_unsigned_int(dat_addr_t) +#define DAT_ADDR_MAX ((dat_addr_t)~(dat_addr_t)0)
#define ARP_HW_SRC(skb, hdr_size) ((uint8_t *)(skb->data + hdr_size) + \ ETH_HLEN + sizeof(struct arphdr)) diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 5fced65..4d0326a 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -239,9 +239,6 @@ static inline bool has_timed_out(unsigned long timestamp, unsigned int timeout) /* Returns the smallest signed integer in two's complement with the sizeof x */ #define smallest_signed_int(x) (1u << (7u + 8u * (sizeof(x) - 1u)))
-/* Returns the biggest unsigned integer with the sizeof x */ -#define biggest_unsigned_int(x) (~(x)0) - /* Checks if a sequence number x is a predecessor/successor of y. * they handle overflows/underflows and can correctly check for a * predecessor/successor unless the variable sequence number has grown by