20 Aug, 2019

1 commit


31 Jul, 2019

1 commit


25 Jul, 2019

1 commit

  • Commit e99e88a9d2b06 ("treewide: setup_timer() -> timer_setup()") has
    updated the parameters of 'poll_for_irq()' but not the comment above the
    function.

    Update the comment and fix a typo.
    s/visronic/visornic/

    Signed-off-by: Christophe JAILLET
    Reviewed-By: Enrico Weigelt
    Link: https://lore.kernel.org/r/20190721170824.3412-1-christophe.jaillet@wanadoo.fr
    Signed-off-by: Greg Kroah-Hartman

    Christophe JAILLET
     

23 Jul, 2019

1 commit


15 Jul, 2019

1 commit


12 Jul, 2019

1 commit

  • Pull staging and IIO driver updates from Greg KH:
    "Here is the big Staging and IIO driver update for 5.3-rc1.

    Lots of new IIO drivers are in here, along with loads of tiny staging
    driver cleanups and fixes. Overall we almost break even with the same
    lines added as removed.

    Full details are in the shortlog, they are too large to list here.

    All of these changes have been in linux-next for a while with no
    reported issues"

    * tag 'staging-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (608 commits)
    staging: kpc2000: simplify comparison to NULL in fileops.c
    staging: kpc2000: simplify comparison to NULL in dma.c
    staging: kpc2000: simplify comparison to NULL in kpc2000_spi.c
    staging: rtl8723bs: hal: remove redundant assignment to packetType
    staging: rtl8723bs: Change return type of hal_btcoex_IsBtDisabled()
    staging: rtl8723bs: Remove rtw_btcoex_DisplayBtCoexInfo()
    staging: rtl8723bs: Remove function rtw_btcoex_GetDBG()
    staging: rtl8723bs: Remove function rtw_btcoex_SetDBG()
    staging: rtl8723bs: Remove rtw_btcoex_IsBTCoexCtrlAMPDUSize()
    staging: rtl8723bs: Remove rtw_btcoex_BtInfoNotify()
    staging: rtl8723bs: Remove rtw_btcoex_ScanNotify()
    staging: rtl8723bs: Remove rtw_btcoex_SetSingleAntPath()
    staging: rtl8723bs: Remove rtw_btcoex_SetPGAntNum()
    staging: rtl8192e: remove redundant initialization of rtstatus
    staging: rtl8723bs: Remove rtw_btcoex_GetRaMask()
    staging: rtl8723bs: Remove rtw_btcoex_SetChipType()
    staging: rtl8723bs: Remove rtw_btcoex_ConnectNotify()
    staging: rtl8723bs: Remove rtw_btcoex_SetBTCoexist()
    staging: rtl8723bs: Remove rtw_btcoex_IsBtDisabled()
    staging: rtl8723bs: Remove rtw_btcoex_IsBtControlLps()
    ...

    Linus Torvalds
     

21 Jun, 2019

1 commit

  • Unlike the legacy I/O path, scsi-mq preallocates a large array to hold
    the scatterlist for each request. This static allocation can consume
    substantial amounts of memory on modern controllers which support a
    large number of concurrently outstanding requests.

    To facilitate a switch to a smaller static allocation combined with a
    dynamic allocation for requests that need it, we need to make sure all
    SCSI drivers handle chained scatterlists correctly.

    Convert remaining drivers that directly dereference the scatterlist
    array to using the iterator functions.

    [mkp: clarified commit message]

    Cc: devel@driverdev.osuosl.org
    Cc: Greg Kroah-Hartman
    Acked-by: Greg Kroah-Hartman
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Bart Van Assche
    Signed-off-by: Ming Lei
    Signed-off-by: Martin K. Petersen

    Ming Lei
     

23 May, 2019

1 commit

  • As per below information

    GFP_KERNEL FLAG

    This is a normal allocation and might block. This is the flag to use in
    process context code when it is safe to sleep.

    GFP_ATOMIC FLAG

    The allocation is high-priority and does not sleep. This is the flag to
    use in interrupt handlers, bottom halves and other situations where you
    cannot sleep

    And we can take advantage of GFP_KERNEL , as when system is in low
    memory chances of getting success is high compared to GFP_ATOMIC.

    As visornic_probe is in process context we can use GPF_KERNEL.

    Signed-off-by: Hariprasad Kelam
    Signed-off-by: Greg Kroah-Hartman

    Hariprasad Kelam
     

20 May, 2019

1 commit


03 Apr, 2019

2 commits


20 Mar, 2019

4 commits


19 Feb, 2019

1 commit


04 Feb, 2019

