* [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c
@ 2025-06-24 14:10 LiangCheng Wang
2025-06-24 14:14 ` Andy Shevchenko
0 siblings, 1 reply; 5+ messages in thread
From: LiangCheng Wang @ 2025-06-24 14:10 UTC (permalink / raw)
To: Andy Shevchenko, Hans de Goede, Mauro Carvalho Chehab,
Sakari Ailus, Greg Kroah-Hartman
Cc: linux-media, linux-kernel, linux-staging, LiangCheng Wang
Fix multiple checkpatch.pl ERRORs and coding style issues:
- Use tabs instead of spaces for indentation
- Move trailing `if` statements to multiline format
- Remove excessive space between type and asterisk in function
arguments
- Move assignment operator '=' to the same line for static struct
definitions
- Remove unnecessary line breaks in function definitions
This cleanup improves code readability and follows Linux kernel
coding standards.
Signed-off-by: LiangCheng Wang <zaq14760@gmail.com>
---
This patch fixes coding style violations detected by checkpatch.pl in the atomisp driver under staging.
- Use tabs instead of spaces for indentation
- Move trailing `if` statements to multiline format
- Remove excessive spaces between type and asterisk in function
arguments
- Move assignment operator '=' to the same line for static struct
definitions
- Remove unnecessary line breaks in function definitions
This cleanup improves code readability and follows Linux kernel coding standards.
---
Changes in v4:
- Moved assignment operator '=' to the same line for static struct definitions
- Remove unnecessary line breaks in function definitions
- Update commit message to reflect all the coding style fixes
- Link to v3: https://lore.kernel.org/r/20250622-bar-v3-1-4cc91ef01c3a@gmail.com
Changes in v3:
- Removed extra spaces between type and asterisk (e.g., `*to`) in function
declarations, as pointed out by Andy Shevchenko
- Update commit message to reflect all the coding style fixes
- Link to v2: https://lore.kernel.org/r/20250621-bar-v2-1-4e6cfc779614@gmail.com
Changes in v2:
- Fix patch subject prefix to "staging: media: atomisp:" to comply with media CI style.
- No other functional changes.
Link to v1: https://lore.kernel.org/r/20250621-bar-v1-1-5a3e7004462c@gmail.com
---
.../kernels/output/output_1.0/ia_css_output.host.c | 42 ++++++++++------------
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/output/output_1.0/ia_css_output.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/output/output_1.0/ia_css_output.host.c
index d09365e0c47104dbffbd455bfd649b9079f88c9c..560102e81aed7a56125a97f0fff8c46de440e74d 100644
--- a/drivers/staging/media/atomisp/pci/isp/kernels/output/output_1.0/ia_css_output.host.c
+++ b/drivers/staging/media/atomisp/pci/isp/kernels/output/output_1.0/ia_css_output.host.c
@@ -22,21 +22,18 @@ static const struct ia_css_output_configuration default_output_configuration = {
.info = (struct ia_css_frame_info *)NULL,
};
-static const struct ia_css_output0_configuration default_output0_configuration
- = {
+static const struct ia_css_output0_configuration default_output0_configuration = {
.info = (struct ia_css_frame_info *)NULL,
};
-static const struct ia_css_output1_configuration default_output1_configuration
- = {
+static const struct ia_css_output1_configuration default_output1_configuration = {
.info = (struct ia_css_frame_info *)NULL,
};
void
-ia_css_output_encode(
- struct sh_css_isp_output_params *to,
- const struct ia_css_output_config *from,
- unsigned int size)
+ia_css_output_encode(struct sh_css_isp_output_params *to,
+ const struct ia_css_output_config *from,
+ unsigned int size)
{
(void)size;
to->enable_hflip = from->enable_hflip;
@@ -44,7 +41,7 @@ ia_css_output_encode(
}
int ia_css_output_config(struct sh_css_isp_output_isp_config *to,
- const struct ia_css_output_configuration *from,
+ const struct ia_css_output_configuration *from,
unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS;
@@ -66,21 +63,21 @@ int ia_css_output_config(struct sh_css_isp_output_isp_config *to,
return 0;
}
-int ia_css_output0_config(struct sh_css_isp_output_isp_config *to,
+int ia_css_output0_config(struct sh_css_isp_output_isp_config *to,
const struct ia_css_output0_configuration *from,
unsigned int size)
{
return ia_css_output_config(to, (const struct ia_css_output_configuration *)from, size);
}
-int ia_css_output1_config(struct sh_css_isp_output_isp_config *to,
- const struct ia_css_output1_configuration *from,
+int ia_css_output1_config(struct sh_css_isp_output_isp_config *to,
+ const struct ia_css_output1_configuration *from,
unsigned int size)
{
return ia_css_output_config(to, (const struct ia_css_output_configuration *)from, size);
}
-int ia_css_output_configure(const struct ia_css_binary *binary,
+int ia_css_output_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
if (info) {
@@ -94,8 +91,8 @@ int ia_css_output_configure(const struct ia_css_binary *binary,
return 0;
}
-int ia_css_output0_configure(const struct ia_css_binary *binary,
- const struct ia_css_frame_info *info)
+int ia_css_output0_configure(const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *info)
{
if (info) {
struct ia_css_output0_configuration config =
@@ -108,7 +105,7 @@ int ia_css_output0_configure(const struct ia_css_binary *binary,
return 0;
}
-int ia_css_output1_configure(const struct ia_css_binary *binary,
+int ia_css_output1_configure(const struct ia_css_binary *binary,
const struct ia_css_frame_info *info)
{
if (info) {
@@ -123,11 +120,11 @@ int ia_css_output1_configure(const struct ia_css_binary *binary,
}
void
-ia_css_output_dump(
- const struct sh_css_isp_output_params *output,
- unsigned int level)
+ia_css_output_dump(const struct sh_css_isp_output_params *output,
+ unsigned int level)
{
- if (!output) return;
+ if (!output)
+ return;
ia_css_debug_dtrace(level, "Horizontal Output Flip:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
"enable", output->enable_hflip);
@@ -137,9 +134,8 @@ ia_css_output_dump(
}
void
-ia_css_output_debug_dtrace(
- const struct ia_css_output_config *config,
- unsigned int level)
+ia_css_output_debug_dtrace(const struct ia_css_output_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
"config.enable_hflip=%d",
---
base-commit: 3f75bfff44be0646580fe4efda45d646f9c1693b
change-id: 20250621-bar-573b8b40fb80
Best regards,
--
LiangCheng Wang <zaq14760@gmail.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c
2025-06-24 14:10 [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c LiangCheng Wang
@ 2025-06-24 14:14 ` Andy Shevchenko
2025-06-24 14:32 ` LiangCheng Wang
2025-06-24 15:19 ` LiangCheng Wang
0 siblings, 2 replies; 5+ messages in thread
From: Andy Shevchenko @ 2025-06-24 14:14 UTC (permalink / raw)
To: LiangCheng Wang
Cc: Andy Shevchenko, Hans de Goede, Mauro Carvalho Chehab,
Sakari Ailus, Greg Kroah-Hartman, linux-media, linux-kernel,
linux-staging
On Tue, Jun 24, 2025 at 5:10 PM LiangCheng Wang <zaq14760@gmail.com> wrote:
>
> Fix multiple checkpatch.pl ERRORs and coding style issues:
>
> - Use tabs instead of spaces for indentation
> - Move trailing `if` statements to multiline format
> - Remove excessive space between type and asterisk in function
> arguments
> - Move assignment operator '=' to the same line for static struct
> definitions
> - Remove unnecessary line breaks in function definitions
>
> This cleanup improves code readability and follows Linux kernel
> coding standards.
Thanks for a new version. Now the question is, is this the only file
in the whole (>90kLoCs!) driver that has such problems? If not, fix
them all and update Subject respectively,
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c
2025-06-24 14:14 ` Andy Shevchenko
@ 2025-06-24 14:32 ` LiangCheng Wang
2025-06-24 15:19 ` LiangCheng Wang
1 sibling, 0 replies; 5+ messages in thread
From: LiangCheng Wang @ 2025-06-24 14:32 UTC (permalink / raw)
To: andy
Cc: zaq14760, hansg, mchehab, sakari.ailus, gregkh, linux-media,
linux-kernel, linux-staging
Subject: Re: [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c
In-Reply-To: <20250624-bar-v4-1-9f9f9ae9f868@gmail.com>
Dear Andy,
Thank you for your feedback.
I will review the entire AtomISP driver for similar style issues.
If I find more, I will send an updated v5 patch accordingly.
Best regards,
LiangCheng Wang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c
2025-06-24 14:14 ` Andy Shevchenko
2025-06-24 14:32 ` LiangCheng Wang
@ 2025-06-24 15:19 ` LiangCheng Wang
2025-06-24 18:12 ` Andy Shevchenko
1 sibling, 1 reply; 5+ messages in thread
From: LiangCheng Wang @ 2025-06-24 15:19 UTC (permalink / raw)
To: andy
Cc: zaq14760, hansg, mchehab, sakari.ailus, gregkh, linux-media,
linux-kernel, linux-staging
Subject: Re: [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c
In-Reply-To: <CAHp75Ve_G=ziR7sJmKw4t3BRASogGQ1kWUsNNNWESFmmS4rVhw@mail.gmail.com>
Dear Andy,
Thank you for your suggestion.
You're right — the driver is quite large and contains many similar issues.
To keep the patches manageable and easier to review, I plan to split the cleanup into multiple smaller patches.
I'll start by submitting a series of patches, each focusing on a specific file or type of issue.
Since I’m contributing in my free time outside of work, I may need to spread the cleanup over several days.
I’ll do my best to keep the patches consistent and focused.
Thanks again for your guidance.
Best regards,
LiangCheng Wang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c
2025-06-24 15:19 ` LiangCheng Wang
@ 2025-06-24 18:12 ` Andy Shevchenko
0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2025-06-24 18:12 UTC (permalink / raw)
To: LiangCheng Wang
Cc: andy, hansg, mchehab, sakari.ailus, gregkh, linux-media,
linux-kernel, linux-staging
On Tue, Jun 24, 2025 at 6:20 PM LiangCheng Wang <zaq14760@gmail.com> wrote:
> You're right — the driver is quite large and contains many similar issues.
> To keep the patches manageable and easier to review, I plan to split the cleanup into multiple smaller patches.
> I'll start by submitting a series of patches, each focusing on a specific file or type of issue.
Please don't base on file, base only on type of issue. But cover
entire driver. And if you do some work with a script (shell,
coccinelle or similar), include the text in the comment or cover
letter so the maintainer may do the similar steps on their side and
check if the result is the same or so.
> Since I’m contributing in my free time outside of work, I may need to spread the cleanup over several days.
> I’ll do my best to keep the patches consistent and focused.
No problem, take your time and thanks for your help!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-24 18:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24 14:10 [PATCH v4] staging: media: atomisp: fix coding style in ia_css_output.host.c LiangCheng Wang
2025-06-24 14:14 ` Andy Shevchenko
2025-06-24 14:32 ` LiangCheng Wang
2025-06-24 15:19 ` LiangCheng Wang
2025-06-24 18:12 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).