akaros/scripts/spatch/linux/scalar.cocci
<<
>>
Prefs
   1@@
   2typedef u8;
   3typedef uint8_t;
   4@@
   5-u8
   6+uint8_t
   7
   8@@
   9typedef u16;
  10typedef uint16_t;
  11@@
  12-u16
  13+uint16_t
  14
  15@@
  16typedef __u16;
  17@@
  18-__u16
  19+uint16_t
  20
  21@@
  22typedef u32;
  23typedef uint32_t;
  24@@
  25-u32
  26+uint32_t
  27
  28@@
  29typedef u64;
  30typedef uint64_t;
  31@@
  32-u64
  33+uint64_t
  34
  35@@
  36typedef cycle_t;
  37@@
  38-cycle_t
  39+uint64_t
  40
  41@@
  42typedef s8;
  43typedef int8_t;
  44@@
  45-s8
  46+int8_t
  47
  48@@
  49typedef s16;
  50typedef int16_t;
  51@@
  52-s16
  53+int16_t
  54
  55@@
  56typedef s32;
  57typedef int32_t;
  58@@
  59-s32
  60+int32_t
  61
  62@@
  63typedef s64;
  64typedef int64_t;
  65@@
  66-s64
  67+int64_t
  68
  69@@
  70typedef uint;
  71@@
  72-uint
  73+unsigned int
  74
  75@@
  76typedef __sum16;
  77@@
  78-__sum16
  79+uint16_t
  80
  81@@
  82typedef __wsum;
  83@@
  84-__wsum
  85+uint32_t
  86
  87@@
  88@@
  89-ETH_ALEN
  90+Eaddrlen
  91
  92@@
  93@@
  94-ETH_HLEN
  95+ETHERHDRSIZE
  96
  97@@
  98@@
  99-ETH_DATA_LEN
 100+ETHERMAXTU
 101
 102@@
 103@@
 104 struct
 105-pci_dev
 106+pci_device
 107
 108@@
 109@@
 110 struct
 111-net_device
 112+ether
 113
 114// Akaros's netif_stats is Linux's rtnl_link_stats64, which is a superset (byte
 115// for byte) of net_device_stats.
 116@@
 117@@
 118 struct
 119-rtnl_link_stats64
 120+netif_stats
 121
 122@@
 123@@
 124 struct
 125-net_device_stats
 126+netif_stats
 127
 128@@
 129struct pci_device *p;
 130@@
 131-p->irq
 132+p->irqline
 133
 134@@
 135struct pci_device *p;
 136@@
 137-p->subsystem_vendor
 138+pci_get_subvendor(p)
 139
 140@@
 141struct pci_device *p;
 142@@
 143-p->subsystem_device
 144+pci_get_subdevice(p)
 145
 146@@
 147struct pci_device *p;
 148@@
 149-p->dev
 150+p->device
 151
 152@@
 153struct ether *p;
 154@@
 155-p->features
 156+p->feat
 157
 158@@
 159struct ether *p;
 160expression E;
 161@@
 162-p->vlan_features = E;
 163
 164@@
 165struct ether *p;
 166expression E;
 167@@
 168-p->hw_enc_features = E;
 169
 170@@
 171struct ether *p;
 172@@
 173-p->dev_addr
 174+p->ea
 175
 176@@
 177struct ether *p;
 178expression E;
 179@@
 180-p->dev_port = E;
 181
 182@@
 183struct ether *p;
 184expression E;
 185@@
 186-p->addr_len = E;
 187
 188@@
 189struct ether *p;
 190@@
 191-p->addr_len
 192+Eaddrlen
 193
 194@@
 195struct ether *p;
 196expression E;
 197@@
 198-p->netdev_ops = E;
 199
 200@@
 201struct ether *p;
 202expression E;
 203@@
 204-p->watchdog_timeo = E;
 205
 206@@
 207struct ether *p;
 208expression E;
 209@@
 210-p->ethtool_ops = E;
 211