[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPBb6MVRA_tBwg_r-Z8Rx7pUkR8W47CN1dqWH5uk+_1ONhViog@mail.gmail.com>
Date: Fri, 14 Jun 2019 19:18:09 +0900
From: Alexandre Courbot <acourbot@...omium.org>
To: Joe Perches <joe@...ches.com>
Cc: Tiffany Lin <tiffany.lin@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Yunfei Dong <yunfei.dong@...iatek.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
linux-mediatek@...ts.infradead.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] media: mtk-vcodec: remove unneeded proxy functions
On Fri, Jun 14, 2019 at 6:11 PM Joe Perches <joe@...ches.com> wrote:
>
> On Fri, 2019-06-14 at 16:56 +0900, Alexandre Courbot wrote:
> > We were getting the codec interface through a proxy function that does
> > not bring anything compared to just accessing the interface definition
> > directly, so just do that. Also make the decoder interfaces const.
> []
> > diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c
> []
> > @@ -485,16 +485,9 @@ static int vdec_h264_get_param(void *h_vdec, enum vdec_get_param_type type,
> > return 0;
> > }
> >
> > -static struct vdec_common_if vdec_h264_if = {
> > +const struct vdec_common_if vdec_h264_if = {
>
> probably better to fixup whatever chains prevent
> this (if any) from being static const
These are defined in per-codec source files and selected at runtime by
vdec_drv_if.c, so I don't think we can avoid declaring at least
something? The previous approach was to declare a function, but as you
can see we can remove quite some code by exporting the structs
directly.
Powered by blists - more mailing lists