Skip to contentSkip to conversation

media/video: vpif: fixing function name start to vpif_config_params

PATCH In review Dror Cohen 4 participants 5 messages Aug 9, 2012 – Sep 27, 2012 Media (V4L/DVB)

lore
Share & tools
lore

Dror Cohen

author
#0 lore raw

v2 cover media/video: vpif: fixing function name start to vpif_config_params

This patch address the issue that a function named config_vpif_params should be vpif_config_params. However this name is shared with two structures defined already. So I changed the structures to config_vpif_params (origin was vpif_config_params)

v2 changes: softer wording in description and the structs are now defined without _t

Dror Cohen (1):
fixing function name start to vpif_config_params

 drivers/media/video/davinci/vpif.c         |    6 +++---
 drivers/media/video/davinci/vpif_capture.c |    2 +-
 drivers/media/video/davinci/vpif_capture.h |    2 +-
 drivers/media/video/davinci/vpif_display.c |    2 +-
 drivers/media/video/davinci/vpif_display.h |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH v2 1/1 media/video: vpif: fixing function name start to vpif_config_params

drivers/media/video/davinci/vpif.c +3 -3
index af96802..04dd8fa 100644
@@ -301,12 +301,12 @@ static void vpif_set_mode_info(const struct vpif_channel_config_params *config,
 	regw(value, vpifregs[channel_id].v_cfg);
 }
 
-/* config_vpif_params
+/* vpif_config_params
  * Function to set the parameters of a channel
  * Mainly modifies the channel ciontrol register
  * It sets frame format, yc mux mode
  */
