Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636372

Re: [PATCH v8 05/10] media: venus: adding core part and helper functions

From Stanimir Varbanov <stanimir.varbanov@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v8 05/10] media: venus: adding core part and helper functions
Date 2017-05-05 15:30 +0200
Message-ID <tDLsZ-2gd-7@gated-at.bofh.it> (permalink)
References <tBaed-5ps-5@gated-at.bofh.it> <tBanU-5sv-21@gated-at.bofh.it> <tBJ2h-3vo-5@gated-at.bofh.it> <tCBP4-4jy-21@gated-at.bofh.it> <tCLbI-1Zs-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Bjorn

On 05/02/2017 09:52 PM, Bjorn Andersson wrote:
> 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.

I personally prefer unsigned for iterator variable type (because
unsigned type has defined behavior on overflow), but having the fact
that I'm comparing with int I will keep it int.

Also it seems that -Wsign-compare is not enabled by default in kernel,
no? So I have modified my Makefile and catch few occurrences of warnings
about signed with unsigned compare and fixed them.

-- 
regards,
Stan

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v8 00/10] Qualcomm video decoder/encoder driver Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-04-28 11:20 +0200
  [PATCH v8 06/10] media: venus: vdec: add video decoder files Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-04-28 11:20 +0200
  [PATCH v8 02/10] media: v4l2-mem2mem: extend m2m APIs for more accurate buffer management Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-04-28 11:20 +0200
    Re: [PATCH v8 02/10] media: v4l2-mem2mem: extend m2m APIs for more  accurate buffer management Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-05 13:40 +0200
  Re: [PATCH v8 05/10] media: venus: adding core part and helper  functions Jordan Crouse <jcrouse@codeaurora.org> - 2017-04-29 00:10 +0200
    Re: [PATCH v8 05/10] media: venus: adding core part and helper  functions Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-04-29 22:30 +0200
      Re: [PATCH v8 05/10] media: venus: adding core part and helper  functions Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-05-02 11:20 +0200
        Re: [PATCH v8 05/10] media: venus: adding core part and helper  functions Jordan Crouse <jcrouse@codeaurora.org> - 2017-05-03 15:50 +0200
  Re: [PATCH v8 05/10] media: venus: adding core part and helper  functions Sakari Ailus <sakari.ailus@iki.fi> - 2017-04-30 00:30 +0200
    Re: [PATCH v8 05/10] media: venus: adding core part and helper  functions Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-05-02 11:00 +0200
      Re: [PATCH v8 05/10] media: venus: adding core part and helper  functions Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-02 21:00 +0200
        Re: [PATCH v8 05/10] media: venus: adding core part and helper  functions Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-05-05 15:30 +0200
  Re: [PATCH v8 00/10] Qualcomm video decoder/encoder driver Hans Verkuil <hverkuil@xs4all.nl> - 2017-05-05 14:50 +0200
    Re: [PATCH v8 00/10] Qualcomm video decoder/encoder driver Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-05-05 15:50 +0200

csiph-web