30 Sep, 2020

1 commit

  • One-element arrays are being deprecated[1]. Replace the one-element array
    with a simple object of type u_char: 'u_char rm_pad1'[2], once it seems
    this is just a placeholder for padding.

    [1] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays
    [2] https://github.com/KSPP/linux/issues/86

    Built-tested-by: kernel test robot
    Link: https://lore.kernel.org/lkml/5f72c23f.%2FkPBWcZBu+W6HKH4%25lkp@intel.com/
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: David S. Miller

    Gustavo A. R. Silva
     

24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

15 Aug, 2020

6 commits

  • This variable is present in many source files and has not been used
    anywhere (at least internally) since it was introduced.

    Fixes the following W=1 kernel build warning(s):

    drivers/net/fddi/skfp/cfm.c: In function ‘cfm’:
    drivers/net/fddi/skfp/cfm.c:211:6: warning: variable ‘oldstate’ set but not used [-Wunused-but-set-variable]
    drivers/net/fddi/skfp/cfm.c:40:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=]

    Cc: "David S. Miller"
    Cc: Jakub Kicinski
    Cc: Lee Jones
    Cc: netdev@vger.kernel.org
    Signed-off-by: Lee Jones
    Signed-off-by: David S. Miller

    Lee Jones
     
  • While we're at it, remove some code which has never been invoked.

    Keep the comment though, as it seems potentially half useful.

    Fixes the following W=1 kernel build warning(s):

    drivers/net/fddi/skfp/cfm.c: In function ‘cfm’:
    drivers/net/fddi/skfp/cfm.c:211:6: warning: variable ‘oldstate’ set but not used [-Wunused-but-set-variable]

    Cc: "David S. Miller"
    Cc: Jakub Kicinski
    Cc: netdev@vger.kernel.org
    Signed-off-by: Lee Jones
    Signed-off-by: David S. Miller

    Lee Jones
     
  • This variable is present in many source files and has not been used
    anywhere (at least internally) since it was introduced.

    Fixes the following W=1 kernel build warning(s):

    drivers/net/fddi/skfp/smt.c:24:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=]

    Cc: "David S. Miller"
    Cc: Jakub Kicinski
    Cc: Tetsuo Handa
    Cc: netdev@vger.kernel.org
    Signed-off-by: Lee Jones
    Signed-off-by: David S. Miller

    Lee Jones
     
  • The variable 'smt_pdef' is only used if LITTLE_ENDIAN is set, so only
    define it if this is the case.

    Fixes the following W=1 kernel build warning(s):

    drivers/net/fddi/skfp/smt.c:1572:3: warning: ‘smt_pdef’ defined but not used [-Wunused-const-variable=]

    Cc: "David S. Miller"
    Cc: Jakub Kicinski
    Cc: Tetsuo Handa
    Cc: netdev@vger.kernel.org
    Signed-off-by: Lee Jones
    Signed-off-by: David S. Miller

    Lee Jones
     
  • This variable is present in many source files and has not been used
    anywhere (at least internally) since it was introduced.

    Fixes the following W=1 kernel build warning(s):

    drivers/net/fddi/skfp/fplustm.c:25:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=]

    Cc: "David S. Miller"
    Cc: Jakub Kicinski
    Cc: Maxime Coquelin
    Cc: Alexandre Torgue
    Cc: netdev@vger.kernel.org
    Cc: linux-stm32@st-md-mailman.stormreply.com
    Signed-off-by: Lee Jones
    Signed-off-by: David S. Miller

    Lee Jones
     
  • This variable is present in many source files and has not been used
    anywhere (at least internally) since it was introduced.

    Fixes the following W=1 kernel build warning(s):

    drivers/net/fddi/skfp/hwmtm.c:14:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=]

    Cc: "David S. Miller"
    Cc: Jakub Kicinski
    Cc: netdev@vger.kernel.org
    Signed-off-by: Lee Jones
    Signed-off-by: David S. Miller

    Lee Jones
     

14 Jul, 2020

1 commit

  • kbuild test robot found that addr_to_string() is available only when
    DEBUG is defined. And I found that what that function is doing is
    what %pM will do. Thus, replace %s with %pM and remove thread-unsafe
    addr_to_string() function.

    Reported-by: kbuild test robot
    Signed-off-by: Tetsuo Handa
    Signed-off-by: David S. Miller

    Tetsuo Handa
     

27 Jun, 2020

1 commit


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
     

01 May, 2020

1 commit

  • - add SPDX header;
    - use copyright symbol;
    - add a document title;
    - adjust titles and chapters, adding proper markups;
    - comment out text-only TOC from html/pdf output;
    - adjust identation, whitespaces and blank lines where needed;
    - add to networking/index.rst.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: David S. Miller

    Mauro Carvalho Chehab
     

05 Mar, 2020

2 commits


29 Jan, 2020

1 commit

  • Pull networking updates from David Miller:

    1) Add WireGuard

    2) Add HE and TWT support to ath11k driver, from John Crispin.

    3) Add ESP in TCP encapsulation support, from Sabrina Dubroca.

    4) Add variable window congestion control to TIPC, from Jon Maloy.

    5) Add BCM84881 PHY driver, from Russell King.

    6) Start adding netlink support for ethtool operations, from Michal
    Kubecek.

    7) Add XDP drop and TX action support to ena driver, from Sameeh
    Jubran.

    8) Add new ipv4 route notifications so that mlxsw driver does not have
    to handle identical routes itself. From Ido Schimmel.

    9) Add BPF dynamic program extensions, from Alexei Starovoitov.

    10) Support RX and TX timestamping in igc, from Vinicius Costa Gomes.

    11) Add support for macsec HW offloading, from Antoine Tenart.

    12) Add initial support for MPTCP protocol, from Christoph Paasch,
    Matthieu Baerts, Florian Westphal, Peter Krystad, and many others.

    13) Add Octeontx2 PF support, from Sunil Goutham, Geetha sowjanya, Linu
    Cherian, and others.

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1469 commits)
    net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC
    udp: segment looped gso packets correctly
    netem: change mailing list
    qed: FW 8.42.2.0 debug features
    qed: rt init valid initialization changed
    qed: Debug feature: ilt and mdump
    qed: FW 8.42.2.0 Add fw overlay feature
    qed: FW 8.42.2.0 HSI changes
    qed: FW 8.42.2.0 iscsi/fcoe changes
    qed: Add abstraction for different hsi values per chip
    qed: FW 8.42.2.0 Additional ll2 type
    qed: Use dmae to write to widebus registers in fw_funcs
    qed: FW 8.42.2.0 Parser offsets modified
    qed: FW 8.42.2.0 Queue Manager changes
    qed: FW 8.42.2.0 Expose new registers and change windows
    qed: FW 8.42.2.0 Internal ram offsets modifications
    MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver
    Documentation: net: octeontx2: Add RVU HW and drivers overview
    octeontx2-pf: ethtool RSS config support
    octeontx2-pf: Add basic ethtool support
    ...

    Linus Torvalds
     

25 Jan, 2020

1 commit


06 Jan, 2020

1 commit


18 Jul, 2019

1 commit

  • Pull MIPS updates from Paul Burton:
    "A light batch this time around but significant improvements for
    certain systems:

    - Removal of readq & writeq for MIPS32 kernels where they would
    simply BUG() anyway, allowing drivers or other code that #ifdefs on
    their presence to work properly.

    - Improvements for Ingenic JZ4740 systems, including support for the
    external memory controller & pinmuxing fixes for qi_lb60/NanoNote
    systems.

    - Improvements for Lantiq systems, in particular around SMP & IPIs.

    - DT updates for ralink/MediaTek MT7628a systems to probe & configure
    a bunch more devices.

    - Miscellaneous cleanups & build fixes"

    * tag 'mips_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (30 commits)
    MIPS: fix some more fall through errors in arch/mips
    MIPS: perf events: handle switch statement falling through warnings
    mips/kprobes: Export kprobe_fault_handler()
    MAINTAINERS: Add myself as Ingenic SoCs maintainer
    MIPS: ralink: mt7628a.dtsi: Add watchdog controller DT node
    MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node
    MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node
    MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes
    MIPS: ralink: mt7628a.dtsi: Add pinmux DT node
    MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier
    MIPS: lantiq: Add SMP support for lantiq interrupt controller
    MIPS: lantiq: Shorten register names, remove unused macros
    MIPS: lantiq: Fix bitfield masking
    MIPS: lantiq: Remove unused macros
    MIPS: lantiq: Fix attributes of of_device_id structure
    MIPS: lantiq: Change variables to the same type as the source
    MIPS: lantiq: Move macro directly to iomem function
    mips: Remove q-accessors from non-64bit platforms
    FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h
    MIPS: configs: Remove useless UEVENT_HELPER_PATH
    ...

    Linus Torvalds
     

