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 -- 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