1. 07 6月, 2012 1 次提交
    • J
      ethernet: Remove casts to same type · 64699336
      Joe Perches 提交于
      Adding casts of objects to the same type is unnecessary
      and confusing for a human reader.
      
      For example, this cast:
      
              int y;
              int *p = (int *)&y;
      
      I used the coccinelle script below to find and remove these
      unnecessary casts.  I manually removed the conversions this
      script produces of casts with __force, __iomem and __user.
      
      @@
      type T;
      T *p;
      @@
      
      -       (T *)p
      +       p
      
      A function in atl1e_main.c was passed a const pointer
      when it actually modified elements of the structure.
      
      Change the argument to a non-const pointer.
      
      A function in stmmac needed a __force to avoid a sparse
      warning.  Added it.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64699336
  2. 19 5月, 2012 3 次提交
  3. 01 5月, 2012 1 次提交
    • R
      cxgb3: Don't call cxgb_vlan_mode until q locks are initialized · 60158e64
      Roland Dreier 提交于
      The driver calls cxgb_vlan_mode() from init_one().  This calls into
      synchronize_rx(), which locks all the q locks, but the q locks are not
      initialized until cxgb_up() -> setup_sge_qsets().  So move the call to
      cxgb_vlan_mode() into cxgb_up(), after the call to setup_sge_qsets().
      We also move the body of these functions up higher to avoid having to
      a forward declaration.
      
      This was found because of the lockdep warning:
      
          INFO: trying to register non-static key.
          the code is fine but needs lockdep annotation.
          turning off the locking correctness validator.
          Pid: 323, comm: work_for_cpu Not tainted 3.4.0-rc5 #28
          Call Trace:
           [<ffffffff8106e767>] register_lock_class+0x108/0x2d0
           [<ffffffff8106ff42>] __lock_acquire+0xd3/0xd06
           [<ffffffff81070fd0>] lock_acquire+0xbf/0xfe
           [<ffffffff813862a6>] _raw_spin_lock_irq+0x36/0x45
           [<ffffffffa01e71aa>] cxgb_vlan_mode+0x96/0xcb [cxgb3]
           [<ffffffffa01f90eb>] init_one+0x8c4/0x980 [cxgb3]
           [<ffffffff811fcbf0>] local_pci_probe+0x3f/0x70
           [<ffffffff81042206>] do_work_for_cpu+0x10/0x22
           [<ffffffff810482de>] kthread+0xa1/0xa9
           [<ffffffff8138e234>] kernel_thread_helper+0x4/0x10
      
      Contrary to what lockdep says, the code is not fine: we are locking an
      uninitialized spinlock.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      60158e64
  4. 06 4月, 2012 1 次提交
    • S
      simple_open: automatically convert to simple_open() · 234e3405
      Stephen Boyd 提交于
      Many users of debugfs copy the implementation of default_open() when
      they want to support a custom read/write function op.  This leads to a
      proliferation of the default_open() implementation across the entire
      tree.
      
      Now that the common implementation has been consolidated into libfs we
      can replace all the users of this function with simple_open().
      
      This replacement was done with the following semantic patch:
      
      <smpl>
      @ open @
      identifier open_f != simple_open;
      identifier i, f;
      @@
      -int open_f(struct inode *i, struct file *f)
      -{
      (
      -if (i->i_private)
      -f->private_data = i->i_private;
      |
      -f->private_data = i->i_private;
      )
      -return 0;
      -}
      
      @ has_open depends on open @
      identifier fops;
      identifier open.open_f;
      @@
      struct file_operations fops = {
      ...
      -.open = open_f,
      +.open = simple_open,
      ...
      };
      </smpl>
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      234e3405
  5. 07 3月, 2012 2 次提交
  6. 24 2月, 2012 1 次提交
  7. 16 2月, 2012 1 次提交
  8. 01 2月, 2012 1 次提交
  9. 06 1月, 2012 1 次提交
  10. 04 1月, 2012 1 次提交
  11. 20 12月, 2011 1 次提交
  12. 17 12月, 2011 2 次提交
  13. 06 12月, 2011 4 次提交
  14. 24 11月, 2011 1 次提交
  15. 23 11月, 2011 2 次提交
  16. 17 11月, 2011 1 次提交
  17. 14 11月, 2011 1 次提交
  18. 01 11月, 2011 2 次提交
  19. 21 10月, 2011 2 次提交
  20. 19 10月, 2011 1 次提交
  21. 08 10月, 2011 1 次提交
  22. 07 10月, 2011 1 次提交
  23. 06 10月, 2011 2 次提交
  24. 17 9月, 2011 1 次提交
  25. 27 8月, 2011 1 次提交
    • J
      drivers/net/ethernet/*: Enabled vendor Kconfig options · 88f07484
      Jeff Kirsher 提交于
      Based on finds for Stephen Rothwell, where current defconfig's
      enable a ethernet driver and it is not compiled due to the newly
      added NET_VENDOR_* component of Kconfig.
      
      This patch enables all the "new" Kconfig options so that current
      defconfig's will continue to compile the expected drivers.  In
      addition, by enabling all the new Kconfig options does not add
      any un-expected options.
      
      CC: Stephen Rothwll <sfc@canb.auug.org.au>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      88f07484
  26. 18 8月, 2011 2 次提交
  27. 11 8月, 2011 1 次提交