linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration in gdc.c
@ 2025-08-21 13:35 Adrian Barnaś
  2025-08-21 13:35 ` [PATCH v3 2/3] staging: media: atomisp: Whitespaces style cleanup " Adrian Barnaś
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Adrian Barnaś @ 2025-08-21 13:35 UTC (permalink / raw)
  To: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
	Andy Shevchenko, Greg Kroah-Hartman, Dan Carpenter, linux-media,
	linux-kernel, linux-staging
  Cc: Adrian Barnaś

Get rid of gdc_reg_store() forward declaration because it brings no value.

Signed-off-by: Adrian Barnaś <abarnas@google.com>
---
 .../pci/hive_isp_css_common/host/gdc.c        | 24 ++++---------------
 1 file changed, 5 insertions(+), 19 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..bfda3cd13306e 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
@@ -11,13 +11,11 @@
 
 #include "assert_support.h"
 
-/*
- * 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)
+{
+	ia_css_device_store_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data), value);
+}
 
 #ifndef __INLINE_GDC__
 #include "gdc_private.h"
@@ -92,15 +90,3 @@ int gdc_get_unity(
 	(void)ID;
 	return (int)(1UL << HRT_GDC_FRAC_BITS);
 }
-
-/*
- * Local function implementations
- */
-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.rc2.233.g662b1ed5c5-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 2/3] staging: media: atomisp: Whitespaces style cleanup in gdc.c
  2025-08-21 13:35 [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration in gdc.c Adrian Barnaś
@ 2025-08-21 13:35 ` Adrian Barnaś
  2025-08-21 13:35 ` [PATCH v3 3/3] staging: media: atomisp: Remove return from end of void function " Adrian Barnaś
  2025-08-21 13:54 ` [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration " Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Barnaś @ 2025-08-21 13:35 UTC (permalink / raw)
  To: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
	Andy Shevchenko, Greg Kroah-Hartman, Dan Carpenter, linux-media,
	linux-kernel, linux-staging
  Cc: Adrian Barnaś

Clean 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        | 21 +++++++------------
 1 file changed, 8 insertions(+), 13 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 bfda3cd13306e..bd44410729bb4 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
@@ -24,9 +24,7 @@ static inline void gdc_reg_store(const gdc_ID_t ID, const unsigned int reg,
 /*
  * 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;
 
@@ -34,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);
@@ -83,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;
-- 
2.51.0.rc2.233.g662b1ed5c5-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 3/3] staging: media: atomisp: Remove return from end of void function in gdc.c
  2025-08-21 13:35 [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration in gdc.c Adrian Barnaś
  2025-08-21 13:35 ` [PATCH v3 2/3] staging: media: atomisp: Whitespaces style cleanup " Adrian Barnaś
@ 2025-08-21 13:35 ` Adrian Barnaś
  2025-08-21 13:54 ` [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration " Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Barnaś @ 2025-08-21 13:35 UTC (permalink / raw)
  To: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
	Andy Shevchenko, Greg Kroah-Hartman, Dan Carpenter, linux-media,
	linux-kernel, linux-staging
  Cc: Adrian Barnaś

Fix checkpatch.pl warning on useless return on the end of the void
function.

Signed-off-by: Adrian Barnaś <abarnas@google.com>
---
 drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c | 1 -
 1 file changed, 1 deletion(-)

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 bd44410729bb4..0906f1d1051b7 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
@@ -43,7 +43,6 @@ void gdc_lut_store(const gdc_ID_t ID, const int data[4][HRT_GDC_N])
 		gdc_reg_store(ID, lut_offset++, word_0);
 		gdc_reg_store(ID, lut_offset++, word_1);
 	}
-	return;
 }
 
 /*
-- 
2.51.0.rc2.233.g662b1ed5c5-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration in gdc.c
  2025-08-21 13:35 [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration in gdc.c Adrian Barnaś
  2025-08-21 13:35 ` [PATCH v3 2/3] staging: media: atomisp: Whitespaces style cleanup " Adrian Barnaś
  2025-08-21 13:35 ` [PATCH v3 3/3] staging: media: atomisp: Remove return from end of void function " Adrian Barnaś
@ 2025-08-21 13:54 ` Dan Carpenter
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-08-21 13:54 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 Thu, Aug 21, 2025 at 01:35:19PM +0000, Adrian Barnaś wrote:
> Get rid of gdc_reg_store() forward declaration because it brings no value.
> 
> Signed-off-by: Adrian Barnaś <abarnas@google.com>
> ---

Thanks.

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-21 13:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 13:35 [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration in gdc.c Adrian Barnaś
2025-08-21 13:35 ` [PATCH v3 2/3] staging: media: atomisp: Whitespaces style cleanup " Adrian Barnaś
2025-08-21 13:35 ` [PATCH v3 3/3] staging: media: atomisp: Remove return from end of void function " Adrian Barnaś
2025-08-21 13:54 ` [PATCH v3 1/3] staging: media: atomisp: Remove unnecessary forward declaration " Dan Carpenter

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).