1 commit

  • Currently, the Kbuild core manipulates header search paths in a crazy
    way [1].

    To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
    the search paths in the srctree. Some Makefiles are already written in
    that way, but not all. The goal of this work is to make the notation
    consistent, and finally get rid of the gross hacks.

    Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
    ("kbuild: do not drop -I without parameter").

    [1]: https://patchwork.kernel.org/patch/9632347/

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     

29 Dec, 2018

2 commits

  • Pull staging/IIO driver updates from Greg KH:
    "Here is the big staging and iio driver pull request for 4.21-rc1.

    Lots and lots of tiny patches here, nothing major at all. Which is
    good, tiny cleanups is nice to see. No new huge driver removal or
    addition, this release cycle, although there are lots of good IIO
    driver changes, addtions, and movement from staging into the "real"
    part of the kernel, which is always great.

    Full details are in the shortlog, and all of these have been in
    linux-next for a while with no reported issues"

    * tag 'staging-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (553 commits)
    staging: mt7621-mmc: Correct spelling mistakes in comments
    staging: wilc1000: fix missing read_write setting when reading data
    mt7621-mmc: char * array declaration might be better as static const
    mt7621-mmc: return statement in void function unnecessary
    mt7621-mmc: Alignment should match open parenthesis
    mt7621-mmc: Removed unnecessary blank lines
    mt7621-mmc: Fix some coding style issues
    staging: android: ashmem: doc: Fix spelling
    staging: rtl8188eu: cleanup brace coding style issues
    staging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.c
    staging: rtl8188eu: change return type of is_basicrate() to bool
    staging: rtl8188eu: simplify null array initializations
    staging: rtl8188eu: change order of declarations to improve readability
    staging: rtl8188eu: make some arrays static in rtw_mlme_ext.c
    staging: rtl8188eu: constify some arrays
    staging: rtl8188eu: convert unsigned char arrays to u8
    staging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.c
    staging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUI
    staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme_ext.c
    staging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.c
    ...

    Linus Torvalds
     
  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: smarpqi, lpfc, qedi,
    megaraid_sas, libsas, zfcp, mpt3sas, hisi_sas.

    Additionally, we have a pile of annotation, unused variable and minor
    updates.

    The big API change is the updates for Christoph's DMA rework which
    include removing the DISABLE_CLUSTERING flag.

    And finally there are a couple of target tree updates"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (259 commits)
    scsi: isci: request: mark expected switch fall-through
    scsi: isci: remote_node_context: mark expected switch fall-throughs
    scsi: isci: remote_device: Mark expected switch fall-throughs
    scsi: isci: phy: Mark expected switch fall-through
    scsi: iscsi: Capture iscsi debug messages using tracepoints
    scsi: myrb: Mark expected switch fall-throughs
    scsi: megaraid: fix out-of-bound array accesses
    scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through
    scsi: fcoe: remove set but not used variable 'port'
    scsi: smartpqi: call pqi_free_interrupts() in pqi_shutdown()
    scsi: smartpqi: fix build warnings
    scsi: smartpqi: update driver version
    scsi: smartpqi: add ofa support
    scsi: smartpqi: increase fw status register read timeout
    scsi: smartpqi: bump driver version
    scsi: smartpqi: add smp_utils support
    scsi: smartpqi: correct lun reset issues
    scsi: smartpqi: correct volume status
    scsi: smartpqi: do not offline disks for transient did no connect conditions
    scsi: smartpqi: allow for larger raid maps
    ...

    Linus Torvalds
     

19 Dec, 2018

1 commit

  • Most SCSI drivers want to enable "clustering", that is merging of
    segments so that they might span more than a single page. Remove the
    ENABLE_CLUSTERING define, and require drivers to explicitly set
    DISABLE_CLUSTERING to disable this feature.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Christoph Hellwig
     

17 Dec, 2018

1 commit


07 Dec, 2018

1 commit

  • In order to pass extack together with NETDEV_PRE_UP notifications, it's
    necessary to route the extack to __dev_open() from diverse (possibly
    indirect) callers. One prominent API through which the notification is
    invoked is dev_open().

    Therefore extend dev_open() with and extra extack argument and update
    all users. Most of the calls end up just encoding NULL, but bond and
    team drivers have the extack readily available.

    Signed-off-by: Petr Machata
    Acked-by: Jiri Pirko
    Reviewed-by: Ido Schimmel
    Reviewed-by: David Ahern
    Signed-off-by: David S. Miller

    Petr Machata
     

13 Jun, 2018

