11 Jun, 2015

1 commit

  • Use the timer API function setup_timer instead of structure field
    assignments to initialize a timer.

    A simplified version of the Coccinelle semantic patch that performs
    this transformation is as follows:

    @change@
    expression e1, e2, a;
    @@

    -init_timer(&e1);
    +setup_timer(&e1, a, 0UL);
    ... when != a = e2
    -e1.function = a;

    Signed-off-by: Vaishali Thakkar
    Signed-off-by: David S. Miller

    Vaishali Thakkar
     

09 Jun, 2015

1 commit

  • API compliance scanning with coccinelle flagged:
    ./drivers/atm/iphase.c:2621:4-20:
    WARNING: timeout (50) seems HZ dependent

    Numeric constants passed to schedule_timeout() make the effective
    timeout HZ dependent which does not seem intended.
    Fixed up by converting the constant to jiffies with msecs_to_jiffies()
    As this driver was introduced in the early 2.3 series it is most
    likely assuming HZ=100 so the constant 50 is converted to 500ms.

    Signed-off-by: Nicholas Mc Guire
    Signed-off-by: David S. Miller

    Nicholas Mc Guire
     

05 Jun, 2015

1 commit


26 May, 2015

1 commit


11 Mar, 2015

1 commit


18 Jan, 2015

1 commit


14 Jan, 2015

2 commits


15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

30 Nov, 2014

1 commit


24 Nov, 2014

1 commit

  • Return a negative error code on failure.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    identifier ret; expression e1,e2;
    @@
    (
    if (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

22 Nov, 2014

1 commit

  • Added a pci_dma_mapping_error() call to check for mapping errors before
    further using the dma handle. In case of error, control goes to a new label
    where the incoming skb is freed. Unchecked dma handles were found using
    Coccinelle:

    @rule1@
    expression e1;
    identifier x;
    @@

    *x = pci_map_single(...);
    ... when != pci_dma_mapping_error(e1,x)

    Signed-off-by: Tina Johnson
    Acked-by: Julia Lawall
    Signed-off-by: David S. Miller

    Tina Johnson
     

20 Oct, 2014

1 commit


17 Oct, 2014

1 commit


14 Aug, 2014

1 commit

  • Pull networking fixes from David Miller:
    "Several networking final fixes and tidies for the merge window:

    1) Changes during the merge window unintentionally took away the
    ability to build bluetooth modular, fix from Geert Uytterhoeven.

    2) Several phy_node reference count bug fixes from Uwe Kleine-König.

    3) Fix ucc_geth build failures, also from Uwe Kleine-König.

    4) Fix klog false positivies when netlink messages go to network
    taps, by properly resetting the network header. Fix from Daniel
    Borkmann.

    5) Sizing estimate of VF netlink messages is too small, from Jiri
    Benc.

    6) New APM X-Gene SoC ethernet driver, from Iyappan Subramanian.

    7) VLAN untagging is erroneously dependent upon whether the VLAN
    module is loaded or not, but there are generic dependencies that
    matter wrt what can be expected as the SKB enters the stack.
    Make the basic untagging generic code, and do it unconditionally.
    From Vlad Yasevich.

    8) xen-netfront only has so many slots in it's transmit queue so
    linearize packets that have too many frags. From Zoltan Kiss.

    9) Fix suspend/resume PHY handling in bcmgenet driver, from Florian
    Fainelli"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (55 commits)
    net: bcmgenet: correctly resume adapter from Wake-on-LAN
    net: bcmgenet: update UMAC_CMD only when link is detected
    net: bcmgenet: correctly suspend and resume PHY device
    net: bcmgenet: request and enable main clock earlier
    net: ethernet: myricom: myri10ge: myri10ge.c: Cleaning up missing null-terminate after strncpy call
    xen-netfront: Fix handling packets on compound pages with skb_linearize
    net: fec: Support phys probed from devicetree and fixed-link
    smsc: replace WARN_ON() with WARN_ON_SMP()
    xen-netback: Don't deschedule NAPI when carrier off
    net: ethernet: qlogic: qlcnic: Remove duplicate object file from Makefile
    wan: wanxl: Remove typedefs from struct names
    m68k/atari: EtherNEC - ethernet support (ne)
    net: ethernet: ti: cpmac.c: Cleaning up missing null-terminate after strncpy call
    hdlc: Remove typedefs from struct names
    airo_cs: Remove typedef local_info_t
    atmel: Remove typedef atmel_priv_ioctl
    com20020_cs: Remove typedef com20020_dev_t
    ethernet: amd: Remove typedef local_info_t
    net: Always untag vlan-tagged traffic on input.
    drivers: net: Add APM X-Gene SoC ethernet driver support.
    ...

    Linus Torvalds
     

