1. 29 11月, 2011 1 次提交
  2. 17 11月, 2011 2 次提交
  3. 09 11月, 2011 2 次提交
  4. 19 10月, 2011 1 次提交
  5. 22 9月, 2011 4 次提交
  6. 16 9月, 2011 1 次提交
  7. 18 8月, 2011 1 次提交
  8. 12 8月, 2011 1 次提交
  9. 03 8月, 2011 1 次提交
  10. 29 7月, 2011 1 次提交
  11. 23 7月, 2011 1 次提交
  12. 21 7月, 2011 1 次提交
    • P
      treewide: fix potentially dangerous trailing ';' in #defined values/expressions · 497888cf
      Phil Carmody 提交于
      All these are instances of
        #define NAME value;
      or
        #define NAME(params_opt) value;
      
      These of course fail to build when used in contexts like
        if(foo $OP NAME)
        while(bar $OP NAME)
      and may silently generate the wrong code in contexts such as
        foo = NAME + 1;    /* foo = value; + 1; */
        bar = NAME - 1;    /* bar = value; - 1; */
        baz = NAME & quux; /* baz = value; & quux; */
      
      Reported on comp.lang.c,
      Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com>
      Initial analysis of the dangers provided by Keith Thompson in that thread.
      
      There are many more instances of more complicated macros having unnecessary
      trailing semicolons, but this pile seems to be all of the cases of simple
      values suffering from the problem. (Thus things that are likely to be found
      in one of the contexts above, more complicated ones aren't.)
      Signed-off-by: NPhil Carmody <ext-phil.2.carmody@nokia.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      497888cf
  13. 19 7月, 2011 1 次提交
  14. 15 7月, 2011 7 次提交
  15. 28 6月, 2011 1 次提交
  16. 25 6月, 2011 1 次提交
  17. 18 6月, 2011 5 次提交
  18. 07 6月, 2011 1 次提交
  19. 23 5月, 2011 2 次提交
    • P
      Add appropriate <linux/prefetch.h> include for prefetch users · 70c71606
      Paul Gortmaker 提交于
      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: NPaul <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: NLinus Torvalds <torvalds@linux-foundation.org>
      70c71606
    • P
      drivers/net: add prefetch header for prefetch users · c0cba59e
      Paul Gortmaker 提交于
      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: NPaul <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0cba59e
  20. 10 5月, 2011 5 次提交
    • F
      r8169: avoid late chip identifier initialisation. · 5d320a20
      Francois Romieu 提交于
      Unknown 8168 chips did not have any PLL power method set as they
      did not inherit a default family soon enough. Fix it.
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
      5d320a20
    • F
      r8169: merge firmware information into the chipset description data. · 85bffe6c
      Francois Romieu 提交于
      - RTL_GIGA_MAC_NONE is a fake index so put it at the end of the
        enumeration and shift everybody.
      - RTL_GIGA_MAC_VER_17 / RTL_GIGA_MAC_VER_16 ordering fixed. Though
        not wrong it was confusing enough to wonder if things were right.
      
      Renaming rtl_chip_info was not strictly necessary. It allows to
      check the patch for the correct use of the indexes though.
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
      85bffe6c
    • F
      r8169: provide some firmware information via ethtool. · 31bd204f
      Francois Romieu 提交于
      There is no real firmware version yet but the manpage of ethtool
      is rather terse about the driver information.
      
      Former output:
      $ ethtool -i eth1
      driver: r8169
      version: 2.3LK-NAPI
      firmware-version:
      bus-info: 0000:01:00.0
      $ ethtool -i eth0
      driver: r8169
      version: 2.3LK-NAPI
      firmware-version:
      bus-info: 0000:03:00.0
      
      Current output:
      $ ethtool -i eth1
      driver: r8169
      version: 2.3LK-NAPI
      firmware-version: N/A
      bus-info: 0000:01:00.0
      
      $ ethtool -i eth0
      driver: r8169
      version: 2.3LK-NAPI
      firmware-version: rtl_nic/rtl8168d-1.fw
      bus-info: 0000:03:00.0
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Fixed-by Ciprian Docan <docan@eden.rutgers.edu>
      Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
      Cc: Fejes József <fejes@joco.name>
      Cc: Borislav Petkov <borislav.petkov@amd.com>
      31bd204f
    • F
      r8169: remove non-NAPI context invocation of rtl8169_rx_interrupt. · 56de414c
      Francois Romieu 提交于
      Invocation of rtl8169_rx_interrupt from rtl8169_reset_task was originally
      intended to retrieve as much packets as possible from the rx ring when a
      reset was needed. Nowadays rtl8169_reset_task is only scheduled, with
      some delay
      a. from the tx timeout watchdog
      b. when resuming
      c. from rtl8169_rx_interrupt itself
      
      It's dubious that the loss of outdated packets will matter much for a)
      and b). c) does not need to call itself again.
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
      56de414c
    • F
      r8169: link speed selection timer rework. · 4876cc1e
      Francois Romieu 提交于
      The implementation was a bit krusty.
      
      The 10s rtl8169_phy_timer timer has been (was ?) required with older
      8169 for adequate phy operation when full gigabit is advertised in
      autonegotiated mode. The timer does nothing if the link is up.
      Otherwise it keeps resetting the phy until things improve.
      
      - the device private data field phy_1000_ctrl_reg was used to
        schedule the timer. Avoid it and save a few bytes.
      
      - rtl8169_set_settings
        pending timer is disabled before changing the link settings as
        rtl8169_phy_timer is not always needed (see the removed test in
        rtl8169_phy_timer).
      
      - rtl8169_set_speed
        the requested link parameters may not match the chipset : bail out
        early on failure.
      
      - rtl8169_open
        Calling rtl8169_request_timer is redundant with
        -> rtl8169_open
           -> rtl8169_init_phy
              -> rtl8169_set_speed
                 -> mod_timer
        The latter always enables the phy timer whereas the former did not
        for RTL_GIGA_MAC_VER_01. It should not make things worse but only
        time will tell if reality agrees.
      
      - rtl8169_request_timer : unused yet. Removed.
      
      - rtl8169_delete_timer : useless. Bloat. Removed.
      
      Side effect : the timer may kick in if the TBI is enabled. I do not
      know if the TBI has ever been used in real life.
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
      4876cc1e