Skip to content
Snippets Groups Projects
  1. Jul 21, 2021
  2. Jun 15, 2021
  3. May 18, 2021
  4. May 13, 2021
    • Jiri Slaby's avatar
      tty: no checking of tty_unregister_ldisc · 357a6a87
      Jiri Slaby authored
      
      tty_unregister_ldisc now returns 0 = success. No need to check the
      return value. In fact, the users only warned if an error occured and
      didn't do anything useful anyway -- the ldisc module was unloaded in any
      case.
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: William Hubbs <w.d.hubbs@gmail.com>
      Cc: Chris Brannon <chris@the-brannons.com>
      Cc: Kirk Reiser <kirk@reisers.ca>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Rodolfo Giometti <giometti@enneenne.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Link: https://lore.kernel.org/r/20210505091928.22010-19-jslaby@suse.cz
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      357a6a87
    • Jiri Slaby's avatar
      tty: make tty_ldisc_ops a param in tty_unregister_ldisc · f81ee8b8
      Jiri Slaby authored
      
      Make tty_unregister_ldisc symmetric to tty_register_ldisc by accepting
      struct tty_ldisc_ops as a parameter instead of ldisc number. This avoids
      checking of the ldisc number bounds in tty_unregister_ldisc.
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: William Hubbs <w.d.hubbs@gmail.com>
      Cc: Chris Brannon <chris@the-brannons.com>
      Cc: Kirk Reiser <kirk@reisers.ca>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Rodolfo Giometti <giometti@enneenne.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Link: https://lore.kernel.org/r/20210505091928.22010-17-jslaby@suse.cz
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f81ee8b8
    • Jiri Slaby's avatar
      tty: set tty_ldisc_ops::num statically · fbadf70a
      Jiri Slaby authored
      
      There is no reason to pass the ldisc number to tty_register_ldisc
      separately. Just set it in the already defined tty_ldisc_ops in all the
      ldiscs.
      
      This simplifies tty_register_ldisc a bit too (no need to set the num
      member there).
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: William Hubbs <w.d.hubbs@gmail.com>
      Cc: Chris Brannon <chris@the-brannons.com>
      Cc: Kirk Reiser <kirk@reisers.ca>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Rodolfo Giometti <giometti@enneenne.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Link: https://lore.kernel.org/r/20210505091928.22010-15-jslaby@suse.cz
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fbadf70a
    • Jiri Slaby's avatar
      tty: make fp of tty_ldisc_ops::receive_buf{,2} const · 0f3dcf3b
      Jiri Slaby authored
      
      Char pointer (cp) passed to tty_ldisc_ops::receive_buf{,2} is const.
      There is no reason for flag pointer (fp) not to be too. So switch it in
      the definition and all uses.
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: William Hubbs <w.d.hubbs@gmail.com>
      Cc: Chris Brannon <chris@the-brannons.com>
      Cc: Kirk Reiser <kirk@reisers.ca>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Liam Girdwood <lgirdwood@gmail.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
      Link: https://lore.kernel.org/r/20210505091928.22010-12-jslaby@suse.cz
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0f3dcf3b
  5. Apr 10, 2021
  6. Mar 10, 2021
  7. Feb 04, 2021
  8. Jan 27, 2021
  9. Dec 28, 2020
  10. Dec 09, 2020
  11. Nov 30, 2020
  12. Nov 12, 2020
  13. Nov 09, 2020
  14. Aug 23, 2020
  15. Aug 18, 2020
  16. Jul 29, 2020
  17. Jun 24, 2020
    • Jiri Slaby's avatar
      vc: separate state · 28bc24fc
      Jiri Slaby authored
      
      There are two copies of some members of struct vc_data. This is because
      we need to save them and restore later. Move these memebers to a
      separate structure called vc_state. So now instead of members like:
        vc_x, vc_y and vc_saved_x, vc_saved_y
      we have
        state and saved_state (of type: struct vc_state)
      containing
        state.x, state.y and saved_state.x, saved_state.y
      
      This change:
      * makes clear what is saved & restored
      * eases save & restore by using memcpy (see save_cur and restore_cur)
      
      Finally, we document the newly added struct vc_state using kernel-doc.
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Link: https://lore.kernel.org/r/20200615074910.19267-1-jslaby@suse.cz
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      28bc24fc
  18. Jun 13, 2020
    • Masahiro Yamada's avatar
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada authored
      
      Since commit 84af7a61 ("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: default avatarMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
  19. Feb 11, 2020
  20. May 24, 2019
  21. May 21, 2019
  22. Nov 02, 2017
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      
      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 <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  23. Jul 31, 2013
  24. Mar 08, 2012
    • Alan Cox's avatar
      vt:tackle kbd_table · 079c9534
      Alan Cox authored
      
      Keyboard struct lifetime is easy, but the locking is not and is completely
      ignored by the existing code. Tackle this one head on
      
      - Make the kbd_table private so we can run down all direct users
      - Hoick the relevant ioctl handlers into the keyboard layer
      - Lock them with the keyboard lock so they don't change mid keypress
      - Add helpers for things like console stop/start so we isolate the poking
        around properly
      - Tweak the braille console so it still builds
      
      There are a couple of FIXME locking cases left for ioctls that are so hideous
      they should be addressed in a later patch. After this patch the kbd_table is
      private and all the keyboard jiggery pokery is in one place.
      
      This update fixes speakup and also a memory leak in the original.
      
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      079c9534
  25. Jan 12, 2012
  26. Dec 12, 2009
  27. Oct 02, 2008
Loading