14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

20 Feb, 2020

1 commit

  • The PN544 driver checks the "enable" polarity during of driver's probe and
    it's doing that by turning ON and OFF NFC with different polarities until
    enabling succeeds. It takes some time for the hardware to power-down, and
    thus, to deassert the IRQ that is raised by turning ON the hardware.
    Since the delay after last power-down of the polarity-checking process is
    missed in the code, the interrupt may trigger immediately after installing
    the IRQ handler (right after the checking is done), which results in IRQ
    handler trying to touch the disabled HW and ends with marking NFC as
    'DEAD' during of the driver's probe:

    pn544_hci_i2c 1-002a: NFC: nfc_en polarity : active high
    pn544_hci_i2c 1-002a: NFC: invalid len byte
    shdlc: llc_shdlc_recv_frame: NULL Frame -> link is dead

    This patch fixes the occasional NFC initialization failure on Nexus 7
    device.

    Signed-off-by: Dmitry Osipenko
    Signed-off-by: David S. Miller

    Dmitry Osipenko
     

17 Feb, 2020

1 commit


20 Dec, 2019

1 commit

  • Clang warns

    ../drivers/nfc/pn544/pn544.c:696:4: warning: misleading indentation;
    statement is not part of the previous 'if' [-Wmisleading-indentation]
    return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE,
    ^
    ../drivers/nfc/pn544/pn544.c:692:3: note: previous statement is here
    if (target->nfcid1_len != 4 && target->nfcid1_len != 7 &&
    ^
    1 warning generated.

    This warning occurs because there is a space after the tab on this line.
    Remove it so that the indentation is consistent with the Linux kernel
    coding style and clang no longer warns.

    Fixes: da052850b911 ("NFC: Add pn544 presence check for different targets")
    Link: https://github.com/ClangBuiltLinux/linux/issues/814
    Signed-off-by: Nathan Chancellor
    Signed-off-by: David S. Miller

    Nathan Chancellor
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms and conditions of the gnu general public license
    version 2 as published by the free software foundation this program
    is distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not see http www gnu org
    licenses

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 33 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190531081038.745679586@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

2 commits

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not see http www gnu org licenses

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details [based]
    [from] [clk] [highbank] [c] you should have received a copy of the
    gnu general public license along with this program if not see http
    www gnu org licenses

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 355 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Kate Stewart
    Reviewed-by: Jilayne Lovejoy
    Reviewed-by: Steve Winslow
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190519154041.837383322@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Add SPDX license identifiers to all Make/Kconfig files which:

    - Have no license information of any form

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

28 Mar, 2019

1 commit


06 Nov, 2017

1 commit

  • i2c_device_id are not supposed to change at runtime. All functions
    working with i2c_device_id provided by work with
    const i2c_device_id. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Samuel Ortiz

    Arvind Yadav
     

23 Jun, 2017

1 commit


16 Jun, 2017

3 commits

  • Joe and Bjørn suggested that it'd be nicer to not have the
    cast in the fairly common case of doing
    *(u8 *)skb_put(skb, 1) = c;

    Add skb_put_u8() for this case, and use it across the code,
    using the following spatch:

    @@
    expression SKB, C, S;
    typedef u8;
    identifier fn = {skb_put};
    fresh identifier fn2 = fn ## "_u8";
    @@
    - *(u8 *)fn(SKB, S) = C;
    + fn2(SKB, C);

    Note that due to the "S", the spatch isn't perfect, it should
    have checked that S is 1, but there's also places that use a
    sizeof expression like sizeof(var) or sizeof(u8) etc. Turns
    out that nobody ever did something like
    *(u8 *)skb_put(skb, 2) = c;

    which would be wrong anyway since the second byte wouldn't be
    initialized.

    Suggested-by: Joe Perches
    Suggested-by: Bjørn Mork
    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • It seems like a historic accident that these return unsigned char *,
    and in many places that means casts are required, more often than not.

    Make these functions return void * and remove all the casts across
    the tree, adding a (u8 *) cast only where the unsigned char pointer
    was used directly, all done with the following spatch:

    @@
    expression SKB, LEN;
    typedef u8;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

    @@
    expression SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - fn(SKB, LEN)[0]
    + *(u8 *)fn(SKB, LEN)

    Note that the last part there converts from push(...)[0] to the
    more idiomatic *(u8 *)push(...).

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • It seems like a historic accident that these return unsigned char *,
    and in many places that means casts are required, more often than not.

    Make these functions (skb_put, __skb_put and pskb_put) return void *
    and remove all the casts across the tree, adding a (u8 *) cast only
    where the unsigned char pointer was used directly, all done with the
    following spatch:

    @@
    expression SKB, LEN;
    typedef u8;
    identifier fn = { skb_put, __skb_put };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = { skb_put, __skb_put };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

    which actually doesn't cover pskb_put since there are only three
    users overall.

    A handful of stragglers were converted manually, notably a macro in
    drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
    instances in net/bluetooth/hci_sock.c. In the former file, I also
    had to fix one whitespace problem spatch introduced.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

05 Apr, 2017

5 commits


02 Apr, 2017

1 commit


28 Oct, 2016

1 commit


02 May, 2016

1 commit


03 Mar, 2016

1 commit

  • When pn544_hci_i2c_acpi_request_resources() gets called we
    already know that the entries in ->acpi_match_table have
    matched ACPI ID of the device.
    In addition I2C client pointer cannot be NULL in any case
    (otherwise I2C core would not call ->probe() for the driver
    in the first place).

    Drop the two useless checks from the driver.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Samuel Ortiz

    Mika Westerberg
     

30 Dec, 2015

2 commits


05 Nov, 2015

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver update for 4.4-rc1. Lots of
    different driver and subsystem updates, hwtracing being the largest
    with the addition of some new platforms that are now supported. Full
    details in the shortlog.

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

    * tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (181 commits)
    fpga: socfpga: Fix check of return value of devm_request_irq
    lkdtm: fix ACCESS_USERSPACE test
    mcb: Destroy IDA on module unload
    mcb: Do not return zero on error path in mcb_pci_probe()
    mei: bus: set the device name before running fixup
    mei: bus: use correct lock ordering
    mei: Fix debugfs filename in error output
    char: ipmi: ipmi_ssif: Replace timeval with timespec64
    fpga: zynq-fpga: Fix issue with drvdata being overwritten.
    fpga manager: remove unnecessary null pointer checks
    fpga manager: ensure lifetime with of_fpga_mgr_get
    fpga: zynq-fpga: Change fw format to handle bin instead of bit.
    fpga: zynq-fpga: Fix unbalanced clock handling
    misc: sram: partition base address belongs to __iomem space
    coresight: etm3x: adding documentation for sysFS's cpu interface
    vme: 8-bit status/id takes 256 values, not 255
    fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000
    ARM: zynq: dt: Updated devicetree for Zynq 7000 platform.
    ARM: dt: fpga: Added binding docs for Xilinx Zynq FPGA manager.
    ver_linux: proc/modules, limit text processing to 'sed'
    ...

    Linus Torvalds
     

20 Oct, 2015

1 commit

  • As I understand it, the core nfc_pn544 module is useless without
    either the I2C or the MEI access module. So hide NFC_PN544 and
    select it automatically if either NFC_PN544_I2C or NFC_PN544_MEI is
    selected.

    This avoids presenting NFC_PN544 when neither NFC_PN544_I2C nor
    NFC_PN544_MEI can be selected.

    Signed-off-by: Jean Delvare
    Cc: Lauro Ramos Venancio
    Cc: Aloisio Almeida Jr
    Cc: Samuel Ortiz
    Signed-off-by: Samuel Ortiz

    Jean Delvare
     

21 Sep, 2015

3 commits


27 Jun, 2015

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here's the big char/misc driver pull request for 4.2-rc1.

    Lots of mei, extcon, coresight, uio, mic, and other driver updates in
    here. Full details in the shortlog. All of these have been in
    linux-next for some time with no reported problems"

    * tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (176 commits)
    mei: me: wait for power gating exit confirmation
    mei: reset flow control on the last client disconnection
    MAINTAINERS: mei: add mei_cl_bus.h to maintained file list
    misc: sram: sort and clean up included headers
    misc: sram: move reserved block logic out of probe function
    misc: sram: add private struct device and virt_base members
    misc: sram: report correct SRAM pool size
    misc: sram: bump error message level on unclean driver unbinding
    misc: sram: fix device node reference leak on error
    misc: sram: fix enabled clock leak on error path
    misc: mic: Fix reported static checker warning
    misc: mic: Fix randconfig build error by including errno.h
    uio: pruss: Drop depends on ARCH_DAVINCI_DA850 from config
    uio: pruss: Add CONFIG_HAS_IOMEM dependence
    uio: pruss: Include
    extcon: Redefine the unique id of supported external connectors without 'enum extcon' type
    char:xilinx_hwicap:buffer_icap - change 1/0 to true/false for bool type variable in function buffer_icap_set_configuration().
    Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashion
    parport: check exclusive access before register
    w1: use correct lock on error in w1_seq_show()
    ...

    Linus Torvalds
     

09 Jun, 2015

1 commit

  • Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*()
    functions) which appeared in v3.17-rc1, the gpiod_get* functions
    take an additional parameter that allows to specify direction and
    initial value for output.

    Use this to simplify the driver. Furthermore this is one caller less
    that stops us making the flags argument to gpiod_get*() mandatory.

    While touching this also do some minor coding style fixes.

    Signed-off-by: Uwe Kleine-König
    Reviewed-by: Linus Walleij
    Signed-off-by: Samuel Ortiz

    Uwe Kleine-König
     

25 May, 2015

1 commit

  • In order to automate modules matching add device uuid
    which is reported in client enumeration, keep also
    the name that is needed in for nfc distinguishing radio vendor

    Report mei:name:uuid

    Cc: linux-api@vger.kernel.org
    Cc: Samuel Ortiz
    Signed-off-by: Tomas Winkler
    Signed-off-by: Greg Kroah-Hartman

    Tomas Winkler
     

07 Apr, 2015

1 commit

  • Add missing terminating newlines to nfc_info and nfc_err
    to avoid possible interleaving from other messages.

    Miscellanea:

    o typo fix of "unknonwn" in message
    o remove unnecessary OOM messages as there's a generic dump_stack()
    o realign arguments

    Signed-off-by: Joe Perches
    Signed-off-by: Samuel Ortiz

    Joe Perches
     

28 Jan, 2015

3 commits


28 Nov, 2014

1 commit


22 Apr, 2014

2 commits


17 Feb, 2014

1 commit