27 Jun, 2019

3 commits


25 Jun, 2019

1 commit

  • Currently arch/mips/include/asm/io.h provides 64b memory accessor
    functions such as readq & writeq even on MIPS32 platforms where those
    accessors cannot actually perform a 64b memory access. They instead
    BUG(). This is unfortunate for drivers which either #ifdef on the
    presence of these accessors, or can function with non-atomic
    implementations of them found in either linux/io-64-nonatomic-lo-hi.h or
    linux/io-64-nonatomic-hi-lo.h. As such we're preparing to remove the
    definitions of these 64b accessor functions for MIPS32 kernels.

    In preparation for this, include linux/io-64-nonatomic-lo-hi.h in
    defza.c in order to provide a non-atomic implementation of the
    readq_relaxed & writeq_relaxed functions that are used by this code. In
    practice this will have no runtime effect, since use of the 64b accessor
    functions is conditional upon sizeof(unsigned long) == 8, ie. upon
    CONFIG_64BIT=y. This means the calls to these non-atomic readq & writeq
    implementations will be optimized out anyway, but we need their
    definitions to keep the compiler happy.

    For 64bit kernels using this code this change should also have no effect
    because asm/io.h will continue to provide the definitions of
    readq_relaxed & writeq_relaxed, which linux/io-64-nonatomic-lo-hi.h
    checks for before defining itself.

    Signed-off-by: Paul Burton
    Acked-by: Maciej W. Rozycki
    Acked-by: David S. Miller
    Cc: Serge Semin
    Cc: netdev@vger.kernel.org
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Paul Burton
     

31 May, 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 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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

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

    Thomas Gleixner
     

22 May, 2019

1 commit

  • Pull networking fixes from David Miller:

    1) Clear up some recent tipc regressions because of registration
    ordering. Fix from Junwei Hu.

    2) tipc's TLV_SET() can read past the end of the supplied buffer during
    the copy. From Chris Packham.

    3) ptp example program doesn't match the kernel, from Richard Cochran.

    4) Outgoing message type fix in qrtr, from Bjorn Andersson.

    5) Flow control regression in stmmac, from Tan Tee Min.

    6) Fix inband autonegotiation in phylink, from Russell King.

    7) Fix sk_bound_dev_if handling in rawv6_bind(), from Mike Manning.

    8) Fix usbnet crash after disconnect, from Kloetzke Jan.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits)
    usbnet: fix kernel crash after disconnect
    selftests: fib_rule_tests: use pre-defined DEV_ADDR
    net-next: net: Fix typos in ip-sysctl.txt
    ipv6: Consider sk_bound_dev_if when binding a raw socket to an address
    net: phylink: ensure inband AN works correctly
    usbnet: ipheth: fix racing condition
    net: stmmac: dma channel control register need to be init first
    net: stmmac: fix ethtool flow control not able to get/set
    net: qrtr: Fix message type of outgoing packets
    networking: : fix typos in code comments
    ptp: Fix example program to match kernel.
    fddi: fix typos in code comments
    selftests: fib_rule_tests: enable forwarding before ipv4 from/iif test
    selftests: fib_rule_tests: fix local IPv4 address typo
    tipc: Avoid copying bytes beyond the supplied data
    2/2] net: xilinx_emaclite: use readx_poll_timeout() in mdio wait function
    1/2] net: axienet: use readx_poll_timeout() in mdio wait function
    vlan: Mark expected switch fall-through
    macvlan: Mark expected switch fall-through
    net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query
    ...

    Linus Torvalds
     

21 May, 2019

2 commits


09 Feb, 2019

2 commits


07 Feb, 2019

1 commit


08 Jan, 2019

1 commit

  • We already need to zero out memory for dma_alloc_coherent(), as such
    using dma_zalloc_coherent() is superflous. Phase it out.

    This change was generated with the following Coccinelle SmPL patch:

    @ replace_dma_zalloc_coherent @
    expression dev, size, data, handle, flags;
    @@

    -dma_zalloc_coherent(dev, size, handle, flags)
    +dma_alloc_coherent(dev, size, handle, flags)

    Suggested-by: Christoph Hellwig
    Signed-off-by: Luis Chamberlain
    [hch: re-ran the script on the latest tree]
    Signed-off-by: Christoph Hellwig

    Luis Chamberlain
     

08 Nov, 2018

4 commits


16 Oct, 2018

2 commits

  • DEC FDDIcontroller 700 (DEFZA) uses a Tx/Rx queue pair to communicate
    SMT frames with adapter's firmware. Any SMT frame received from the RMC
    via the Rx queue is queued back by the driver to the SMT Rx queue for
    the firmware to process. Similarly the firmware uses the SMT Tx queue
    to supply the driver with SMT frames which are queued back to the Tx
    queue for the RMC to send to the ring.

    When a network tap is attached to an FDDI interface handled by `defza'
    any incoming SMT frames captured are queued to our usual processing of
    network data received, which in turn delivers them to any listening
    taps.

    However the outgoing SMT frames produced by the firmware bypass our
    network protocol stack and are therefore not delivered to taps. This in
    turn means that taps are missing a part of network traffic sent by the
    adapter, which may make it more difficult to track down network problems
    or do general traffic analysis.

    Call `dev_queue_xmit_nit' then in the SMT Tx path, having checked that
    a network tap is attached, with a newly-created `dev_nit_active' helper
    wrapping the usual condition used in the transmit path.

    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: David S. Miller

    Maciej W. Rozycki
     
  • Add support for the DEC FDDIcontroller 700 (DEFZA), Digital Equipment
    Corporation's first-generation FDDI network interface adapter, made for
    TURBOchannel and based on a discrete version of what eventually became
    Motorola's widely used CAMEL chipset.

    The CAMEL chipset is present for example in the DEC FDDIcontroller
    TURBOchannel, EISA and PCI adapters (DEFTA/DEFEA/DEFPA) that we support
    with the `defxx' driver, however the host bus interface logic and the
    firmware API are different in the DEFZA and hence a separate driver is
    required.

    There isn't much to say about the driver except that it works, but there
    is one peculiarity to mention. The adapter implements two Tx/Rx queue
    pairs.

    Of these one pair is the usual network Tx/Rx queue pair, in this case
    used by the adapter to exchange frames with the ring, via the RMC (Ring
    Memory Controller) chip. The Tx queue is handled directly by the RMC
    chip and resides in onboard packet memory. The Rx queue is maintained
    via DMA in host memory by adapter's firmware copying received data
    stored by the RMC in onboard packet memory.

    The other pair is used to communicate SMT frames with adapter's
    firmware. Any SMT frame received from the RMC via the Rx queue must be
    queued back by the driver to the SMT Rx queue for the firmware to
    process. Similarly the firmware uses the SMT Tx queue to supply the
    driver with SMT frames that must be queued back to the Tx queue for the
    RMC to send to the ring.

    This solution was chosen because the designers ran out of PCB space and
    could not squeeze in more logic onto the board that would be required to
    handle this SMT frame traffic without the need to involve the driver, as
    with the later DEFTA/DEFEA/DEFPA adapters.

    Finally the driver does some Frame Control byte decoding, so to avoid
    magic numbers some macros are added to .

    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: David S. Miller

    Maciej W. Rozycki
     

13 Oct, 2018

1 commit


22 Sep, 2018

1 commit

  • Clang warns when a variable is assigned to itself.

    drivers/net/fddi/skfp/pcmplc.c:1257:6: warning: explicitly assigning
    value of variable of type 'int' to itself [-Wself-assign]
    phy = phy ; on_off = on_off ;
    ~~~ ^ ~~~
    drivers/net/fddi/skfp/pcmplc.c:1257:21: warning: explicitly assigning
    value of variable of type 'int' to itself [-Wself-assign]
    phy = phy ; on_off = on_off ;
    ~~~~~~ ^ ~~~~~~
    2 warnings generated.

    Turns out this entire function doesn't actually do anything since
    SK_UNUSED is just casting the pointer to void. Remove it to silence
    this Clang warning.

    Link: https://github.com/ClangBuiltLinux/linux/issues/128
    Signed-off-by: Nathan Chancellor
    Signed-off-by: David S. Miller

    Nathan Chancellor
     

09 Jun, 2018

1 commit

  • bp->SharedMemAddr is set to NULL while bp->SharedMemSize lesser-or-equal 0,
    then memset will trigger null-ptr-deref.

    fix it by replacing pci_alloc_consistent with dma_zalloc_coherent.

    Signed-off-by: YueHaibing
    Signed-off-by: David S. Miller

    YueHaibing
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman