06 Sep, 2020

1 commit


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
     

08 Aug, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Signed-off-by: Miguel Ojeda

    Alexander A. Klimov
     

07 Aug, 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
     

30 May, 2020

1 commit


23 Mar, 2020

1 commit


18 Mar, 2020

1 commit

  • HWRNG_MINOR and RNG_MISCDEV_MINOR are duplicate definitions, use
    unified HWRNG_MINOR instead and moved into miscdevice.h

    ANSLCD_MINOR and LCD_MINOR are duplicate definitions, use unified
    LCD_MINOR instead and moved into miscdevice.h

    MISCDEV_MINOR is renamed to PXA3XX_GCU_MINOR and moved into
    miscdevice.h

    Other definitions are just moved without any change.

    Link: https://lore.kernel.org/lkml/20200120221323.GJ15860@mit.edu/t/
    Suggested-by: Arnd Bergmann
    Build-tested-by: Willy TARREAU
    Build-tested-by: Miguel Ojeda
    Signed-off-by: Zhenzhong Duan
    Acked-by: Miguel Ojeda
    Acked-by: Arnd Bergmann
    Acked-by: Herbert Xu
    Link: https://lore.kernel.org/r/20200311071654.335-2-zhenzhong.duan@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Zhenzhong Duan
     

07 Mar, 2020

