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
...@@ -385,7 +385,6 @@ int ia_css_bufq_enqueue_psys_event( ...@@ -385,7 +385,6 @@ 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;
......
...@@ -5106,10 +5106,9 @@ sh_css_pipes_stop(struct ia_css_stream *stream) ...@@ -5106,10 +5106,9 @@ sh_css_pipes_stop(struct ia_css_stream *stream)
* 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;
} }
}
/* /*
* In the CSS firmware use scenario "Continuous Preview" * In the CSS firmware use scenario "Continuous Preview"
...@@ -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; return -EINVAL;
#ifndef ISP2401 }
if (!pipe)
#else
}
if (!pipe)
{
IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL);
#endif
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