Merge tag 'media/v4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Aug 2016 13:59:37 +0000 (09:59 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Aug 2016 13:59:37 +0000 (09:59 -0400)
Pull media DocBook removal and some fixups from Mauro Carvalho Chehab:

  - removal of the media DocBook (since it's all in Sphinx now)

  - videobuf2: Fix an allocation regression

  - a few fixes related to the CEC drivers

* tag 'media/v4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] cec: fix off-by-one memset
  [media] staging: add MEDIA_SUPPORT dependency
  [media] vivid: don't handle CEC_MSG_SET_STREAM_PATH
  [media] media: adv7180: Fix broken interrupt register access
  [media] vb2: Fix allocation size of dma_parms
  [media] vim2m: copy the other colorspace-related fields as well
  [media] adv7511: fix VIC autodetect
  doc-rst: Remove the media docbook

1  2 
Documentation/DocBook/Makefile
Makefile
drivers/media/v4l2-core/videobuf2-dma-contig.c

index 8e6dd4b14314d4bca4c9439a1e04abbde591553c,2bfd664b5e358bb1f5e6bf51beb8f2dcf06f82f6..c481df33ef2150f54c84b2e8516881e8d839ef25
@@@ -16,11 -16,9 +16,9 @@@ DOCBOOKS := z8530book.xml device-driver
            genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
            80211.xml debugobjects.xml sh.xml regulator.xml \
            alsa-driver-api.xml writing-an-alsa-driver.xml \
-           tracepoint.xml media_api.xml w1.xml \
 -          tracepoint.xml gpu.xml w1.xml \
++          tracepoint.xml w1.xml \
            writing_musb_glue_layer.xml crypto-API.xml iio.xml
  
- include Documentation/DocBook/media/Makefile
  ###
  # The build process is as follows (targets):
  #              (xmldocs) [by docproc]
@@@ -49,7 -47,6 +47,6 @@@ pdfdocs: $(PDF
  HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
  htmldocs: $(HTML)
        $(call cmd,build_main_index)
-       $(call install_media_images)
  
  MAN := $(patsubst %.xml, %.9, $(BOOKS))
  mandocs: $(MAN)
@@@ -219,9 -216,6 +216,6 @@@ silent_gen_xml = 
  
  else
  
- # Needed, due to cleanmediadocs
- include Documentation/DocBook/media/Makefile
  htmldocs:
  pdfdocs:
  psdocs:
@@@ -269,7 -263,7 +263,7 @@@ clean-files := $(DOCBOOKS) 
  
  clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
  
- cleandocs: cleanmediadocs
+ cleandocs:
        $(Q)rm -f $(call objectify, $(clean-files))
        $(Q)rm -rf $(call objectify, $(clean-dirs))
  
diff --combined Makefile
index 182a84d0b8ea0fc1073a48bf08ea72c10b2c5301,b92fd9e081d97ef81defe1e119761bd7e0e6b8ca..35603556023e0d36a680d87c45bbb6fd36cd5fd0
+++ b/Makefile
@@@ -371,27 -371,26 +371,27 @@@ CFLAGS_KERNEL   
  AFLAGS_KERNEL =
  LDFLAGS_vmlinux =
  CFLAGS_GCOV   = -fprofile-arcs -ftest-coverage -fno-tree-loop-im
 -CFLAGS_KCOV   = -fsanitize-coverage=trace-pc
 +CFLAGS_KCOV   := $(call cc-option,-fsanitize-coverage=trace-pc,)
  
  
  # Use USERINCLUDE when you must reference the UAPI directories only.
  USERINCLUDE    := \
                -I$(srctree)/arch/$(hdr-arch)/include/uapi \
 -              -Iarch/$(hdr-arch)/include/generated/uapi \
 +              -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \
                -I$(srctree)/include/uapi \
 -              -Iinclude/generated/uapi \
 +              -I$(objtree)/include/generated/uapi \
                  -include $(srctree)/include/linux/kconfig.h
  
  # Use LINUXINCLUDE when you must reference the include/ directory.
  # Needed to be compatible with the O= option
  LINUXINCLUDE    := \
                -I$(srctree)/arch/$(hdr-arch)/include \
 -              -Iarch/$(hdr-arch)/include/generated/uapi \
 -              -Iarch/$(hdr-arch)/include/generated \
 +              -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \
 +              -I$(objtree)/arch/$(hdr-arch)/include/generated \
                $(if $(KBUILD_SRC), -I$(srctree)/include) \
 -              -Iinclude \
 -              $(USERINCLUDE)
 +              -I$(objtree)/include
 +
 +LINUXINCLUDE  += $(filter-out $(LINUXINCLUDE),$(USERINCLUDE))
  
  KBUILD_CPPFLAGS := -D__KERNEL__
  
@@@ -555,7 -554,7 +555,7 @@@ ifeq ($(KBUILD_EXTMOD),
  # in parallel
  PHONY += scripts
  scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
 -       asm-generic
 +       asm-generic gcc-plugins
        $(Q)$(MAKE) $(build)=$(@)
  
  # Objects we will link into vmlinux / subdirs we need to visit
@@@ -635,15 -634,6 +635,15 @@@ endi
  # Tell gcc to never replace conditional load with a non-conditional one
  KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
  
 +PHONY += gcc-plugins
 +gcc-plugins: scripts_basic
 +ifdef CONFIG_GCC_PLUGINS
 +      $(Q)$(MAKE) $(build)=scripts/gcc-plugins
 +endif
 +      @:
 +
 +include scripts/Makefile.gcc-plugins
 +
  ifdef CONFIG_READABLE_ASM
  # Disable optimizations that make assembler listings hard to read.
  # reorder blocks reorders the control in the function
@@@ -675,11 -665,21 +675,11 @@@ endi
  endif
  # Find arch-specific stack protector compiler sanity-checking script.
  ifdef CONFIG_CC_STACKPROTECTOR
 -  stackp-path := $(srctree)/scripts/gcc-$(ARCH)_$(BITS)-has-stack-protector.sh
 -  ifneq ($(wildcard $(stackp-path)),)
 -    stackp-check := $(stackp-path)
 -  endif
 +  stackp-path := $(srctree)/scripts/gcc-$(SRCARCH)_$(BITS)-has-stack-protector.sh
 +  stackp-check := $(wildcard $(stackp-path))
  endif
  KBUILD_CFLAGS += $(stackp-flag)
  
 -ifdef CONFIG_KCOV
 -  ifeq ($(call cc-option, $(CFLAGS_KCOV)),)
 -    $(warning Cannot use CONFIG_KCOV: \
 -             -fsanitize-coverage=trace-pc is not supported by compiler)
 -    CFLAGS_KCOV =
 -  endif
 -endif
 -
  ifeq ($(cc-name),clang)
  KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
  KBUILD_CPPFLAGS += $(call cc-option,-Wno-unknown-warning-option,)
@@@ -1018,7 -1018,7 +1018,7 @@@ prepare1: prepare2 $(version_h) include
  
  archprepare: archheaders archscripts prepare1 scripts_basic
  
 -prepare0: archprepare
 +prepare0: archprepare gcc-plugins
        $(Q)$(MAKE) $(build)=.
  
  # All the preparing..
@@@ -1432,7 -1432,7 +1432,7 @@@ $(help-board-dirs): help-%
  
  # Documentation targets
  # ---------------------------------------------------------------------------
- DOC_TARGETS := xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs cleanmediadocs
+ DOC_TARGETS := xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs
  PHONY += $(DOC_TARGETS)
  $(DOC_TARGETS): scripts_basic FORCE
        $(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype
@@@ -1530,7 -1530,6 +1530,7 @@@ clean: $(clean-dirs
                -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
                -o -name '*.symtypes' -o -name 'modules.order' \
                -o -name modules.builtin -o -name '.tmp_*.o.*' \
 +              -o -name '*.c.[012]*.*' \
                -o -name '*.gcno' \) -type f -print | xargs rm -f
  
  # Generate tags for editors
@@@ -1641,7 -1640,7 +1641,7 @@@ endi
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
  # Make sure the latest headers are built for Documentation
 -Documentation/: headers_install
 +Documentation/ samples/: headers_install
  %/: prepare scripts FORCE
        $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
index b09b2c9b6b63b24b5f2b068bfcd5572ca4a00c17,fe50a0420c7c9c16ed6a8ecf9d85c24e2a4b21b6..59fa204b15f32d9a184e9881172b731f4b070480
@@@ -27,7 -27,7 +27,7 @@@ struct vb2_dc_buf 
        unsigned long                   size;
        void                            *cookie;
        dma_addr_t                      dma_addr;
 -      struct dma_attrs                attrs;
 +      unsigned long                   attrs;
        enum dma_data_direction         dma_dir;
        struct sg_table                 *dma_sgt;
        struct frame_vector             *vec;
@@@ -130,12 -130,12 +130,12 @@@ static void vb2_dc_put(void *buf_priv
                kfree(buf->sgt_base);
        }
        dma_free_attrs(buf->dev, buf->size, buf->cookie, buf->dma_addr,
 -                      &buf->attrs);
 +                     buf->attrs);
        put_device(buf->dev);
        kfree(buf);
  }
  
 -static void *vb2_dc_alloc(struct device *dev, const struct dma_attrs *attrs,
 +static void *vb2_dc_alloc(struct device *dev, unsigned long attrs,
                          unsigned long size, enum dma_data_direction dma_dir,
                          gfp_t gfp_flags)
  {
                return ERR_PTR(-ENOMEM);
  
        if (attrs)
 -              buf->attrs = *attrs;
 +              buf->attrs = attrs;
        buf->cookie = dma_alloc_attrs(dev, size, &buf->dma_addr,
 -                                      GFP_KERNEL | gfp_flags, &buf->attrs);
 +                                      GFP_KERNEL | gfp_flags, buf->attrs);
        if (!buf->cookie) {
                dev_err(dev, "dma_alloc_coherent of size %ld failed\n", size);
                kfree(buf);
                return ERR_PTR(-ENOMEM);
        }
  
 -      if (!dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, &buf->attrs))
 +      if ((buf->attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0)
                buf->vaddr = buf->cookie;
  
        /* Prevent the device from being released while the buffer is used */
@@@ -189,7 -189,7 +189,7 @@@ static int vb2_dc_mmap(void *buf_priv, 
        vma->vm_pgoff = 0;
  
        ret = dma_mmap_attrs(buf->dev, vma, buf->cookie,
 -              buf->dma_addr, buf->size, &buf->attrs);
 +              buf->dma_addr, buf->size, buf->attrs);
  
        if (ret) {
                pr_err("Remapping memory failed, error: %d\n", ret);
@@@ -372,7 -372,7 +372,7 @@@ static struct sg_table *vb2_dc_get_base
        }
  
        ret = dma_get_sgtable_attrs(buf->dev, sgt, buf->cookie, buf->dma_addr,
 -              buf->size, &buf->attrs);
 +              buf->size, buf->attrs);
        if (ret < 0) {
                dev_err(buf->dev, "failed to get scatterlist from DMA API\n");
                kfree(sgt);
@@@ -421,12 -421,15 +421,12 @@@ static void vb2_dc_put_userptr(void *bu
        struct page **pages;
  
        if (sgt) {
 -              DEFINE_DMA_ATTRS(attrs);
 -
 -              dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, &attrs);
                /*
                 * No need to sync to CPU, it's already synced to the CPU
                 * since the finish() memop will have been called before this.
                 */
                dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
 -                                 buf->dma_dir, &attrs);
 +                                 buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
                pages = frame_vector_pages(buf->vec);
                /* sgt should exist only if vector contains pages... */
                BUG_ON(IS_ERR(pages));
@@@ -481,6 -484,9 +481,6 @@@ static void *vb2_dc_get_userptr(struct 
        struct sg_table *sgt;
        unsigned long contig_size;
        unsigned long dma_align = dma_get_cache_alignment();
 -      DEFINE_DMA_ATTRS(attrs);
 -
 -      dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, &attrs);
  
        /* Only cache aligned DMA transfers are reliable */
        if (!IS_ALIGNED(vaddr | size, dma_align)) {
         * prepare() memop is called.
         */
        sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
 -                                    buf->dma_dir, &attrs);
 +                                    buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
        if (sgt->nents <= 0) {
                pr_err("failed to map scatterlist\n");
                ret = -EIO;
@@@ -566,7 -572,7 +566,7 @@@ out
  
  fail_map_sg:
        dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
 -                         buf->dma_dir, &attrs);
 +                         buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
  
  fail_sgt_init:
        sg_free_table(sgt);
@@@ -743,7 -749,7 +743,7 @@@ EXPORT_SYMBOL_GPL(vb2_dma_contig_memops
  int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size)
  {
        if (!dev->dma_parms) {
-               dev->dma_parms = kzalloc(sizeof(dev->dma_parms), GFP_KERNEL);
+               dev->dma_parms = kzalloc(sizeof(*dev->dma_parms), GFP_KERNEL);
                if (!dev->dma_parms)
                        return -ENOMEM;
        }
This page took 0.037995 seconds and 5 git commands to generate.