3 commits

  • The current codebase makes use of the zero-length array language
    extension to the C90 standard, but the preferred mechanism to declare
    variable-length types such as these ones is a flexible array member[1][2],
    introduced in C99:

    struct foo {
    int stuff;
    struct boo array[];
    };

    By making use of the mechanism above, we will get a compiler warning
    in case the flexible array does not occur last in the structure, which
    will help us prevent some kind of undefined behavior bugs from being
    inadvertently introduced[3] to the codebase from now on.

    Also, notice that, dynamic memory allocations won't be affected by
    this change:

    "Flexible array members have incomplete type, and so the sizeof operator
    may not be applied. As a quirk of the original implementation of
    zero-length arrays, sizeof evaluates to zero."[1]

    This issue was found with the help of Coccinelle.

    [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
    [2] https://github.com/KSPP/linux/issues/21
    [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

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

    Gustavo A. R. Silva
     
  • Use devm_platform_ioremap_resource() to simplify code.

    Signed-off-by: Yangtao Li
    Signed-off-by: Miguel Ojeda

    Yangtao Li
     
  • Adjust indentation from spaces to tab (+optional two spaces) as in
    coding style with command like:
    $ sed -e 's/^ /\t/' -i */Kconfig

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Miguel Ojeda

    Krzysztof Kozlowski
     

17 Dec, 2019

1 commit

  • drm-misc-next for v5.6:

    UAPI Changes:
    - Add support for DMA-BUF HEAPS.

    Cross-subsystem Changes:
    - mipi dsi definition updates, pulled into drm-intel as well.
    - Add lockdep annotations for dma_resv vs mmap_sem and fs_reclaim.
    - Remove support for dma-buf kmap/kunmap.
    - Constify fb_ops in all fbdev drivers, including drm drivers and drm-core, and media as well.

    Core Changes:
    - Small cleanups to ttm.
    - Fix SCDC definition.
    - Assorted cleanups to core.
    - Add todo to remove load/unload hooks, and use generic fbdev emulation.
    - Assorted documentation updates.
    - Use blocking ww lock in ttm fault handler.
    - Remove drm_fb_helper_fbdev_setup/teardown.
    - Warning fixes with W=1 for atomic.
    - Use drm_debug_enabled() instead of drm_debug flag testing in various drivers.
    - Fallback to nontiled mode in fbdev emulation when not all tiles are present. (Later on reverted)
    - Various kconfig indentation fixes in core and drivers.
    - Fix freeing transactions in dp-mst correctly.
    - Sean Paul is steping down as core maintainer. :-(
    - Add lockdep annotations for atomic locks vs dma-resv.
    - Prevent use-after-free for a bad job in drm_scheduler.
    - Fill out all block sizes in the P01x and P210 definitions.
    - Avoid division by zero in drm/rect, and fix bounds.
    - Add drm/rect selftests.
    - Add aspect ratio and alternate clocks for HDMI 4k modes.
    - Add todo for drm_framebuffer_funcs and fb_create cleanup.
    - Drop DRM_AUTH for prime import/export ioctls.
    - Clear DP-MST payload id tables downstream when initializating.
    - Fix for DSC throughput definition.
    - Add extra FEC definitions.
    - Fix fake offset in drm_gem_object_funs.mmap.
    - Stop using encoder->bridge in core directly
    - Handle bridge chaining slightly better.
    - Add backlight support to drm/panel, and use it in many panel drivers.
    - Increase max number of y420 modes from 128 to 256, as preparation to add the new modes.

    Driver Changes:
    - Small fixes all over.
    - Fix documentation in vkms.
    - Fix mmap_sem vs dma_resv in nouveau.
    - Small cleanup in komeda.
    - Add page flip support in gma500 for psb/cdv.
    - Add ddc symlink in the connector sysfs directory for many drivers.
    - Add support for analogic an6345, and fix small bugs in it.
    - Add atomic modesetting support to ast.
    - Fix radeon fault handler VMA race.
    - Switch udl to use generic shmem helpers.
    - Unconditional vblank handling for mcde.
    - Miscellaneous fixes to mcde.
    - Tweak debug output from komeda using debugfs.
    - Add gamma and color transform support to komeda for DOU-IPS.
    - Add support for sony acx424AKP panel.
    - Various small cleanups to gma500.
    - Use generic fbdev emulation in udl, and replace udl_framebuffer with generic implementation.
    - Add support for Logic PD Type 28 panel.
    - Use drm_panel_* wrapper functions in exynos/tegra/msm.
    - Add devicetree bindings for generic DSI panels.
    - Don't include drm_pci.h directly in many drivers.
    - Add support for begin/end_cpu_access in udmabuf.
    - Stop using drm_get_pci_dev in gma500 and mga200.
    - Fixes to UDL damage handling, and use dma_buf_begin/end_cpu_access.
    - Add devfreq thermal support to panfrost.
    - Fix hotplug with daisy chained monitors by removing VCPI when disabling topology manager.
    - meson: Add support for OSD1 plane AFBC commit.
    - Stop displaying garbage when toggling ast primary plane on/off.
    - More cleanups and fixes to UDL.
    - Add D32 suport to komeda.
    - Remove globle copy of drm_dev in gma500.
    - Add support for Boe Himax8279d MIPI-DSI LCD panel.
    - Add support for ingenic JZ4770 panel.
    - Small null pointer deference fix in ingenic.
    - Remove support for the special tfp420 driver, as there is a generic way to do it.

    Signed-off-by: Daniel Vetter

    From: Maarten Lankhorst
    Link: https://patchwork.freedesktop.org/patch/msgid/ba73535a-9334-5302-2e1f-5208bd7390bd@linux.intel.com

    Daniel Vetter
     

11 Dec, 2019

1 commit

  • Now that the fbops member of struct fb_info is const, we can start
    making the ops const as well.

    Cc: Miguel Ojeda Sandonis
    Cc: Robin van der Gracht
    Reviewed-by: Daniel Vetter
    Reviewed-by: Miguel Ojeda
    Acked-by: Robin van der Gracht
    Signed-off-by: Jani Nikula
    Link: https://patchwork.freedesktop.org/patch/msgid/31c18e3ce9d6962aabda4799b3051039ff591c92.1575390741.git.jani.nikula@intel.com

    Jani Nikula
     

05 Dec, 2019

1 commit

  • Like in commit 8b2303de399f ("serial: core: Fix handling of options
    after MMIO address") we may use simple_strtoul() which in comparison to
    kstrtoul() can do conversion in-place without additional and unnecessary
    code to be written.

    Link: http://lkml.kernel.org/r/20190801192904.41087-2-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko
    Reviewed-by: Petr Mladek
    Cc: Geert Uytterhoeven
    Cc: Mans Rullgard
    Cc: Miguel Ojeda
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     

18 Sep, 2019

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "It's a somewhat calmer cycle for docs this time, as the churn of the
    mass RST conversion is happily mostly behind us.

    - A new document on reproducible builds.

    - We finally got around to zapping the documentation for hardware
    support that was removed in 2004; one doesn't want to rush these
    things.

    - The usual assortment of fixes, typo corrections, etc"

    * tag 'docs-5.4' of git://git.lwn.net/linux: (67 commits)
    Documentation: kbuild: Add document about reproducible builds
    docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]
    Documentation: Add "earlycon=sbi" to the admin guide
    doc:lock: remove reference to clever use of read-write lock
    devices.txt: improve entry for comedi (char major 98)
    docs: mtd: Update spi nor reference driver
    doc: arm64: fix grammar dtb placed in no attributes region
    Documentation: sysrq: don't recommend 'S' 'U' before 'B'
    mailmap: Update email address for Quentin Perret
    docs: ftrace: clarify when tracing is disabled by the trace file
    docs: process: fix broken link
    Documentation/arm/samsung-s3c24xx: Remove stray U+FEFF character to fix title
    Documentation/arm/sa1100/assabet: Fix 'make assabet_defconfig' command
    Documentation/arm/sa1100: Remove some obsolete documentation
    docs/zh_CN: update Chinese howto.rst for latexdocs making
    Documentation: virt: Fix broken reference to virt tree's index
    docs: Fix typo on pull requests guide
    kernel-doc: Allow anonymous enum
    Documentation: sphinx: Don't parse socket() as identifier reference
    Documentation: sphinx: Add missing comma to list of strings
    ...

    Linus Torvalds
     

20 Aug, 2019

1 commit


09 Aug, 2019

2 commits


06 Aug, 2019

2 commits


01 Aug, 2019

1 commit


10 Jul, 2019

1 commit

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     

20 Jun, 2019

2 commits

  • While using mmap, the incorrect values of length and vm_pgoff are
    ignored and this driver goes ahead with mapping fbdev.buffer
    to user vma.

    Convert vm_insert_pages() to use vm_map_pages_zero(). We could later
    "fix" these drivers to behave according to the normal vm_pgoff
    offsetting simply by removing the _zero suffix on the function name
    and if that causes regressions, it gives us an easy way to revert.

    Signed-off-by: Souptick Joarder
    Acked-by: Robin van der Gracht
    Signed-off-by: Miguel Ojeda

    Souptick Joarder
     
  • While using mmap, the incorrect values of length and vm_pgoff are
    ignored and this driver goes ahead with mapping cfag12864b_buffer
    to user vma.

    Convert vm_insert_pages() to use vm_map_pages_zero(). We could later
    "fix" these drivers to behave according to the normal vm_pgoff
    offsetting simply by removing the _zero suffix on the function name and
    if that causes regressions, it gives us an easy way to revert.

    Signed-off-by: Souptick Joarder
    Signed-off-by: Miguel Ojeda

    Souptick Joarder
     

15 Jun, 2019

1 commit

  • The kbuild documentation clearly shows that the documents
    there are written at different times: some use markdown,
    some use their own peculiar logic to split sections.

    Convert everything to ReST without affecting too much
    the author's style and avoiding adding uneeded markups.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

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
     

17 Mar, 2019

8 commits


16 Feb, 2019

1 commit

  • On module unload/remove, we need to ensure that work does not run
    after we have freed resources. Concretely, cancel_delayed_work()
    may return while the callback function is still running.

    From kernel/workqueue.c:

    The work callback function may still be running on return,
    unless it returns true and the work doesn't re-arm itself.
    Explicitly flush or use cancel_delayed_work_sync() to wait on it.

    Link: https://lore.kernel.org/lkml/20190204220952.30761-1-TheSven73@googlemail.com/
    Reported-by: Sven Van Asbroeck
    Reviewed-by: Dmitry Torokhov
    Reviewed-by: Sven Van Asbroeck
    Acked-by: Robin van der Gracht
    Signed-off-by: Miguel Ojeda

    Miguel Ojeda
     

22 Dec, 2018

1 commit

  • The x/y command parsing has been broken since commit 129957069e6a
    ("staging: panel: Fixed checkpatch warning about simple_strtoul()").

    Commit b34050fadb86 ("auxdisplay: charlcd: Fix and clean up handling of
    x/y commands") fixed some problems by rewriting the parsing code,
    but also broke things further by removing the check for a complete
    command before attempting to parse it. As a result, parsing is
    terminated at the first x or y character.

    This reinstates the check for a final semicolon. Whereas the original
    code use strchr(), this is wasteful seeing as the semicolon is always
    at the end of the buffer. Thus check this character directly instead.

    Signed-off-by: Mans Rullgard
    Signed-off-by: Miguel Ojeda

    Mans Rullgard
     

02 Nov, 2018

1 commit

  • Pull compiler attribute updates from Miguel Ojeda:
    "This is an effort to disentangle the include/linux/compiler*.h headers
    and bring them up to date.

    The main idea behind the series is to use feature checking macros
    (i.e. __has_attribute) instead of compiler version checks (e.g.
    GCC_VERSION), which are compiler-agnostic (so they can be shared,
    reducing the size of compiler-specific headers) and version-agnostic.

    Other related improvements have been performed in the headers as well,
    which on top of the use of __has_attribute it has amounted to a
    significant simplification of these headers (e.g. GCC_VERSION is now
    only guarding a few non-attribute macros).

    This series should also help the efforts to support compiling the
    kernel with clang and icc. A fair amount of documentation and comments
    have also been added, clarified or removed; and the headers are now
    more readable, which should help kernel developers in general.

    The series was triggered due to the move to gcc >= 4.6. In turn, this
    series has also triggered Sparse to gain the ability to recognize
    __has_attribute on its own.

    Finally, the __nonstring variable attribute series has been also
    applied on top; plus two related patches from Nick Desaulniers for
    unreachable() that came a bit afterwards"

    * tag 'compiler-attributes-for-linus-4.20-rc1' of https://github.com/ojeda/linux:
    compiler-gcc: remove comment about gcc 4.5 from unreachable()
    compiler.h: update definition of unreachable()
    Compiler Attributes: ext4: remove local __nonstring definition
    Compiler Attributes: auxdisplay: panel: use __nonstring
    Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8)
    Compiler Attributes: add support for __nonstring (gcc >= 8)
    Compiler Attributes: add MAINTAINERS entry
    Compiler Attributes: add Doc/process/programming-language.rst
    Compiler Attributes: remove uses of __attribute__ from compiler.h
    Compiler Attributes: KENTRY used twice the "used" attribute
    Compiler Attributes: use feature checks instead of version checks
    Compiler Attributes: add missing SPDX ID in compiler_types.h
    Compiler Attributes: remove unneeded sparse (__CHECKER__) tests
    Compiler Attributes: homogenize __must_be_array
    Compiler Attributes: remove unneeded tests
    Compiler Attributes: always use the extra-underscores syntax
    Compiler Attributes: remove unused attributes

    Linus Torvalds
     

01 Oct, 2018

1 commit

  • Let gcc know these arrays are not meant to be NUL-terminated
    by annotating them with the new __nonstring variable attribute;
    and remove the comment since it conveys the same information.

    Tested-by: Sedat Dilek # on top of v4.19-rc5, clang 7
    Reviewed-by: Nick Desaulniers
    Reviewed-by: Luc Van Oostenryck
    Signed-off-by: Miguel Ojeda

    Miguel Ojeda
     

13 Sep, 2018

2 commits

  • In order to make use of array info obtained from gpiod_get_array() and
    speed up processing of arrays matching single GPIO chip layout, that
    information must be passed to get/set array functions. Extend the
    functions' API with that additional parameter and update all users.
    Pass NULL if a user builds an array itself from single GPIOs.

    Cc: Jonathan Corbet
    Cc: Miguel Ojeda Sandonis
    Cc: Geert Uytterhoeven
    Cc: Sebastien Bourdelin
    Cc: Lukas Wunner
    Cc: Peter Korsgaard
    Cc: Peter Rosin
    Cc: Andrew Lunn
    Cc: Florian Fainelli
    Cc: "David S. Miller"
    Cc: Rojhalat Ibrahim
    Cc: Dominik Brodowski
    Cc: Russell King
    Cc: Kishon Vijay Abraham I
    Cc: Tony Lindgren
    Cc: Lars-Peter Clausen
    Cc: Michael Hennerich
    Cc: Jonathan Cameron
    Cc: Hartmut Knaack
    Cc: Peter Meerwald-Stadler
    Cc: Greg Kroah-Hartman
    Cc: Jiri Slaby
    Cc: Yegor Yefremov
    Cc: Uwe Kleine-König
    Signed-off-by: Janusz Krzysztofik
    Acked-by: Ulf Hansson
    Signed-off-by: Linus Walleij

    Janusz Krzysztofik
     
  • Most users of get/set array functions iterate consecutive bits of data,
    usually a single integer, while processing array of results obtained
    from, or building an array of values to be passed to those functions.
    Save time wasted on those iterations by changing the functions' API to
    accept bitmaps.

    All current users are updated as well.

    More benefits from the change are expected as soon as planned support
    for accepting/passing those bitmaps directly from/to respective GPIO
    chip callbacks if applicable is implemented.

    Cc: Jonathan Corbet
    Cc: Miguel Ojeda Sandonis
    Cc: Sebastien Bourdelin
    Cc: Lukas Wunner
    Cc: Peter Korsgaard
    Cc: Peter Rosin
    Cc: Andrew Lunn
    Cc: Florian Fainelli
    Cc: "David S. Miller"
    Cc: Rojhalat Ibrahim
    Cc: Dominik Brodowski
    Cc: Russell King
    Cc: Kishon Vijay Abraham I
    Cc: Tony Lindgren
    Cc: Lars-Peter Clausen
    Cc: Michael Hennerich
    Cc: Jonathan Cameron
    Cc: Hartmut Knaack
    Cc: Peter Meerwald-Stadler
    Cc: Greg Kroah-Hartman
    Cc: Jiri Slaby
    Cc: Yegor Yefremov
    Cc: Uwe Kleine-König
    Signed-off-by: Janusz Krzysztofik
    Acked-by: Ulf Hansson
    Reviewed-by: Geert Uytterhoeven
    Tested-by: Geert Uytterhoeven
    Signed-off-by: Linus Walleij

    Janusz Krzysztofik