Re: [PATCH v5] videodev2: Set vb2_rect's width and height as unsigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

Is there anything that needs to be addressed on this patch?

Thanks!

On Fri, Nov 8, 2013 at 2:41 PM, Ricardo Ribalda Delgado
<ricardo.ribalda@xxxxxxxxx> wrote:
> Hello Sakari
>
> On Fri, Nov 8, 2013 at 11:39 AM, Sakari Ailus <sakari.ailus@xxxxxx> wrote:
>> On Fri, Nov 08, 2013 at 11:12:54AM +0100, Ricardo Ribalda Delgado wrote:
>> ...
>>> Also I am not aware of a reason why clamp_t is better than clamp (I am
>>> probably wrong here....). If there is a good reason for not using
>>> clamp_t I have no problem in reviewing again the patch and use
>>> unsigned constants.
>>
>> clamp_t() should only be used if you need to force a type for the clamping
>> operation. It's always better if you don't have to, and all the arguments
>> are of the same type: type casting can have an effect on the end result and
>> bugs related to that can be difficult to find.
>>
>
> But IMHO in these case, we will cause much more castings in other
> places. I find more descriptive a casting via clamp_t, than via ().
>
> Regards!
>
>> --
>> Kind regards,
>>
>> Sakari Ailus
>> e-mail: sakari.ailus@xxxxxx     XMPP: sailus@xxxxxxxxxxxxxx
>
>
>
> --
> Ricardo Ribalda



-- 
Ricardo Ribalda
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux