02 Oct, 2016

1 commit

  • Check for attribute_group structures that are only passed as a second
    argument to the functions sysfs_remove_group and sysfs_create_group. As
    these arguments are constant so, attribute_group structures having this
    property can also be made constant.
    Done using coccinelle:

    @r1 disable optional_qualifier @
    identifier i;
    position p;
    @@
    static struct attribute_group i@p = {...};

    @ok1@
    identifier r1.i;
    position p;
    expression e1;
    @@
    (
    sysfs_remove_group(e1,&i@p)
    |
    sysfs_create_group(e1,&i@p)
    )

    @bad@
    position p!={r1.p,ok1.p};
    identifier r1.i;
    @@
    i@p

    @depends on !bad disable optional_qualifier@
    identifier r1.i;
    @@
    static
    +const
    struct attribute_group i={...};

    @depends on !bad disable optional_qualifier@
    identifier r1.i;
    @@
    +const
    struct attribute_group i;

    File size before:
    text data bss dec hex filename
    7551 1440 16 9007 232f
    drivers/staging/speakup/kobjects.o

    File size after:
    text data bss dec hex filename
    7671 1312 16 8999 2327
    drivers/staging/speakup/kobjects.o

    Signed-off-by: Bhumika Goyal
    Acked-by: Samuel Thibault
    Signed-off-by: Greg Kroah-Hartman

    Bhumika Goyal
     

22 Sep, 2016

3 commits


12 Sep, 2016

1 commit

  • All operations with synth buffer should be protected,
    as there are global pointers, which should be modified atomically.

    Found by Linux Driver Verification project (linuxtesting.org)

    Signed-off-by: Pavel Andrianov
    Acked-by: Vaishali Thakkar
    Reviewed-by: Samuel Thibault
    Signed-off-by: Greg Kroah-Hartman

    Pavel Andrianov
     

16 Aug, 2016

2 commits

  • synth_add allows one to add MAXSYNTHS synths to the synths array;
    however it always NULLifies the next synth in the array which
    means that on the MAXSYNTHS synth we get an out-of-bounds write of
    the NULL to the synths array. Make the synths array MAXSYNTHS + 1
    elements in size to allow for the final NULL sentinal to avoid the
    out-of-bounds write.

    Issue found wit CoverityScan, CID#744671

    Signed-off-by: Colin Ian King
    Reviewed-by: Samuel Thibault
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     
  • Fix the checkpatch.pl warning "No space is necessary after a cast".

    Signed-off-by: Laurence Rochfort
    Signed-off-by: Greg Kroah-Hartman

    Laurence Rochfort
     

21 May, 2016

1 commit

  • Pull staging and IIO driver updates from Greg KH:
    "Here's the big staging and iio driver update for 4.7-rc1.

    I think we almost broke even with this release, only adding a few more
    lines than we removed, which isn't bad overall given that there's a
    bunch of new iio drivers added.

    The Lustre developers seem to have woken up from their sleep and have
    been doing a great job in cleaning up the code and pruning unused or
    old cruft, the filesystem is almost readable :)

    Other than that, just a lot of basic coding style cleanups in the
    churn. All have been in linux-next for a while with no reported
    issues"

    * tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits)
    Staging: emxx_udc: emxx_udc: fixed coding style issue
    staging/gdm724x: fix "alignment should match open parenthesis" issues
    staging/gdm724x: Fix avoid CamelCase
    staging: unisys: rename misleading var ii with frag
    staging: unisys: visorhba: switch success handling to error handling
    staging: unisys: visorhba: main path needs to flow down the left margin
    staging: unisys: visorinput: handle_locking_key() simplifications
    staging: unisys: visorhba: fail gracefully for thread creation failures
    staging: unisys: visornic: comment restructuring and removing bad diction
    staging: unisys: fix format string %Lx to %llx for u64
    staging: unisys: remove unused struct members
    staging: unisys: visorchannel: correct variable misspelling
    staging: unisys: visorhba: replace functionlike macro with function
    staging: dgnc: Need to check for NULL of ch
    staging: dgnc: remove redundant condition check
    staging: dgnc: fix 'line over 80 characters'
    staging: dgnc: clean up the dgnc_get_modem_info()
    staging: lustre: lnet: enable configuration per NI interface
    staging: lustre: o2iblnd: properly set ibr_why
    staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini
    ...

    Linus Torvalds
     

01 May, 2016

1 commit


28 Mar, 2016

2 commits

  • Compiling speakup driver with sparse produces following warning:

    drivers/staging/speakup/serialio.c:22:9: warning: incorrect type in
    initializer (different base types)
    drivers/staging/speakup/serialio.c:22:9: expected unsigned int
    [unsigned] flags
    drivers/staging/speakup/serialio.c:22:9: got restricted upf_t

    This patch fixes it.

    Signed-off-by: Okash Khawaja
    Acked-by: Samuel Thibault
    Signed-off-by: Greg Kroah-Hartman

    Okash Khawaja
     
  • Previously, speakup would see the hi-font bit in attributes.
    Since this bit has nothing to do with attributes, we need to clear it.

    Signed-off-by: Samuel Thibault
    Signed-off-by: Greg Kroah-Hartman

    Samuel Thibault
     

12 Mar, 2016

1 commit

  • Use del_timer_sync to ensure timer is stopped on all CPUs before
    the driver exists and the timer should not run when the module is
    being removed. Since the timer is not called from an interrupt
    context, this change is safe and will not cause deadlock.

    The Coccinelle semantic patch used to make this change is as
    follows:
    //
    @r@
    declarer name module_exit;
    identifier ex;
    @@

    module_exit(ex);

    @@
    identifier r.ex;
    @@

    ex(...) {

    }
    //

    Signed-off-by: Amitoj Kaur Chawla
    Signed-off-by: Greg Kroah-Hartman

    Amitoj Kaur Chawla
     

06 Mar, 2016

3 commits


15 Feb, 2016

1 commit


12 Feb, 2016

2 commits


08 Feb, 2016

2 commits


02 Feb, 2016

2 commits


01 Feb, 2016

1 commit

  • Pull tty/serial fixes from Greg KH:
    "Here are some small tty/serial driver fixes for 4.5-rc2.

    They resolve a number of reported problems (the ioctl one specifically
    has been pointed out by numerous people) and one patch adds some new
    device ids for the 8250_pci driver. All have been in linux-next
    successfully"

    * tag 'tty-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    serial: 8250_pci: Add Intel Broadwell ports
    staging/speakup: Use tty_ldisc_ref() for paste kworker
    n_tty: Fix unsafe reference to "other" ldisc
    tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
    tty: Retry failed reopen if tty teardown in-progress
    tty: Wait interruptibly for tty lock on reopen

    Linus Torvalds
     

29 Jan, 2016

8 commits


27 Jan, 2016

1 commit

  • As the function documentation for tty_ldisc_ref_wait() notes, it is
    only callable from a tty file_operations routine; otherwise there
    is no guarantee the ref won't be NULL.

    The key difference with the VT's paste_selection() is that is an ioctl,
    where __speakup_paste_selection() is completely async kworker, kicked
    off from interrupt context.

    Fixes: 28a821c30688 ("Staging: speakup: Update __speakup_paste_selection()
    tty (ab)usage to match vt")
    Cc:
    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     

05 Nov, 2015

1 commit

  • Pull staging driver updates from Greg KH:
    "Here's the big staging driver update for 4.4-rc1. If you were
    disappointed for 4.3-rc1 that we didn't contribute enough changesets,
    you should be happy with this pull request of over 2400 patches.

    But overall we removed more lines of code than we added, which is nice
    to see. Full details in the shortlog.

    All of these have been in linux-next for a while"

    Greg, I've never been disappointed in how few commits Staging
    contributes to the kernel.. Never.

    * tag 'staging-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (2431 commits)
    Staging: rtl8192u: ieee80211: added missing blank lines
    Staging: rtl8192u: ieee80211: removed unnecessary braces
    Staging: rtl8192u: ieee80211: corrected block comments
    Staging: rtl8192u: ieee80211: corrected indent
    Staging: rtl8192u: ieee80211: added missing spaces after if
    Staging: rtl8192u: ieee80211: added missing space around '='
    Staging: rtl8192u: ieee80211: fixed position of else statements
    Staging: rtl8192u: ieee80211: fixed open brace positions
    staging: rdma: ipath: Remove unneeded vairable.
    staging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset function
    staging: rtl8188eu: new variable for hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] in store_pwrindex_offset function
    staging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.c
    staging: rtl8188eu: checkpatch fixes: line over 80 characters splited into two parts
    staging: rtl8188eu: checkpatch fixes: alignment should match open parenthesis
    staging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in hal/bb_cfg.c
    staging: rtl8188eu: checkpatch fixes: spaces preferred around that '|' in hal/bb_cfg.c
    staging: rtl8188eu: operator = replaced by += in loop increment
    staging: rtl8188eu: occurrence of the 5 GHz code marked
    staging: rtl8188eu: increment placed into for loop header
    staging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ie
    ...

    Linus Torvalds
     

25 Oct, 2015

1 commit


20 Oct, 2015

1 commit


17 Oct, 2015

3 commits


13 Oct, 2015

1 commit


08 Oct, 2015

1 commit

  • ARRAY_SIZE is more concise to use when the size of an array is divided
    by the size of its type or the size of its first element.

    Changes made using Coccinelle-

    @@
    type T;
    T[] E;
    @@

    - (sizeof(E)/sizeof(T))
    + ARRAY_SIZE(E)

    Signed-off-by: Shraddha Barke
    Signed-off-by: Greg Kroah-Hartman

    Shraddha Barke