Commit c5ea3e43 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: fix some bad indents

As smatch reports, there are several bad indents:

    drivers/staging/media/atomisp/pci/hmm/hmm.c:271 hmm_alloc() warn: inconsistent indenting
    drivers/staging/media/atomisp/pci/runtime/bufq/src/bufq.c:390 ia_css_bufq_enqueue_psys_event() warn: inconsistent indenting
    drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2132 ia_css_debug_dump_isys_state() warn: inconsistent indenting
    drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:246 sh_css_binary_get_sc_requirements() warn: inconsistent indenting
    drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:565 ia_css_binary_get_shading_info_type_1() warn: inconsistent indenting
    drivers/staging/media/atomisp/pci/sh_css.c:5109 sh_css_pipes_stop() warn: inconsistent indenting
    drivers/staging/media/atomisp/pci/sh_css.c:8791 ia_css_pipe_create() warn: inconsistent indenting

Some of them are due to ifdefs. Get rid of them by either getting
a common code that would work for both ISP2400 and ISP2401 or
by creating separate functions, one for each ISP version.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 5ad658c0
...@@ -268,9 +268,9 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type, ...@@ -268,9 +268,9 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type,
if (attrs & ATOMISP_MAP_FLAG_CLEARED) if (attrs & ATOMISP_MAP_FLAG_CLEARED)
hmm_set(bo->start, 0, bytes); hmm_set(bo->start, 0, bytes);
dev_dbg(atomisp_dev, dev_dbg(atomisp_dev,
"%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n", "%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n",
__func__, bo->start, bytes, type, from_highmem, userptr, cached); __func__, bo->start, bytes, type, from_highmem, userptr, cached);
return bo->start; return bo->start;
......
...@@ -385,8 +385,7 @@ int ia_css_bufq_enqueue_psys_event( ...@@ -385,8 +385,7 @@ int ia_css_bufq_enqueue_psys_event(
u8 evt_payload_1, u8 evt_payload_1,
uint8_t evt_payload_2) uint8_t evt_payload_2)
{ {
int error = 0;
int error = 0;
ia_css_queue_t *q; ia_css_queue_t *q;
IA_CSS_ENTER_PRIVATE("evt_id=%d", evt_id); IA_CSS_ENTER_PRIVATE("evt_id=%d", evt_id);
......
...@@ -2127,9 +2127,9 @@ void ia_css_debug_dump_isys_state(void) ...@@ -2127,9 +2127,9 @@ void ia_css_debug_dump_isys_state(void)
input_system_get_state(INPUT_SYSTEM0_ID, &state); input_system_get_state(INPUT_SYSTEM0_ID, &state);
#ifndef ISP2401 #ifndef ISP2401
debug_print_isys_state(&state); debug_print_isys_state(&state);
#else #else
input_system_dump_state(INPUT_SYSTEM0_ID, &state); input_system_dump_state(INPUT_SYSTEM0_ID, &state);
#endif #endif
} }
......
...@@ -5091,24 +5091,23 @@ sh_css_pipes_stop(struct ia_css_stream *stream) ...@@ -5091,24 +5091,23 @@ sh_css_pipes_stop(struct ia_css_stream *stream)
stream->pipes[i]->pipeline.pipe_id); stream->pipes[i]->pipeline.pipe_id);
err = ia_css_pipeline_request_stop(&stream->pipes[i]->pipeline); err = ia_css_pipeline_request_stop(&stream->pipes[i]->pipeline);
/* /*
* Exit this loop if "ia_css_pipeline_request_stop()" * Exit this loop if "ia_css_pipeline_request_stop()"
* returns the error code. * returns the error code.
* *
* The error code would be generated in the following * The error code would be generated in the following
* two cases: * two cases:
* (1) The Scalar Processor has already been stopped. * (1) The Scalar Processor has already been stopped.
* (2) The "Host->SP" event queue is full. * (2) The "Host->SP" event queue is full.
* *
* As the convention of using CSS API 2.0/2.1, such CSS * As the convention of using CSS API 2.0/2.1, such CSS
* error code would be propogated from the CSS-internal * error code would be propogated from the CSS-internal
* API returned value to the CSS API returned value. Then * API returned value to the CSS API returned value. Then
* the CSS driver should capture these error code and * the CSS driver should capture these error code and
* handle it in the driver exception handling mechanism. * handle it in the driver exception handling mechanism.
*/ */
if (err) { if (err)
goto ERR; goto ERR;
}
} }
/* /*
...@@ -8768,47 +8767,27 @@ ia_css_acc_pipe_create(struct ia_css_pipe *pipe) { ...@@ -8768,47 +8767,27 @@ ia_css_acc_pipe_create(struct ia_css_pipe *pipe) {
return err; return err;
} }
int int ia_css_pipe_create(const struct ia_css_pipe_config *config,
ia_css_pipe_create(const struct ia_css_pipe_config *config, struct ia_css_pipe **pipe)
struct ia_css_pipe **pipe) { {
#ifndef ISP2401
if (!config)
#else
int err = 0; int err = 0;
IA_CSS_ENTER_PRIVATE("config = %p, pipe = %p", config, pipe); IA_CSS_ENTER_PRIVATE("config = %p, pipe = %p", config, pipe);
if (!config) if (!config || !pipe) {
{
IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL); IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL);
#endif
return -EINVAL;
#ifndef ISP2401
if (!pipe)
#else
}
if (!pipe)
{
IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL);
#endif
return -EINVAL; return -EINVAL;
#ifndef ISP2401 }
return ia_css_pipe_create_extra(config, NULL, pipe);
#else
}
err = ia_css_pipe_create_extra(config, NULL, pipe); err = ia_css_pipe_create_extra(config, NULL, pipe);
if (err == 0) if (err == 0) {
{ IA_CSS_LOG("pipe created successfully = %p", *pipe);
IA_CSS_LOG("pipe created successfully = %p", *pipe); }
}
IA_CSS_LEAVE_ERR_PRIVATE(err); IA_CSS_LEAVE_ERR_PRIVATE(err);
return err; return err;
#endif
} }
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment