From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbdEBSwr (ORCPT ); Tue, 2 May 2017 14:52:47 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:36373 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbdEBSwp (ORCPT ); Tue, 2 May 2017 14:52:45 -0400 Date: Tue, 2 May 2017 11:52:41 -0700 From: Bjorn Andersson To: Stanimir Varbanov Cc: Sakari Ailus , Mauro Carvalho Chehab , Hans Verkuil , Andy Gross , Stephen Boyd , Srinivas Kandagatla , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v8 05/10] media: venus: adding core part and helper functions Message-ID: <20170502185241.GX15143@minitux> References: <1493370837-19793-1-git-send-email-stanimir.varbanov@linaro.org> <1493370837-19793-6-git-send-email-stanimir.varbanov@linaro.org> <20170429222141.GK7456@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 02 May 01:52 PDT 2017, Stanimir Varbanov wrote: > Hei Sakari, > > On 04/30/2017 01:21 AM, Sakari Ailus wrote: > > Hi, Stan!! > > > > On Fri, Apr 28, 2017 at 12:13:52PM +0300, Stanimir Varbanov wrote: > > ... > >> +int helper_get_bufreq(struct venus_inst *inst, u32 type, > >> + struct hfi_buffer_requirements *req) > >> +{ > >> + u32 ptype = HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS; > >> + union hfi_get_property hprop; > >> + int ret, i; > > > > unsigned int i ? It's an array index... > > Thanks for pointing that out, I have to revisit all similar places as > well ... > It's perfectly fine to index an array with an int and you are comparing the index with a integer constant in the loop - so don't clutter the code unnecessarily. Regards, Bjorn