09 Aug, 2014

1 commit


08 Aug, 2014

2 commits

  • Convert a zero return value on error to a negative one, as returned
    elsewhere in the function.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    identifier ret; expression e1,e2;
    @@
    (
    if (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Julia Lawall
    Acked-by: Chas Williams
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • Convert a zero return value on error to a negative one, as returned
    elsewhere in the function.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    identifier ret; expression e1,e2;
    @@
    (
    if (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Julia Lawall
    Acked-by: Chas Williams
    Signed-off-by: David S. Miller

    Julia Lawall
     

06 Aug, 2014

1 commit


03 Jun, 2014

1 commit


22 May, 2014

1 commit

  • Remove double checks, convert printk to pr_warn, and move the call to
    pr_warn to the first check. The simplified version of the coccinelle
    semantic patch that find this issue is as follows:

    //
    @@
    expression E; identifier pr; expression list es;
    @@
    while(...){
    ...
    - if (E) break;
    + if (E){
    + pr(es);
    + break;
    + }
    ...
    }
    - if(E) pr(es);
    //

    Tested by compilation only.

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    Peter Senna Tschudin
     

26 Mar, 2014

2 commits


28 Feb, 2014

1 commit

  • We are trying to finally kill off interruptible_sleep_on_timeout.
    the two uses in the nicstar driver can be trivially replaced
    with wait_event_interruptible_lock_irq_timeout, which prevents the
    wake-up race and is able to check the buffer state with scq->lock
    held.

    Signed-off-by: Arnd Bergmann
    Acked-by: Chas Williams
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

27 Feb, 2014

1 commit

  • interruptible_sleep_on is racy and going away. This replaces the one use
    in the firestream driver with the appropriate wait_event_interruptible
    variant.

    Signed-off-by: Arnd Bergmann
    Acked-by: Chas Williams
    Cc: linux-atm-general@lists.sourceforge.net
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

20 Feb, 2014

3 commits


27 Dec, 2013

1 commit

  • Use possibly more efficient ether_addr_equal
    instead of memcmp.

    Cc: Chas Williams
    Cc: linux-atm-general@lists.sourceforge.net
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Yang Yingliang
    Signed-off-by: Ding Tianhong
    Signed-off-by: David S. Miller

    dingtianhong
     

11 Dec, 2013

2 commits


20 Nov, 2013

1 commit


22 Oct, 2013

1 commit


16 Sep, 2013

1 commit


14 Sep, 2013

1 commit


05 Sep, 2013

2 commits


18 Jun, 2013

1 commit

  • The change set of 27a884dc, "[SK_BUFF]: Convert skb->tail to sk_buff_data_t"
    converted skb->tail from pointer into sk_buff_data_t. It missed skb->tail
    in drivers/atm/ambassador.c.
    This patch converts skb->tail into skb_tail_pointer(skb).

    Found by inspection. Compile tested only.

    Cc: Simon Horman
    Cc: Chas Williams
    Signed-off-by: Isaku Yamahata
    Reviewed-by: Simon Horman
    Signed-off-by: David S. Miller

    Isaku Yamahata
     

30 Apr, 2013

1 commit


28 Feb, 2013

1 commit

  • I'm not sure why, but the hlist for each entry iterators were conceived

    list_for_each_entry(pos, head, member)

    The hlist ones were greedy and wanted an extra parameter:

    hlist_for_each_entry(tpos, pos, head, member)

    Why did they need an extra pos parameter? I'm not quite sure. Not only
    they don't really need it, it also prevents the iterator from looking
    exactly like the list iterator, which is unfortunate.

    Besides the semantic patch, there was some manual work required:

    - Fix up the actual hlist iterators in linux/list.h
    - Fix up the declaration of other iterators based on the hlist ones.
    - A very small amount of places were using the 'node' parameter, this
    was modified to use 'obj->member' instead.
    - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
    properly, so those had to be fixed up manually.

    The semantic patch which is mostly the work of Peter Senna Tschudin is here:

    @@
    iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

    type T;
    expression a,c,d,e;
    identifier b;
    statement S;
    @@

    -T b;

    [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
    [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
    [akpm@linux-foundation.org: checkpatch fixes]
    [akpm@linux-foundation.org: fix warnings]
    [akpm@linux-foudnation.org: redo intrusive kvm changes]
    Tested-by: Peter Senna Tschudin
    Acked-by: Paul E. McKenney
    Signed-off-by: Sasha Levin
    Cc: Wu Fengguang
    Cc: Marcelo Tosatti
    Cc: Gleb Natapov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin