1. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      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: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  2. 01 11月, 2017 1 次提交
  3. 24 9月, 2017 1 次提交
    • H
      media: fix media Kconfig help syntax issues · 561b29e4
      Hans Verkuil 提交于
      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: NHans Verkuil <hans.verkuil@cisco.com>
      Reported-by: NThomas Kaiser <linux-dvb@kaiser-linux.li>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      561b29e4
  4. 20 8月, 2017 3 次提交
  5. 26 7月, 2017 1 次提交
  6. 23 6月, 2017 1 次提交
  7. 14 6月, 2017 1 次提交
  8. 06 6月, 2017 1 次提交
  9. 19 5月, 2017 1 次提交
    • M
      [media] media drivers: annotate fall-through · 06eeefe8
      Mauro Carvalho Chehab 提交于
      Avoid warnings like those:
      
      drivers/media/pci/ddbridge/ddbridge-core.c: In function 'dvb_input_detach':
      drivers/media/pci/ddbridge/ddbridge-core.c:787:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (input->fe) {
            ^
      drivers/media/pci/ddbridge/ddbridge-core.c:792:2: note: here
        case 4:
        ^~~~
      ...
      
      On several cases, it is just that gcc 7.1 is not capable of
      understanding the comment, but on other places, we need an
      annotation.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      06eeefe8
  10. 28 2月, 2017 1 次提交
  11. 08 2月, 2017 1 次提交
    • M
      [media] media: exynos4-is: add flags to dummy Exynos IS i2c adapter · 91f2a7b2
      Marek Szyprowski 提交于
      Add simple 'functionality' member to dummy Exynos IS i2c adapter to make
      i2c core happy and get rid of NULL pointer dereference during Exynos4 IS
      probe since v4.10-rc1:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      pgd = c0004000
      [00000000] *pgd=00000000
      Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 1 PID: 100 Comm: kworker/1:2 Not tainted 4.10.0-rc6-next-20170131-00054-g39e6e4233de6 #1921
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      Workqueue: events deferred_probe_work_func
      task: ef2e0000 task.stack: ef2ec000
      PC is at 0x0
      LR is at i2c_register_adapter+0x98/0x5cc
      ...
      [<c05040bc>] (i2c_register_adapter) from [<c05379d4>] (fimc_is_i2c_probe+0x84/0xe4)
      [<c05379d4>] (fimc_is_i2c_probe) from [<c041b5c8>] (platform_drv_probe+0x50/0xb0)
      [<c041b5c8>] (platform_drv_probe) from [<c0419f48>] (driver_probe_device+0x234/0x2dc)
      [<c0419f48>] (driver_probe_device) from [<c04184e0>] (bus_for_each_drv+0x44/0x8c)
      [<c04184e0>] (bus_for_each_drv) from [<c0419c8c>] (__device_attach+0x9c/0x100)
      [<c0419c8c>] (__device_attach) from [<c0419374>] (bus_probe_device+0x84/0x8c)
      [<c0419374>] (bus_probe_device) from [<c04178d4>] (device_add+0x380/0x528)
      [<c04178d4>] (device_add) from [<c05aceb4>] (of_platform_device_create_pdata+0x70/0xa4)
      [<c05aceb4>] (of_platform_device_create_pdata) from [<c05acfd4>] (of_platform_bus_create+0xec/0x320)
      [<c05acfd4>] (of_platform_bus_create) from [<c05ad264>] (of_platform_populate+0x5c/0xac)
      [<c05ad264>] (of_platform_populate) from [<c0533420>] (fimc_is_probe+0x1c0/0x4cc)
      [<c0533420>] (fimc_is_probe) from [<c041b5c8>] (platform_drv_probe+0x50/0xb0)
      [<c041b5c8>] (platform_drv_probe) from [<c0419f48>] (driver_probe_device+0x234/0x2dc)
      [<c0419f48>] (driver_probe_device) from [<c04184e0>] (bus_for_each_drv+0x44/0x8c)
      [<c04184e0>] (bus_for_each_drv) from [<c0419c8c>] (__device_attach+0x9c/0x100)
      [<c0419c8c>] (__device_attach) from [<c0419374>] (bus_probe_device+0x84/0x8c)
      [<c0419374>] (bus_probe_device) from [<c04197a8>] (deferred_probe_work_func+0x60/0x8c)
      [<c04197a8>] (deferred_probe_work_func) from [<c01329a4>] (process_one_work+0x120/0x31c)
      [<c01329a4>] (process_one_work) from [<c0132bc8>] (process_scheduled_works+0x28/0x38)
      [<c0132bc8>] (process_scheduled_works) from [<c0132ddc>] (worker_thread+0x204/0x4ac)
      [<c0132ddc>] (worker_thread) from [<c01381b8>] (kthread+0xfc/0x134)
      [<c01381b8>] (kthread) from [<c01078b8>] (ret_from_fork+0x14/0x3c)
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      91f2a7b2
  12. 04 2月, 2017 1 次提交
  13. 31 1月, 2017 3 次提交
  14. 28 1月, 2017 1 次提交
    • S
      [media] media: Rename graph and pipeline structs and functions · 20b85227
      Sakari Ailus 提交于
      The media_entity_pipeline_start() and media_entity_pipeline_stop()
      functions are renamed as media_pipeline_start() and media_pipeline_stop(),
      respectively. The reason is two-fold: the pipeline struct is, rightly,
      already called media_pipeline (rather than media_entity_pipeline) and what
      this really is about is a pipeline. A pipeline consists of entities ---
      and, well, other objects embedded in these entities.
      
      As the pipeline object will be in the future moved from entities to pads
      in order to support multiple pipelines through a single entity, do the
      renaming now.
      
      Similarly, functions operating on struct media_entity_graph as well as the
      struct itself are renamed by dropping the "entity_" part from the prefix
      of the function family and the data structure. The graph traversal which
      is what the functions are about is not specifically about entities only
      and will operate on pads for the same reason as the media pipeline.
      
      The patch has been generated using the following command:
      
      git grep -l media_entity |xargs perl -i -pe '
      	s/media_entity_pipeline/media_pipeline/g;
      	s/media_entity_graph/media_graph/g'
      
      And a few manual edits related to line start alignment and line wrapping.
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      20b85227
  15. 17 11月, 2016 1 次提交
  16. 21 10月, 2016 1 次提交
    • M
      [media] exynos4-is: don't break long lines · 57425dc7
      Mauro Carvalho Chehab 提交于
      Due to the 80-cols restrictions, and latter due to checkpatch
      warnings, several strings were broken into multiple lines. This
      is not considered a good practice anymore, as it makes harder
      to grep for strings at the source code.
      
      As we're right now fixing other drivers due to KERN_CONT, we need
      to be able to identify what printk strings don't end with a "\n".
      It is a way easier to detect those if we don't break long lines.
      
      So, join those continuation lines.
      
      The patch was generated via the script below, and manually
      adjusted if needed.
      
      </script>
      use Text::Tabs;
      while (<>) {
      	if ($next ne "") {
      		$c=$_;
      		if ($c =~ /^\s+\"(.*)/) {
      			$c2=$1;
      			$next =~ s/\"\n$//;
      			$n = expand($next);
      			$funpos = index($n, '(');
      			$pos = index($c2, '",');
      			if ($funpos && $pos > 0) {
      				$s1 = substr $c2, 0, $pos + 2;
      				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
      				$s2 =~ s/^\s+//;
      
      				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
      
      				print unexpand("$next$s1\n");
      				print unexpand("$s2\n") if ($s2 ne "");
      			} else {
      				print "$next$c2\n";
      			}
      			$next="";
      			next;
      		} else {
      			print $next;
      		}
      		$next="";
      	} else {
      		if (m/\"$/) {
      			if (!m/\\n\"$/) {
      				$next=$_;
      				next;
      			}
      		}
      	}
      	print $_;
      }
      </script>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      57425dc7
  17. 22 9月, 2016 5 次提交
  18. 20 9月, 2016 1 次提交
  19. 09 9月, 2016 1 次提交
  20. 25 8月, 2016 2 次提交
  21. 09 7月, 2016 3 次提交
    • H
      [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs · 36c0f8b3
      Hans Verkuil 提交于
      Make this a proper typed array. Drop the old allocate context code since
      that is no longer used.
      
      Note that the memops functions now get a struct device pointer instead of
      the struct device ** that was there initially (actually a void pointer to
      a struct containing only a struct device pointer).
      
      This code is now a lot cleaner.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Sakari Ailus <sakari.ailus@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      36c0f8b3
    • H
      [media] media/platform: convert drivers to use the new vb2_queue dev field · 2548fee6
      Hans Verkuil 提交于
      Stop using alloc_ctx and just fill in the device pointer.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      2548fee6
    • S
      [media] exynos4-is: Fix buffer release issue on fimc m2m video nodes · f61d5008
      Sylwester Nawrocki 提交于
      This fixes dropping ownership of buffers in the driver's stop_streaming
      callback, so buffers on the memory-to-memory video nodes are properly
      released, also in case when the driver has a buffer only on one of the
      queues (OUTPUT, CAPTURE) before the video node close.
      The issue was being reported by videobuf2 with a following warning while
      checking q->owned_by_drv_count:
      
      [ 2498.310766] WARNING: CPU: 0 PID: 9358 at drivers/media/v4l2-core/videobuf2-core.c:1818 __vb2_queue_cancel+0xe8/0x14c
      [ 2498.320258] Modules linked in:
      [ 2498.323212] CPU: 0 PID: 9358 Comm: v4l2_decode Not tainted 4.7.0-rc4-next-20160627 #1210
      [ 2498.331284] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [ 2498.331327] [<c010d738>] (unwind_backtrace) from [<c010a4b0>] (show_stack+0x10/0x14)
      [ 2498.331344] [<c010a4b0>] (show_stack) from [<c031a4ac>] (dump_stack+0x74/0x94)
      [ 2498.331358] [<c031a4ac>] (dump_stack) from [<c011a52c>] (__warn+0xd4/0x100)
      [ 2498.331369] [<c011a52c>] (__warn) from [<c011a578>] (warn_slowpath_null+0x20/0x28)
      [ 2498.331381] [<c011a578>] (warn_slowpath_null) from [<c04ed420>] (__vb2_queue_cancel+0xe8/0x14c)
      [ 2498.331395] [<c04ed420>] (__vb2_queue_cancel) from [<c04ee10c>] (vb2_core_queue_release+0x18/0x38)
      [ 2498.331406] [<c04ee10c>] (vb2_core_queue_release) from [<c04eab50>] (v4l2_m2m_ctx_release+0x1c/0x28)
      [ 2498.331420] [<c04eab50>] (v4l2_m2m_ctx_release) from [<c04fe184>] (fimc_m2m_release+0x24/0x78)
      [ 2498.331437] [<c04fe184>] (fimc_m2m_release) from [<c04d76c8>] (v4l2_release+0x34/0x74)
      [ 2498.331455] [<c04d76c8>] (v4l2_release) from [<c01dc8d4>] (__fput+0x80/0x1bc)
      [ 2498.331469] [<c01dc8d4>] (__fput) from [<c0132edc>] (task_work_run+0xc0/0xe4)
      [ 2498.331482] [<c0132edc>] (task_work_run) from [<c011d460>] (do_exit+0x304/0xa24)
      [ 2498.331493] [<c011d460>] (do_exit) from [<c011dccc>] (do_group_exit+0x3c/0xbc)
      [ 2498.331505] [<c011dccc>] (do_group_exit) from [<c0126cac>] (get_signal+0x200/0x65c)
      [ 2498.331517] [<c0126cac>] (get_signal) from [<c010e928>] (do_signal+0x84/0x3c4)
      [ 2498.331532] [<c010e928>] (do_signal) from [<c010a0ec>] (do_work_pending+0xa4/0xb4)
      [ 2498.331545] [<c010a0ec>] (do_work_pending) from [<c0107954>] (slow_work_pending+0xc/0x20)
      Reported-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NKamil Debski <k.debski@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      f61d5008
  22. 24 6月, 2016 1 次提交
    • M
      exynos4-is: remove some unused vars · 21ed2034
      Mauro Carvalho Chehab 提交于
      Gcc 6.1 warns about some unused vars and functions. Remove them:
      
      drivers/media/platform/exynos4-is/mipi-csis.c:665:46: warning: 's5pcsis_sd_internal_ops' defined but not used [-Wunused-const-variable=]
       static const struct v4l2_subdev_internal_ops s5pcsis_sd_internal_ops = {
                                                    ^~~~~~~~~~~~~~~~~~~~~~~
      
      drivers/media/platform/exynos4-is/mipi-csis.c:652:12: warning: 's5pcsis_open' defined but not used [-Wunused-function]
       static int s5pcsis_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
                  ^~~~~~~~~~~~
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      21ed2034
  23. 03 6月, 2016 1 次提交
  24. 02 5月, 2016 1 次提交
  25. 14 4月, 2016 4 次提交
  26. 05 3月, 2016 1 次提交