media: stm32-dcmi: fix unnecessary parentheses
Fix unnecessary parentheses in if conditions. Detected by checkpatch.pl --strict. Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
a1029f552c
commit
b4ee319480
@@ -477,7 +477,7 @@ static void dcmi_buf_queue(struct vb2_buffer *vb)
|
|||||||
|
|
||||||
spin_lock_irq(&dcmi->irqlock);
|
spin_lock_irq(&dcmi->irqlock);
|
||||||
|
|
||||||
if ((dcmi->state == RUNNING) && (!dcmi->active)) {
|
if (dcmi->state == RUNNING && !dcmi->active) {
|
||||||
dcmi->active = buf;
|
dcmi->active = buf;
|
||||||
|
|
||||||
dev_dbg(dcmi->dev, "Starting capture on buffer[%d] queued\n",
|
dev_dbg(dcmi->dev, "Starting capture on buffer[%d] queued\n",
|
||||||
@@ -730,7 +730,7 @@ static void __find_outer_frame_size(struct stm32_dcmi *dcmi,
|
|||||||
int h_err = (fsize->height - pix->height);
|
int h_err = (fsize->height - pix->height);
|
||||||
int err = w_err + h_err;
|
int err = w_err + h_err;
|
||||||
|
|
||||||
if ((w_err >= 0) && (h_err >= 0) && (err < min_err)) {
|
if (w_err >= 0 && h_err >= 0 && err < min_err) {
|
||||||
min_err = err;
|
min_err = err;
|
||||||
match = fsize;
|
match = fsize;
|
||||||
}
|
}
|
||||||
@@ -1065,10 +1065,10 @@ static int dcmi_s_selection(struct file *file, void *priv,
|
|||||||
r.top = clamp_t(s32, r.top, 0, pix.height - r.height);
|
r.top = clamp_t(s32, r.top, 0, pix.height - r.height);
|
||||||
r.left = clamp_t(s32, r.left, 0, pix.width - r.width);
|
r.left = clamp_t(s32, r.left, 0, pix.width - r.width);
|
||||||
|
|
||||||
if (!((r.top == dcmi->sd_bounds.top) &&
|
if (!(r.top == dcmi->sd_bounds.top &&
|
||||||
(r.left == dcmi->sd_bounds.left) &&
|
r.left == dcmi->sd_bounds.left &&
|
||||||
(r.width == dcmi->sd_bounds.width) &&
|
r.width == dcmi->sd_bounds.width &&
|
||||||
(r.height == dcmi->sd_bounds.height))) {
|
r.height == dcmi->sd_bounds.height)) {
|
||||||
/* Crop if request is different than sensor resolution */
|
/* Crop if request is different than sensor resolution */
|
||||||
dcmi->do_crop = true;
|
dcmi->do_crop = true;
|
||||||
dcmi->crop = r;
|
dcmi->crop = r;
|
||||||
|
|||||||
Reference in New Issue
Block a user