mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: media: atomisp: Deduplicate and reformat atomisp_find_in_fmt_conv_by_atomisp_in_fmt()
@ 2026-11-18  9:53 Shivani Patel
  2026-11-18 10:06 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Shivani Patel @ 2026-11-18  9:53 UTC (permalink / raw)
  To: Hans de Goede, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: Sakari Ailus, Andy Shevchenko, linux-media, linux-staging,
	linux-kernel, Shivani Patel

atomisp_subdev.h contains duplicate declarations of
atomisp_find_in_fmt_conv_by_atomisp_in_fmt() under ISP2400 and ISP2401
comments. Both declare the exact same function with broken formatting
(lines ending with open parenthesis, leading spaces, and awkward line
breaks).

Furthermore, the definition in atomisp_subdev.c uses the same broken
formatting with leading spaces and a line ending with an open
parenthesis.

Remove the duplicate declaration in atomisp_subdev.h, place the return
type on its own line, and shorten the parameter name to 'fmt' so that the
prototype and definition adhere to the 80-character line limit and
Linux coding style.

Signed-off-by: Shivani Patel <patelshivani2283@gmail.com>
---
 drivers/staging/media/atomisp/pci/atomisp_subdev.c |  6 +++---
 drivers/staging/media/atomisp/pci/atomisp_subdev.h | 10 ++--------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.c b/drivers/staging/media/atomisp/pci/atomisp_subdev.c
index bdd2d9b18..6af8a42a6 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_subdev.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_subdev.c
@@ -95,13 +95,13 @@ const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code)
 	return NULL;
 }
 
-const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
-    enum atomisp_input_format atomisp_in_fmt)
+const struct atomisp_in_fmt_conv *
+atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format fmt)
 {
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(atomisp_in_fmt_conv) - 1; i++)
-		if (atomisp_in_fmt_conv[i].atomisp_in_fmt == atomisp_in_fmt)
+		if (atomisp_in_fmt_conv[i].atomisp_in_fmt == fmt)
 			return atomisp_in_fmt_conv + i;
 
 	return NULL;
diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.h b/drivers/staging/media/atomisp/pci/atomisp_subdev.h
index b12bb65be..c4a3bce6f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_subdev.h
+++ b/drivers/staging/media/atomisp/pci/atomisp_subdev.h
@@ -300,14 +300,8 @@ u32 atomisp_subdev_uncompressed_code(u32 code);
 bool atomisp_subdev_is_compressed(u32 code);
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code);
 
-/* ISP2400 */
-const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
-    enum atomisp_input_format atomisp_in_fmt);
-
-/* ISP2401 */
-const struct atomisp_in_fmt_conv
-*atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format
-	atomisp_in_fmt);
+const struct atomisp_in_fmt_conv *
+atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format fmt);
 
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_compressed(u32 code);
 bool atomisp_subdev_format_conversion(struct atomisp_sub_device *asd);
-- 
2.50.1 (Apple Git-155)


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

end of thread, other threads:[~2026-11-18 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18  9:53 [PATCH] staging: media: atomisp: Deduplicate and reformat atomisp_find_in_fmt_conv_by_atomisp_in_fmt() Shivani Patel
2026-11-18 10:06 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®