Re: [PATCH for v3.17] v4l2-ctrls: fix rounding calculation

2014-07-27 Thread Frank Schäfer
Am 26.07.2014 18:02, schrieb Hans Verkuil: > Commit 958c7c7e65 ("[media] v4l2-ctrls: fix corner case in round-to-range > code") broke > controls that use a negative range. > > The cause was a s32/u32 mixup: ctrl->step is unsigned while all others are > signed. So > the result type of the express

[PATCH for v3.17] v4l2-ctrls: fix rounding calculation

2014-07-26 Thread Hans Verkuil
Commit 958c7c7e65 ("[media] v4l2-ctrls: fix corner case in round-to-range code") broke controls that use a negative range. The cause was a s32/u32 mixup: ctrl->step is unsigned while all others are signed. So the result type of the expression '(ctrl)->maximum - ((ctrl)->step / 2)' became unsign