Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1566451
| From | "Lad, Prabhakar" <prabhakar.csengg@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] media: platform: constify vb2_ops structures |
| Date | 2017-01-25 11:20 +0100 |
| Message-ID | <t3sQi-sW-25@gated-at.bofh.it> (permalink) |
| References | <t20jo-2mk-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
Thanks for the patch.
On Sat, Jan 21, 2017 at 9:29 AM, Bhumika Goyal <bhumirks@gmail.com> wrote:
> Declare vb2_ops structures as const as they are only stored in
> the ops field of a vb2_queue structure. This field is of type
> const, so vb2_ops structures having same properties can be made
> const too.
> Done using Coccinelle:
>
> @r1 disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct vb2_ops i@p={...};
>
> @ok1@
> identifier r1.i;
> position p;
> struct sta2x11_vip vip;
> struct vb2_queue q;
> @@
> (
> vip.vb_vidq.ops=&i@p
> |
> q.ops=&i@p
> )
>
> @bad@
> position p!={r1.p,ok1.p};
> identifier r1.i;
> @@
> i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r1.i;
> @@
> +const
> struct vb2_ops i;
>
> Cross compiled the media/platform/blackfin/bfin_capture.o file for
> blackfin architecture.
>
> File size before:
> text data bss dec hex filename
> 6776 176 0 6952 1b28 platform/blackfin/bfin_capture.o
>
The description doesnt match the changes. Can you please split the
patches separately one for vpif_capture.c and vpif_display.c,
one for mtk_mdp_m2m.c and lastly for pxa_camera.c .
Cheers,
--Prabhakar Lad
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] media: platform: constify vb2_ops structures Bhumika Goyal <bhumirks@gmail.com> - 2017-01-21 10:40 +0100 Re: [PATCH] media: platform: constify vb2_ops structures "Lad, Prabhakar" <prabhakar.csengg@gmail.com> - 2017-01-25 11:20 +0100
csiph-web