1. 15 Jun, 2018 2 commits
  2. 05 Jun, 2018 1 commit
  3. 04 May, 2018 2 commits
  4. 20 Apr, 2018 1 commit
  5. 18 Apr, 2018 1 commit
  6. 17 Apr, 2018 2 commits
    • Mauro Carvalho Chehab's avatar
      media: si470x: fix __be16 annotations · 90db5c82
      Mauro Carvalho Chehab authored
      
      
      The annotations there are wrong as warned:
         drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
         drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
         drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
         drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
         drivers/media/radio/si470x/radio-si470x-i2c.c:129:24: warning: incorrect type in assignment (different base types)
         drivers/media/radio/si470x/radio-si470x-i2c.c:129:24:    expected unsigned short [unsigned] [short] <noident>
         drivers/media/radio/si470x/radio-si470x-i2c.c:129:24:    got restricted __be16 [usertype] <noident>
         drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
         drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
         drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
         drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      90db5c82
    • Mauro Carvalho Chehab's avatar
      media: si470x: allow build both USB and I2C at the same time · 58757984
      Mauro Carvalho Chehab authored
      
      
      Currently, either USB or I2C is built. Change it to allow
      having both enabled at the same time.
      
      The main reason is that COMPILE_TEST all[yes/mod]builds will
      now contain all drivers under drivers/media.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      58757984
  7. 21 Mar, 2018 3 commits
  8. 06 Mar, 2018 1 commit
  9. 14 Feb, 2018 1 commit
  10. 11 Feb, 2018 1 commit
    • Linus Torvalds's avatar
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds authored
      
      
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      
      Scripted-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  11. 04 Jan, 2018 2 commits
  12. 11 Dec, 2017 1 commit
    • Mauro Carvalho Chehab's avatar
      media: radio-si476x: fix behavior when seek->range* are defined · 02d73243
      Mauro Carvalho Chehab authored
      
      
      The logic at si476x_radio_s_hw_freq_seek() checks if the
      frequency range that will be used to handle hardware seek
      has the minimal frequency under rangelow. That works fine
      if userspace zeros both fields. However, if userspace
      fills either seek->rangelow or seek-rangehigh, it won't
      read the corresponding range from the device, causing the
      values to be unitialized, as warned by smatch:
      
      	drivers/media/radio/radio-si476x.c:789 si476x_radio_s_hw_freq_seek() error: uninitialized symbol 'rangelow'.
      	drivers/media/radio/radio-si476x.c:789 si476x_radio_s_hw_freq_seek() error: uninitialized symbol 'rangehigh'.
      
      Fix it by initializing those vars from the values present at
      the struct v4l2_hw_freq_seek.
      
      While here, simplify the logic which reads such values from
      the hardware limits.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      02d73243
  13. 30 Nov, 2017 2 commits
    • Mauro Carvalho Chehab's avatar
      media: radio-wl1273: fix a parameter name at kernel-doc macro · 5bef1c0b
      Mauro Carvalho Chehab authored
      
      
      Solve those warnings:
      	drivers/media/radio/radio-wl1273.c:1337: warning: No description found for parameter 'radio'
      	drivers/media/radio/radio-wl1273.c:1337: warning: Excess function parameter 'core' description in 'wl1273_fm_set_tx_power'
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      5bef1c0b
    • Mauro Carvalho Chehab's avatar
      media: radio-si476x: fix kernel-doc markups · d156f293
      Mauro Carvalho Chehab authored
      
      
      get rid of the following warnings:
        drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'v4l2dev'
        drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'ctrl_handler'
        drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'debugfs'
        drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'audmode'
        drivers/media/radio/radio-si476x.c:317: warning: Excess struct member 'kref' description in 'si476x_radio'
        drivers/media/radio/radio-si476x.c:317: warning: Excess struct member 'core_lock' description in 'si476x_radio'
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      d156f293
  14. 27 Nov, 2017 2 commits
  15. 02 Nov, 2017 1 commit
    • 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
  16. 31 Oct, 2017 3 commits
  17. 23 Sep, 2017 1 commit
    • Hans Verkuil's avatar
      media: fix media Kconfig help syntax issues · 561b29e4
      Hans Verkuil authored
      
      
      The help text should be indented by at least two spaces after the
      'help' separator. This is both good practice and the media_build system
      for building media drivers makes this assumption.
      
      I went through all Kconfigs under drivers/media and fixed any bad help
      sections. This makes it conform to the common practice and should fix
      problems with 'make menuconfig' when using media_build. This is due to
      a "WARNING" message that media_build can insert in the Kconfig and that
      assumes the help text is indented by at least two spaces. If not, then the
      Kconfig becomes invalid and 'make menuconfig' fails.
      
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Reported-by: default avatarThomas Kaiser <linux-dvb@kaiser-linux.li>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      561b29e4
  18. 27 Aug, 2017 1 commit
  19. 26 Aug, 2017 1 commit
  20. 20 Aug, 2017 2 commits
  21. 09 Aug, 2017 1 commit
  22. 24 Jun, 2017 1 commit
  23. 16 Jun, 2017 2 commits
    • Johannes Berg's avatar
      networking: make skb_put & friends return void pointers · 4df864c1
      Johannes Berg authored
      
      
      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: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4df864c1
    • Johannes Berg's avatar
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg authored
      
      
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      
      Reviewed-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59ae1d12
  24. 10 Apr, 2017 1 commit
  25. 22 Mar, 2017 1 commit
  26. 03 Feb, 2017 1 commit
  27. 27 Jan, 2017 1 commit
    • Sakari Ailus's avatar
      [media] media: Drop FSF's postal address from the source code files · bcb63314
      Sakari Ailus authored
      
      
      Drop the FSF's postal address from the source code files that typically
      contain mostly the license text. Of the 628 removed instances, 578 are
      outdated.
      
      The patch has been created with the following command without manual edits:
      
      git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \
      	drivers/media/ include/media|while read i; do i=$i perl -e '
      open(F,"< $ENV{i}");
      $a=join("", <F>);
      $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m
      	&& $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m;
      close(F);
      open(F, "> $ENV{i}");
      print F $a;
      close(F);'; done
      
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      bcb63314
  28. 18 Nov, 2016 1 commit