1. 05 Oct, 2010 1 commit
  2. 14 May, 2010 1 commit
    • Joe Perches's avatar
      drivers/net: Remove unnecessary returns from void function()s · a4b77097
      Joe Perches authored
      This patch removes from drivers/net/ all the unnecessary
      return; statements that precede the last closing brace of
      void functions.
      It does not remove the returns that are immediately
      preceded by a label as gcc doesn't like that.
      It also does not remove null void functions with return.
      Done via:
      $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
        xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'
      with some cleanups by hand.
      Compile tested x86 allmodconfig only.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  3. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  4. 19 Oct, 2009 5 commits
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: reduce verbosity of debug messages in boot mode · e1633fd6
      Inaky Perez-Gonzalez authored
      Missed a debug message that was being constantly printed as a
      dev_err(); became annoying. Demote it to a debug message.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: add reason argument to i2400m_dev_reset_handle() · 3ef6129e
      Inaky Perez-Gonzalez authored
      In preparation for reset_resume support, in which the same code path
      is going to be used, add a diagnostic message to dev_reset_handle()
      that can be used to distinguish how the device got there.
      This uses the new payload argument added to i2400m_schedule_work() by
      the previous commit.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
    • Inaky Perez-Gonzalez's avatar
      wimax/i2400m: rework bootrom initialization to be more flexible · aba3792a
      Inaky Perez-Gonzalez authored
      This modifies the bootrom initialization code of the i2400m driver so
      it can more easily support upcoming hardware.
      Currently, the code detects two types of barkers (magic numbers) sent
      by the device to indicate the types of firmware it would take (signed
      vs non-signed).
      This schema is extended so that multiple reboot barkers are
      recognized; upcoming hw will expose more types barkers which will have
      to match a header in the firmware image before we can load it.
      For that, a barker database is introduced; the first time the device
      sends a barker, it is matched in the database. That gives the driver
      the information needed to decide how to upload the firmware and which
      types of firmware to use. The database can be populated from module
      The execution flow is not altered; a new function
      (i2400m_is_boot_barker) is introduced to determine in the RX path if
      the device has sent a boot barker. This function is becoming heavier,
      so it is put away from the hot reception path [this is why there is
      some reorganization in sdio-rx.c:i2400ms_rx and
      The documentation on the process has also been updated.
      All these modifications are heavily based on previous work by Dirk
      Brandewie <dirk.brandewie@intel.com>.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
    • Cindy H Kao's avatar
      wimax/i2400m/sdio: clear the INTR status bit after reading size · 339ccc36
      Cindy H Kao authored
      In order to avoid issues during high-load traffic, the interrupt
      status register has to be cleared ONLY after the RX size is read.
      Signed-off-by: default avatarCindy H Kao <cindy.h.kao@intel.com>
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
    • Cindy H Kao's avatar
      wimax/i2400m: fix the bootmode RX deadlock in SDIO driver · 5b45bfe5
      Cindy H Kao authored
      i2400ms_bus_bm_wait_for_ack() causes a race condition. It happens
      because this function clears i2400ms->bm_ack_size before waiting for
      an interrupt, which is set by the interrupt service routine i2400ms_rx()
      to indicate reception and size of received data; thus, if the interrupt
      came right before the clearing/waiting, it is lost.
      The fix is clear the bm_ack_size to -EINPROGRESS before we are enabling
      the RX interrupt configuration in i2400ms_rx_setup(). Then everytime
      when the interrupt service routine i2400ms_rx() is invoked during bootmode,
      bm_ack_size is updated with the actual rx_size and it is cleared to
      -EINPROGRESS again after the RX data is handled.
      Signed-off-by: default avatarCindy H Kao <cindy.h.kao@intel.com>
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
  5. 11 Jun, 2009 1 commit
  6. 07 Jan, 2009 1 commit
    • Inaky Perez-Gonzalez's avatar
      i2400m/SDIO: TX and RX path backends · 514ec71f
      Inaky Perez-Gonzalez authored
      Implements the backend so that the generic driver can TX/RX to/from
      the SDIO device.
      For RX, when data is ready the SDIO IRQ is fired and that will
      allocate an skb, put all the data there and then pass it to the
      generic driver RX code for processing and delivery.
      TX, when kicked by the generic driver, will schedule work on a
      driver-specific workqueue that pulls data from the TX FIFO and sends
      it to the device until it drains it.
      Thread contexts are needed as SDIO functions are blocking.
      Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>