Add appropriate <linux/prefetch.h> include for prefetch users
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 22 May 2011 20:47:17 +0000 (16:47 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 May 2011 04:41:57 +0000 (21:41 -0700)
commit70c71606190e9115e5f8363bfcd164c582eb314a
tree17c7f6b5df814b9ed319bc0d839969a0de741433
parent281dc5c5ec0fb299514567cbc358562649c1af95
Add appropriate <linux/prefetch.h> include for prefetch users

After discovering that wide use of prefetch on modern CPUs
could be a net loss instead of a win, net drivers which were
relying on the implicit inclusion of prefetch.h via the list
headers showed up in the resulting cleanup fallout.  Give
them an explicit include via the following $0.02 script.

 =========================================
 #!/bin/bash
 MANUAL=""
 for i in `git grep -l 'prefetch(.*)' .` ; do
  grep -q '<linux/prefetch.h>' $i
  if [ $? = 0 ] ; then
  continue
  fi

  ( echo '?^#include <linux/?a'
  echo '#include <linux/prefetch.h>'
  echo .
  echo w
  echo q
  ) | ed -s $i > /dev/null 2>&1
  if [ $? != 0 ]; then
  echo $i needs manual fixup
  MANUAL="$i $MANUAL"
  fi
 done
 echo ------------------- 8\<----------------------
 echo vi $MANUAL
 =========================================

Signed-off-by: Paul <paul.gortmaker@windriver.com>
[ Fixed up some incorrect #include placements, and added some
  non-network drivers and the fib_trie.c case    - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
38 files changed:
drivers/block/drbd/drbd_int.h
drivers/dma/ioat/dma.c
drivers/dma/ioat/dma_v2.c
drivers/dma/ioat/dma_v3.c
drivers/infiniband/hw/amso1100/c2.c
drivers/net/benet/be_main.c
drivers/net/bna/bnad.c
drivers/net/bnx2x/bnx2x_cmn.c
drivers/net/chelsio/sge.c
drivers/net/cnic.c
drivers/net/cxgb3/sge.c
drivers/net/cxgb4/sge.c
drivers/net/cxgb4vf/sge.c
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/netdev.c
drivers/net/ehea/ehea_qmr.h
drivers/net/enic/enic_main.c
drivers/net/forcedeth.c
drivers/net/igb/igb_main.c
drivers/net/igbvf/netdev.c
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbevf/ixgbevf_main.c
drivers/net/myri10ge/myri10ge.c
drivers/net/pasemi_mac.c
drivers/net/pch_gbe/pch_gbe_main.c
drivers/net/qla3xxx.c
drivers/net/qlge/qlge_main.c
drivers/net/r8169.c
drivers/net/s2io.c
drivers/net/sb1250-mac.c
drivers/net/sfc/rx.c
drivers/net/skge.c
drivers/net/stmmac/stmmac_main.c
drivers/net/tc35815.c
drivers/net/vxge/vxge-main.c
drivers/net/vxge/vxge-traffic.c
net/ipv4/fib_trie.c