20 Aug, 2017

1 commit

  • These vb2_ops structures are only stored in the ops field of a
    vb2_queue structure, which is declared as const. Thus the vb2_ops
    structures themselves can be const.

    Done with the help of Coccinelle.

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct vb2_ops i@p = { ... };

    @ok@
    identifier r.i;
    struct vb2_queue e;
    position p;
    @@
    e.ops = &i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct vb2_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct vb2_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     

09 Jul, 2016

2 commits


10 May, 2016

1 commit

  • With the new autoksyms support, we can run into a situation where
    the v4l pci skeleton module is the only one using some exported
    symbols that get dropped because they are never referenced by
    the kernel otherwise, causing a build problem:

    ERROR: "vb2_dma_contig_memops" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "vb2_dma_contig_init_ctx_attrs" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "v4l2_match_dv_timings" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "v4l2_find_dv_timings_cap" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "v4l2_valid_dv_timings" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "v4l2_enum_dv_timings_cap" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
    ERROR: "vb2_dma_contig_cleanup_ctx" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!

    Specifically, we do look in the samples directory for users of
    symbols, but not the Documentation directory.

    This solves the build problem by moving the connector sample into
    the same directory as the other samples.

    Fixes: 23121ca2b56b ("kbuild: create/adjust generated/autoksyms.h")

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann