From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mauro Carvalho Chehab Subject: Re: [PATCH v6 5/6] media: rkvdec: Add the rkvdec driver Date: Mon, 2 Mar 2020 15:39:09 +0100 Message-ID: <20200302153909.4e90227d@coco.lan> References: <20200220163016.21708-1-ezequiel@collabora.com> <20200220163016.21708-6-ezequiel@collabora.com> <20200302145746.3e94c1d1@coco.lan> <20200302153529.4e2429e7@collabora.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20200302153529.4e2429e7-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Boris Brezillon Cc: Ezequiel Garcia , linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Laurent Pinchart , Rob Herring , Tomasz Figa , Nicolas Dufresne , kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org, Paul Kocialkowski , Jonas Karlman , Heiko Stuebner , Sakari Ailus , Hans Verkuil List-Id: linux-rockchip.vger.kernel.org Em Mon, 2 Mar 2020 15:35:29 +0100 Boris Brezillon escreveu: > On Mon, 2 Mar 2020 14:57:46 +0100 > Mauro Carvalho Chehab wrote: > > > > + for (j = 0; j < 3; j++) { > > > > Again a magic number. I guess this came from that big "M_N" table with 4 > > elements, right? Please use a define instead of hardcoding a number > > here. > > Nope, it's unrelated to the cabac_table size, it's related to how the > HW accesses the P/B reflists (there are 1 P reflist, and 2 B reflists, > hence the 3 here). Ah, ok! > I guess we can have a '#define NUM_REFLISTS 3'. Works for me. Please use NUM_REFLISTS on a consistent way, making it to reflect everywhere you might define or loop over those 3 reflists. Thanks, Mauro