From: Boris Brezillon Subject: Re: [PATCH v2 2/3] media: uapi: Add VP9 stateless decoder controls Date: Sat, 2 May 2020 20:37:07 +0200 Message-ID: <20200502203707.402ea3cd@collabora.com> References: <20200410115113.31728-1-ezequiel@collabora.com> <20200410115113.31728-3-ezequiel@collabora.com> <9126475c-275d-71ab-0308-6ae85e22446b@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane-mx.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Ezequiel Garcia Cc: Heiko Stuebner , Alexandre Courbot , Jonas Karlman , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tomasz Figa , Hans Verkuil , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Jeffrey Kardatzke , kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org, linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rockchip.vger.kernel.org On Fri, 01 May 2020 13:57:49 -0300 Ezequiel Garcia wrote: > > > + > > > +.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}| > > > + > > > +.. flat-table:: enum v4l2_vp9_reset_frame_context > > > + :header-rows: 0 > > > + :stub-columns: 0 > > > + :widths: 1 2 > > > + > > > + * - ``V4L2_VP9_RESET_FRAME_CTX_NONE`` > > > + - Do not reset any frame context. > > > + * - ``V4L2_VP9_RESET_FRAME_CTX_NONE_ALT`` > > > + - Do not reset any frame context. This is an alternative value for > > > + V4L2_VP9_RESET_FRAME_CTX_NONE. > > > > Add `` around V4L2_VP9_RESET_FRAME_CTX_NONE. > > > > Hm, now that I look closer, what's the point > of having the NONE_ALT in our uAPI if it > has same meaning as NONE? > > I think it can be removed. The intent was to match the spec so that one can pass the value extracted from the bitstream directly. > > > > I got several smatch warnings: > > > > smatch: ERRORS > > drivers/media/v4l2-core/v4l2-ctrls.c:1880 validate_vp9_frame_decode_params() warn: was && intended here instead of ||? > > > > (Commented on this ^^^ one above) > > > > drivers/staging/media/rkvdec/rkvdec-vp9.c:426 init_intra_only_probs() error: buffer overflow 'ptr' 9 <= 69 > > drivers/staging/media/rkvdec/rkvdec-vp9.c:1478 rkvdec_vp9_done() error: potentially dereferencing uninitialized 'ctrl'. > > drivers/staging/media/rkvdec/rkvdec-vp9.c:1483 rkvdec_vp9_done() error: uninitialized symbol 'dec_dst_buf'. > > drivers/staging/media/rkvdec/rkvdec-vp9.c:941:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] > > drivers/staging/media/rkvdec/rkvdec-vp9.c:1466:40: warning: variable 'fctx' set but not used [-Wunused-but-set-variable] > > > > Oh, I'll run smatch and fix them all. Oops!