Skip to contentSkip to conversation

staging: atomisp: remove useless condition in if-statements

PATCH Superseded Daeseok Youn 2 participants 2 messages Mar 20, 2017

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 staging: atomisp: remove useless condition in if-statements

The css_pipe_id was checked with 'CSS_PIPE_ID_COPY' in previous if- statement. In this case, if the css_pipe_id equals to 'CSS_PIPE_ID_COPY', it could not enter the next if-statement. But the "next" if-statement has the condition to check whether the css_pipe_id equals to 'CSS_PIPE_ID_COPY' or not. It should be removed.

---
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c +2 -4
index 6bdd19e..929ed80 100644
@@ -910,8 +910,7 @@ static struct atomisp_video_pipe *__atomisp_get_pipe(
 	} else if (asd->run_mode->val = ATOMISP_RUN_MODE_VIDEO) {
 		/* For online video or SDV video pipe. */
 		if (css_pipe_id = CSS_PIPE_ID_VIDEO ||
-		    css_pipe_id = CSS_PIPE_ID_COPY ||
-		    css_pipe_id = CSS_PIPE_ID_YUVPP) {
+		    css_pipe_id = CSS_PIPE_ID_COPY) {
 			if (buf_type = CSS_BUFFER_TYPE_OUTPUT_FRAME)
 				return &asd->video_out_video_capture;
 			return &asd->video_out_preview;
@@ -919,8 +918,7 @@ static struct atomisp_video_pipe *__atomisp_get_pipe(
 	} else if (asd->run_mode->val = ATOMISP_RUN_MODE_PREVIEW) {
 		/* For online preview or ZSL preview pipe. */
 		if (css_pipe_id = CSS_PIPE_ID_PREVIEW ||
-		    css_pipe_id = CSS_PIPE_ID_COPY ||
-		    css_pipe_id = CSS_PIPE_ID_YUVPP)
+		    css_pipe_id = CSS_PIPE_ID_COPY)
 			return &asd->video_out_preview;
 	}
 	/* For capture pipe. */
Signature · 1 line
1.9.1
#1 lore raw
Quoted 7 lines · Daeseok Youn

The css_pipe_id was checked with 'CSS_PIPE_ID_COPY' in previous if- statement. In this case, if the css_pipe_id equals to 'CSS_PIPE_ID_COPY', it could not enter the next if-statement. But the "next" if-statement has the condition to check whether the css_pipe_id equals to 'CSS_PIPE_ID_COPY' or not. It should be removed.

The patch is correct but the changelog is not.

s/CSS_PIPE_ID_COPY/CSS_PIPE_ID_YUVPP/

regards,
dan carpenter