From: Pavel Skripkin <paskripkin@gmail.com>
To: mchehab@kernel.org, sakari.ailus@linux.intel.com,
gregkh@linuxfoundation.org
Cc: linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Pavel Skripkin <paskripkin@gmail.com>
Subject: [PATCH v2] staging: media: atomisp: code cleanup
Date: Sat, 8 May 2021 13:51:29 +0300 [thread overview]
Message-ID: <20210508105129.2698-1-paskripkin@gmail.com> (raw)
In-Reply-To: <20210507075458.GB3@paasikivi.fi.intel.com>
Breaks are not useful after a return, they can
simply be removed.
Also, dropped the individual return statements
after or inside switch cases
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
Changes in v2:
dropped the individual return statements
---
.../hive_isp_css_common/host/input_system.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
index 0f5a231672a8..cbaaec620581 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
@@ -903,17 +903,10 @@ static input_system_err_t input_system_configure_channel(
error = input_system_configure_channel_sensor(channel);
break;
case INPUT_SYSTEM_SOURCE_TPG:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
case INPUT_SYSTEM_SOURCE_PRBS:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
case INPUT_SYSTEM_SOURCE_FIFO:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
default:
return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
}
if (error != INPUT_SYSTEM_ERR_NO_ERROR) return error;
@@ -995,7 +988,6 @@ static input_system_err_t input_buffer_configuration(void)
default:
config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
}
// Check acquisition buffer specified but set it later since it has to be unique.
@@ -1032,7 +1024,6 @@ static input_system_err_t input_buffer_configuration(void)
default:
return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
}
} else {
config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_BLOCKED;
@@ -1319,7 +1310,6 @@ static input_system_err_t configuration_to_registers(void)
default:
return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
} // end of switch (source_type)
@@ -1695,19 +1685,11 @@ static input_system_err_t input_system_configure_channel_sensor(
break;
case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
case INPUT_SYSTEM_XMEM_CAPTURE:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
case INPUT_SYSTEM_XMEM_ACQUIRE:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
default:
return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
}
- return INPUT_SYSTEM_ERR_NO_ERROR;
}
// Test flags and set structure.
--
2.31.1
next prev parent reply other threads:[~2021-05-08 10:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 20:09 [PATCH] staging: media: atomisp: remove useless breaks Pavel Skripkin
2021-05-07 7:54 ` Sakari Ailus
2021-05-07 13:25 ` Pavel Skripkin
2021-05-08 10:51 ` Pavel Skripkin [this message]
2021-05-08 10:58 ` [PATCH v2] staging: media: atomisp: code cleanup Greg KH
2021-05-08 11:32 ` Pavel Skripkin
2021-05-08 12:21 ` [PATCH v3 0/3] staging: media: atomisp: code clean up Pavel Skripkin
2021-05-08 12:21 ` [PATCH v3 1/3] staging: media: atomisp: remove useless breaks Pavel Skripkin
2021-05-08 12:21 ` [PATCH v3 2/3] staging: media: atomisp: remove dublicate code Pavel Skripkin
2021-05-08 12:21 ` [PATCH v3 3/3] staging: media: atomisp: remove useless returns Pavel Skripkin
2021-05-08 12:43 ` Fabio Aiuto
2021-05-08 12:48 ` Dan Carpenter
2021-05-08 12:59 ` Fabio Aiuto
2021-05-08 13:05 ` Pavel Skripkin
2021-05-08 13:16 ` [PATCH v4 0/3] staging: media: atomisp: code clean up Pavel Skripkin
2021-05-08 13:17 ` [PATCH v4 1/3] staging: media: atomisp: remove useless breaks Pavel Skripkin
2021-05-08 13:17 ` [PATCH v4 2/3] staging: media: atomisp: remove dublicate code Pavel Skripkin
2021-05-08 13:17 ` [PATCH v4 3/3] staging: media: atomisp: remove useless returns Pavel Skripkin
2021-05-25 16:18 ` [PATCH v4 0/3] staging: media: atomisp: code clean up Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210508105129.2698-1-paskripkin@gmail.com \
--to=paskripkin@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.