1 commit

  • The kzalloc() function has a 2-factor argument form, kcalloc(). This
    patch replaces cases of:

    kzalloc(a * b, gfp)

    with:
    kcalloc(a * b, gfp)

    as well as handling cases of:

    kzalloc(a * b * c, gfp)

    with:

    kzalloc(array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    kzalloc_array(array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    kzalloc(4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    type TYPE;
    expression THING, E;
    @@

    (
    kzalloc(
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    kzalloc(
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    kzalloc(
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    identifier SIZE, COUNT;
    @@

    - kzalloc
    + kcalloc
    (
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    kzalloc(
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    kzalloc(
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    kzalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    kzalloc(sizeof(THING) * C2, ...)
    |
    kzalloc(sizeof(TYPE) * C2, ...)
    |
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(C1 * C2, ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

01 Jun, 2018

1 commit

  • When calling debugfs functions, there is no need to ever check the
    return value. The function can work or not, but the code logic should
    never do something different based on this.

    Clean up the visornic driver code by not caring about the value of
    debugfs calls. This ends up removing a number of lines of code that are
    not needed.

    Cc: David Kershner
    Cc: Tim Sell
    Cc: David Binder
    Cc: Sameer Wadgaonkar
    Cc: Charles Daniels
    Cc: sparmaintainer@unisys.com
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 Apr, 2018

1 commit


16 Feb, 2018

6 commits


08 Dec, 2017

1 commit

  • Move the visorbus driver out of staging (drivers/staging/unisys/visorbus)
    and to drivers/visorbus. Modify the configuration and makefiles so they
    now reference the new location. The s-Par header file visorbus.h that is
    referenced by all s-Par drivers, is being moved into include/linux.

    Signed-off-by: David Kershner
    Reviewed-by: Tim Sell
    Signed-off-by: Greg Kroah-Hartman

    David Kershner
     

07 Dec, 2017

4 commits


28 Nov, 2017

4 commits

  • Add necessary casting to several places where we were doing 32-bit
    arithmetic (unsigned) to produce a 64-bit (unsigned long) result, to
    prevent the theoretical possibility of a 32-bit overflow during the
    arithmetic.

    FYI, these are unsigned long:

    ctx->param_bytes
    ctx->allocbytes

    These are unsigned int:

    bytes
    phdr->name_offset
    phdr->name_length

    Here is the test program demonstrating why we really need the casts:

    void main()
    {
    unsigned int i;
    unsigned long il;

    printf("sizeof(int) =%dn",sizeof(i));
    printf("sizeof(long)=%dn",sizeof(il));

    i = (unsigned int)((((unsigned long)(1)) << 32) - 1);
    printf("i = %un", i);
    il = i+1;
    printf("adding 1 withOUT cast = %lun", il);
    il = (unsigned long)i+1;
    printf("adding 1 WITH cast = %lun", il);
    }
    [selltc@mac tmp]$ gcc x.c -o x.out
    [selltc@mac tmp]$ ./x.out
    sizeof(int) =4
    sizeof(long)=8
    i = 4294967295
    adding 1 withOUT cast = 0
    adding 1 WITH cast = 4294967296

    Signed-off-by: Tim Sell
    Reported-by: Dan Carpenter
    Signed-off-by: David Kershner
    Reviewed-by: David Binder
    Signed-off-by: Greg Kroah-Hartman

    Tim Sell
     
  • Now that the SPDX tag is in all unisys driver files, that identifies the
    license in a specific and legally-defined manner. So the extra GPL text
    wording can be removed as it is no longer needed at all.

    This is done on a quest to remove the 700+ different ways that files in
    the kernel describe the GPL license text. And there's unneeded stuff
    like the address (sometimes incorrect) for the FSF which is never
    needed.

    No copyright headers or other non-license-description text was removed.

    Cc: David Kershner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • One .h file was missing a SPDX tag, and another one was wrong after
    looking at the text of the license itself, so fix both of these issues
    up at the same time.

    Cc: David Kershner
    Cc: Thomas Gleixner
    Cc: Kate Stewart
    Cc: Philippe Ombredanne
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • It's good to have SPDX identifiers in all files to make it easier to
    audit the kernel tree for correct licenses.

    Update the drivers/staging/unisys files files with the correct SPDX
    license identifier based on the license text in the file itself. The
    SPDX identifier is a legally binding shorthand, which can be used
    instead of the full boiler plate text.

    This work is based on a script and data from Thomas Gleixner, Philippe
    Ombredanne, and Kate Stewart.

    Cc: David Kershner
    Cc: Thomas Gleixner
    Cc: Kate Stewart
    Cc: Philippe Ombredanne
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman