2
0

271-batman-adv-Remove-usage-of-BIT-x-in-packet.h.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From: Sven Eckelmann <[email protected]>
  2. Date: Thu, 21 Dec 2017 10:17:39 +0100
  3. Subject: [PATCH] batman-adv: Remove usage of BIT(x) in packet.h
  4. The BIT(x) macro is no longer available for uapi headers because it is
  5. defined outside of it (linux/bitops.h). The use of it must therefore be
  6. avoided and replaced by an appropriate other representation.
  7. Signed-off-by: Sven Eckelmann <[email protected]>
  8. Signed-off-by: David S. Miller <[email protected]>
  9. ---
  10. --- a/net/batman-adv/packet.h
  11. +++ b/net/batman-adv/packet.h
  12. @@ -19,7 +19,6 @@
  13. #define _NET_BATMAN_ADV_PACKET_H_
  14. #include <asm/byteorder.h>
  15. -#include <linux/bitops.h>
  16. #include <linux/if_ether.h>
  17. #include <linux/types.h>
  18. @@ -85,9 +84,9 @@ enum batadv_subtype {
  19. * one hop neighbor on the interface where it was originally received.
  20. */
  21. enum batadv_iv_flags {
  22. - BATADV_NOT_BEST_NEXT_HOP = BIT(0),
  23. - BATADV_PRIMARIES_FIRST_HOP = BIT(1),
  24. - BATADV_DIRECTLINK = BIT(2),
  25. + BATADV_NOT_BEST_NEXT_HOP = 1UL << 0,
  26. + BATADV_PRIMARIES_FIRST_HOP = 1UL << 1,
  27. + BATADV_DIRECTLINK = 1UL << 2,
  28. };
  29. /* ICMP message types */
  30. @@ -108,9 +107,9 @@ enum batadv_icmp_packettype {
  31. * @BATADV_MCAST_WANT_ALL_IPV6: we want all IPv6 multicast packets
  32. */
  33. enum batadv_mcast_flags {
  34. - BATADV_MCAST_WANT_ALL_UNSNOOPABLES = BIT(0),
  35. - BATADV_MCAST_WANT_ALL_IPV4 = BIT(1),
  36. - BATADV_MCAST_WANT_ALL_IPV6 = BIT(2),
  37. + BATADV_MCAST_WANT_ALL_UNSNOOPABLES = 1UL << 0,
  38. + BATADV_MCAST_WANT_ALL_IPV4 = 1UL << 1,
  39. + BATADV_MCAST_WANT_ALL_IPV6 = 1UL << 2,
  40. };
  41. /* tt data subtypes */
  42. @@ -124,10 +123,10 @@ enum batadv_mcast_flags {
  43. * @BATADV_TT_FULL_TABLE: contains full table to replace existing table
  44. */
  45. enum batadv_tt_data_flags {
  46. - BATADV_TT_OGM_DIFF = BIT(0),
  47. - BATADV_TT_REQUEST = BIT(1),
  48. - BATADV_TT_RESPONSE = BIT(2),
  49. - BATADV_TT_FULL_TABLE = BIT(4),
  50. + BATADV_TT_OGM_DIFF = 1UL << 0,
  51. + BATADV_TT_REQUEST = 1UL << 1,
  52. + BATADV_TT_RESPONSE = 1UL << 2,
  53. + BATADV_TT_FULL_TABLE = 1UL << 4,
  54. };
  55. /**
  56. @@ -135,7 +134,7 @@ enum batadv_tt_data_flags {
  57. * @BATADV_VLAN_HAS_TAG: whether the field contains a valid vlan tag or not
  58. */
  59. enum batadv_vlan_flags {
  60. - BATADV_VLAN_HAS_TAG = BIT(15),
  61. + BATADV_VLAN_HAS_TAG = 1UL << 15,
  62. };
  63. /* claim frame types for the bridge loop avoidance */