* [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c
@ 2025-08-20 12:45 Adrian Barnaś
2025-08-20 13:04 ` Dan Carpenter
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Adrian Barnaś @ 2025-08-20 12:45 UTC (permalink / raw)
To: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
Andy Shevchenko, Greg Kroah-Hartman, linux-media, linux-kernel,
linux-staging
Cc: Adrian Barnaś
NFC: This patch cleans up coding style whitespace issues
in drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c
Fixes include:
- removal of unnecessary line breaks
- correcting spacing around operators
- correcting spaces between types and names
Signed-off-by: Adrian Barnaś <abarnas@google.com>
---
.../pci/hive_isp_css_common/host/gdc.c | 33 +++++++------------
1 file changed, 12 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c
index 8bb78b4d7c677..69d709888c05a 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c
@@ -14,10 +14,8 @@
/*
* Local function declarations
*/
-static inline void gdc_reg_store(
- const gdc_ID_t ID,
- const unsigned int reg,
- const hrt_data value);
+static inline void gdc_reg_store(const gdc_ID_t ID, const unsigned int reg,
+ const hrt_data value);
#ifndef __INLINE_GDC__
#include "gdc_private.h"
@@ -26,9 +24,7 @@ static inline void gdc_reg_store(
/*
* Exported function implementations
*/
-void gdc_lut_store(
- const gdc_ID_t ID,
- const int data[4][HRT_GDC_N])
+void gdc_lut_store(const gdc_ID_t ID, const int data[4][HRT_GDC_N])
{
unsigned int i, lut_offset = HRT_GDC_LUT_IDX;
@@ -36,15 +32,13 @@ void gdc_lut_store(
assert(HRT_GDC_LUT_COEFF_OFFSET <= (4 * sizeof(hrt_data)));
for (i = 0; i < HRT_GDC_N; i++) {
- hrt_data entry_0 = data[0][i] & HRT_GDC_BCI_COEF_MASK;
- hrt_data entry_1 = data[1][i] & HRT_GDC_BCI_COEF_MASK;
- hrt_data entry_2 = data[2][i] & HRT_GDC_BCI_COEF_MASK;
- hrt_data entry_3 = data[3][i] & HRT_GDC_BCI_COEF_MASK;
+ hrt_data entry_0 = data[0][i] & HRT_GDC_BCI_COEF_MASK;
+ hrt_data entry_1 = data[1][i] & HRT_GDC_BCI_COEF_MASK;
+ hrt_data entry_2 = data[2][i] & HRT_GDC_BCI_COEF_MASK;
+ hrt_data entry_3 = data[3][i] & HRT_GDC_BCI_COEF_MASK;
- hrt_data word_0 = entry_0 |
- (entry_1 << HRT_GDC_LUT_COEFF_OFFSET);
- hrt_data word_1 = entry_2 |
- (entry_3 << HRT_GDC_LUT_COEFF_OFFSET);
+ hrt_data word_0 = entry_0 | (entry_1 << HRT_GDC_LUT_COEFF_OFFSET);
+ hrt_data word_1 = entry_2 | (entry_3 << HRT_GDC_LUT_COEFF_OFFSET);
gdc_reg_store(ID, lut_offset++, word_0);
gdc_reg_store(ID, lut_offset++, word_1);
@@ -85,8 +79,7 @@ void gdc_lut_convert_to_isp_format(const int in_lut[4][HRT_GDC_N],
}
}
-int gdc_get_unity(
- const gdc_ID_t ID)
+int gdc_get_unity(const gdc_ID_t ID)
{
assert(ID < N_GDC_ID);
(void)ID;
@@ -96,10 +89,8 @@ int gdc_get_unity(
/*
* Local function implementations
*/
-static inline void gdc_reg_store(
- const gdc_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+static inline void gdc_reg_store(const gdc_ID_t ID, const unsigned int reg,
+ const hrt_data value)
{
ia_css_device_store_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data), value);
return;
--
2.51.0.rc1.167.g924127e9c0-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c
2025-08-20 12:45 [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c Adrian Barnaś
@ 2025-08-20 13:04 ` Dan Carpenter
2025-08-20 13:05 ` Greg Kroah-Hartman
2025-08-20 13:07 ` Andy Shevchenko
2 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2025-08-20 13:04 UTC (permalink / raw)
To: Adrian Barnaś
Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
Andy Shevchenko, Greg Kroah-Hartman, linux-media, linux-kernel,
linux-staging
On Wed, Aug 20, 2025 at 12:45:19PM +0000, Adrian Barnaś wrote:
> NFC: This patch cleans up coding style whitespace issues
What does "NFC" mean in this context? I only know it as the networking
protocol.
> in drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c
>
> Fixes include:
> - removal of unnecessary line breaks
> - correcting spacing around operators
> - correcting spaces between types and names
>
> Signed-off-by: Adrian Barnaś <abarnas@google.com>
> ---
[ snip ]
> @@ -85,8 +79,7 @@ void gdc_lut_convert_to_isp_format(const int in_lut[4][HRT_GDC_N],
> }
> }
>
> -int gdc_get_unity(
> - const gdc_ID_t ID)
> +int gdc_get_unity(const gdc_ID_t ID)
> {
> assert(ID < N_GDC_ID);
> (void)ID;
> @@ -96,10 +89,8 @@ int gdc_get_unity(
> /*
> * Local function implementations
> */
> -static inline void gdc_reg_store(
> - const gdc_ID_t ID,
> - const unsigned int reg,
> - const hrt_data value)
> +static inline void gdc_reg_store(const gdc_ID_t ID, const unsigned int reg,
^^^^^^^
Replace this tab with a space.
> + const hrt_data value)
> {
> ia_css_device_store_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data), value);
> return;
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c
2025-08-20 12:45 [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c Adrian Barnaś
2025-08-20 13:04 ` Dan Carpenter
@ 2025-08-20 13:05 ` Greg Kroah-Hartman
2025-08-20 13:07 ` Andy Shevchenko
2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2025-08-20 13:05 UTC (permalink / raw)
To: Adrian Barnaś
Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
Andy Shevchenko, linux-media, linux-kernel, linux-staging
On Wed, Aug 20, 2025 at 12:45:19PM +0000, Adrian Barnaś wrote:
> NFC: This patch cleans up coding style whitespace issues
> in drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c
What does "NFC:" mean?
And take a look at the kernel documentation, it recommends not using
stuff like "This patch", but write it in an imperitive mode:
Clean up coding style whitespace issues in...
hope this helps,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c
2025-08-20 12:45 [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c Adrian Barnaś
2025-08-20 13:04 ` Dan Carpenter
2025-08-20 13:05 ` Greg Kroah-Hartman
@ 2025-08-20 13:07 ` Andy Shevchenko
[not found] ` <CAATBrPGqkuLrVhKi8aj-tugZNVMD3kqv5_v3WB=kJvt4FVtFzw@mail.gmail.com>
2 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2025-08-20 13:07 UTC (permalink / raw)
To: Adrian Barnaś
Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
Andy Shevchenko, Greg Kroah-Hartman, linux-media, linux-kernel,
linux-staging
On Wed, Aug 20, 2025 at 12:45:19PM +0000, Adrian Barnaś wrote:
> NFC: This patch cleans up coding style whitespace issues
> in drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c
>
> Fixes include:
> - removal of unnecessary line breaks
> - correcting spacing around operators
> - correcting spaces between types and names
...
> -static inline void gdc_reg_store(
> - const gdc_ID_t ID,
> - const unsigned int reg,
> - const hrt_data value);
> +static inline void gdc_reg_store(const gdc_ID_t ID, const unsigned int reg,
> + const hrt_data value);
Can you rather refactor code to get rid of the forward declaration?
...
> +static inline void gdc_reg_store(const gdc_ID_t ID, const unsigned int reg,
This still is wrong, shouldn't be any tabs here.
> + const hrt_data value)
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Fwd: [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c
[not found] ` <CAATBrPGqkuLrVhKi8aj-tugZNVMD3kqv5_v3WB=kJvt4FVtFzw@mail.gmail.com>
@ 2025-08-21 6:37 ` Adrian Barnaś
0 siblings, 0 replies; 5+ messages in thread
From: Adrian Barnaś @ 2025-08-21 6:37 UTC (permalink / raw)
To: linux-staging, linux-media, linux-kernel
Hi Dan, Greg, Andy
Will fix the message and replace the tab I missed. Also will refactor
the unnecessary forward declaration.
Thank you for review
Adrian Barnaś
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-21 6:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 12:45 [PATCH] staging: media: atomisp: Whitespaces style cleanup in gdc.c Adrian Barnaś
2025-08-20 13:04 ` Dan Carpenter
2025-08-20 13:05 ` Greg Kroah-Hartman
2025-08-20 13:07 ` Andy Shevchenko
[not found] ` <CAATBrPGqkuLrVhKi8aj-tugZNVMD3kqv5_v3WB=kJvt4FVtFzw@mail.gmail.com>
2025-08-21 6:37 ` Fwd: " Adrian Barnaś
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).