-static void config_vpif_params(struct vpif_params *vpifparams,
+static void vpif_config_params(struct vpif_params *vpifparams,
 				u8 channel_id, u8 found)
 {
 	const struct vpif_channel_config_params *config = &vpifparams->std_info;
@@ -374,7 +374,7 @@ int vpif_set_video_params(struct vpif_params *vpifparams, u8 channel_id)
 		found = 2;
 	}
 
-	config_vpif_params(vpifparams, channel_id, found);
+	vpif_config_params(vpifparams, channel_id, found);
 
 	regw(0x80, VPIF_REQ_SIZE);
 	regw(0x01, VPIF_EMULATION_CTRL);
drivers/media/video/davinci/vpif_capture.c +1 -1
index 9604695..59104e6 100644
@@ -67,7 +67,7 @@ MODULE_PARM_DESC(ch3_numbuffers, "Channel1 buffer count (default:3)");
 MODULE_PARM_DESC(ch2_bufsize, "Channel0 buffer size (default:1920 x 1080 x 2)");
 MODULE_PARM_DESC(ch3_bufsize, "Channel1 buffer size (default:720 x 576 x 2)");
 
-static struct vpif_config_params config_params = {
+static struct config_vpif_params config_params = {
 	.min_numbuffers = 3,
 	.numbuffers[0] = 3,
 	.numbuffers[1] = 3,
drivers/media/video/davinci/vpif_capture.h +1 -1
index a693d4e..8863de1 100644
@@ -144,7 +144,7 @@ struct vpif_device {
 	struct v4l2_subdev **sd;
 };
 
-struct vpif_config_params {
+struct config_vpif_params {
 	u8 min_numbuffers;
 	u8 numbuffers[VPIF_CAPTURE_NUM_CHANNELS];
 	s8 device_type;
drivers/media/video/davinci/vpif_display.c +1 -1
index e6488ee..652440d 100644
@@ -70,7 +70,7 @@ MODULE_PARM_DESC(ch3_numbuffers, "Channel3 buffer count (default:3)");
 MODULE_PARM_DESC(ch2_bufsize, "Channel2 buffer size (default:1920 x 1080 x 2)");
 MODULE_PARM_DESC(ch3_bufsize, "Channel3 buffer size (default:720 x 576 x 2)");
 
-static struct vpif_config_params config_params = {
+static struct config_vpif_params config_params = {
 	.min_numbuffers		= 3,
 	.numbuffers[0]		= 3,
 	.numbuffers[1]		= 3,
drivers/media/video/davinci/vpif_display.h +1 -1
index 56879d1..3e14807 100644
@@ -154,7 +154,7 @@ struct vpif_device {
 
 };
 
-struct vpif_config_params {
+struct config_vpif_params {
 	u32 min_bufsize[VPIF_DISPLAY_NUM_CHANNELS];
 	u32 channel_bufsize[VPIF_DISPLAY_NUM_CHANNELS];
 	u8 numbuffers[VPIF_DISPLAY_NUM_CHANNELS];
Signature · 1 line
1.7.5.4
Acked-by on the v2 series
#2 lore raw
In reply to Dror Cohen

Hi Dror,

Thanks for the patch.

Mauro,

I'll queue this patch for v3.7 through my tree.

Quoted 11 lines · Dror Cohen

This patch address the issue that a function named config_vpif_params should be vpif_config_params. However this name is shared with two structures defined already. So I changed the structures to config_vpif_params (origin was vpif_config_params)

v2 changes: softer wording in description and the structs are now defined without _t

Dror Cohen (1):
fixing function name start to vpif_config_params

Quoted 6 lines
 drivers/media/video/davinci/vpif.c         |    6 +++---
 drivers/media/video/davinci/vpif_capture.c |    2 +-
 drivers/media/video/davinci/vpif_capture.h |    2 +-
 drivers/media/video/davinci/vpif_display.c |    2 +-
 drivers/media/video/davinci/vpif_display.h |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

Thx,
--Manju

#3 lore raw

Em Mon, 13 Aug 2012 19:43:29 +0530 Manjunath Hadli <[email protected]> escreveu:

Quoted 7 lines

Hi Dror,

Thanks for the patch.

Mauro,

I'll queue this patch for v3.7 through my tree.

Sure.

Quoted 9 lines · Dror Cohen
Quoted 7 lines

This patch address the issue that a function named config_vpif_params should be vpif_config_params. However this name is shared with two structures defined already. So I changed the structures to config_vpif_params (origin was vpif_config_params)

v2 changes: softer wording in description and the structs are now defined without _t

Hmm... I didn't understand what you're wanting with this change. Before this patch, there are:

v4l@pedra ~/v4l/patchwork $ git grep config_vpif_params drivers/media/platform/davinci/vpif.c:/* config_vpif_params drivers/media/platform/davinci/vpif.c:static void config_vpif_params(struct vpif_params *vpifparams,
drivers/media/platform/davinci/vpif.c: config_vpif_params(vpifparams, channel_id, found);
v4l@pedra ~/v4l/patchwork $ git grep vpif_config_params drivers/media/platform/davinci/vpif_capture.c:static struct vpif_config_params config_params = { drivers/media/platform/davinci/vpif_capture.h:struct vpif_config_params { drivers/media/platform/davinci/vpif_display.c:static struct vpif_config_params config_params = { drivers/media/platform/davinci/vpif_display.h:struct vpif_config_params {

After that, there are:

v4l@pedra ~/v4l/patchwork $ git grep vpif_config_params drivers/media/platform/davinci/vpif.c:/* vpif_config_params drivers/media/platform/davinci/vpif.c:static void vpif_config_params(struct vpif_params *vpifparams,
drivers/media/platform/davinci/vpif.c: vpif_config_params(vpifparams, channel_id, found);
v4l@pedra ~/v4l/patchwork $ git grep config_vpif_params drivers/media/platform/davinci/vpif_capture.c:static struct config_vpif_params config_params = { drivers/media/platform/davinci/vpif_capture.h:struct config_vpif_params { drivers/media/platform/davinci/vpif_display.c:static struct config_vpif_params config_params = { drivers/media/platform/davinci/vpif_display.h:struct config_vpif_params {

So, I can't really see any improvement on avoiding duplicate names.

IMHO, the better would be to name those functions as:

vpif: vpif_config_params (or, even better, vpif_core_config_params)
vpif_capture: vpif_capture_config_params
vpif_display: vpif_display_config_params

This way, duplication will be avoided and will avoid the confusing inversion between vpif and config.

Regards,
Mauro

#4 lore raw

Hi Dror,

Quoted 50 lines · Mauro Carvalho Chehab

Em Mon, 13 Aug 2012 19:43:29 +0530 Manjunath Hadli <[email protected]> escreveu:

Quoted 7 lines

Hi Dror,

Thanks for the patch.

Mauro,

I'll queue this patch for v3.7 through my tree.

Sure.

Quoted 9 lines · Dror Cohen
Quoted 7 lines

This patch address the issue that a function named config_vpif_params should be vpif_config_params. However this name is shared with two structures defined already. So I changed the structures to config_vpif_params (origin was vpif_config_params)

v2 changes: softer wording in description and the structs are now defined without _t

Hmm... I didn't understand what you're wanting with this change. Before this patch, there are:

v4l@pedra ~/v4l/patchwork $ git grep config_vpif_params drivers/media/platform/davinci/vpif.c:/* config_vpif_params drivers/media/platform/davinci/vpif.c:static void config_vpif_params(struct vpif_params *vpifparams,
drivers/media/platform/davinci/vpif.c: config_vpif_params(vpifparams, channel_id, found);
v4l@pedra ~/v4l/patchwork $ git grep vpif_config_params drivers/media/platform/davinci/vpif_capture.c:static struct vpif_config_params config_params = { drivers/media/platform/davinci/vpif_capture.h:struct vpif_config_params { drivers/media/platform/davinci/vpif_display.c:static struct vpif_config_params config_params = { drivers/media/platform/davinci/vpif_display.h:struct vpif_config_params {

After that, there are:

v4l@pedra ~/v4l/patchwork $ git grep vpif_config_params drivers/media/platform/davinci/vpif.c:/* vpif_config_params drivers/media/platform/davinci/vpif.c:static void vpif_config_params(struct vpif_params *vpifparams,
drivers/media/platform/davinci/vpif.c: vpif_config_params(vpifparams, channel_id, found);
v4l@pedra ~/v4l/patchwork $ git grep config_vpif_params drivers/media/platform/davinci/vpif_capture.c:static struct config_vpif_params config_params = { drivers/media/platform/davinci/vpif_capture.h:struct config_vpif_params { drivers/media/platform/davinci/vpif_display.c:static struct config_vpif_params config_params = { drivers/media/platform/davinci/vpif_display.h:struct config_vpif_params {

So, I can't really see any improvement on avoiding duplicate names.

Quoted 9 lines

IMHO, the better would be to name those functions as:

vpif:           vpif_config_params (or, even better, vpif_core_config_params)
vpif_capture:   vpif_capture_config_params
vpif_display:   vpif_display_config_params

This way, duplication will be avoided and will avoid the confusing inversion between vpif and config.

I agree with Mauro here, Can you do the above changes and post a v2.( Rebase it on
http://git.linuxtv.org/media_tree.git/shortlog/refs/heads/staging/for_v3.7
branch)

Regards,
--Prabhakar Lad

Quoted 6 lines

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html