public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/18] Staging: cx25821: Fix style issues
@ 2011-08-30  4:16 Leonid V. Fedorenchik
  2011-08-30  4:16 ` [PATCH v3 01/18] Staging: cx25821: Get rid of typedef in cx25821.h Leonid V. Fedorenchik
                   ` (17 more replies)
  0 siblings, 18 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

This patch series fixes some style issues in drivers/staging/cx25821
I split my previous patches per logical change and combined them into
one patch series.

Leonid V. Fedorenchik (18):
  Staging: cx25821: Get rid of typedef in cx25821.h
  Staging: cx25821: Delete file cx25821-gpio.h
  Staging: cx25821: Move EXPORT_SYMBOL() to the right place
  Staging: cx25821: Use DEFINE_PCI_DEVICE_TABLE for cx25821_pci_tbl
  Staging: cx25821: Fix wrong brace placement in cx25821-cards.c
  Staging: cx25821: Fix wrong brace placement in cx25821-core.c
  Staging: cx25821: Fix wrong brace placement in cx25821-i2c.c
  Staging: cx25821: Fix too long lines in cx25821-audio.h
  Staging: cx25821: Fix obscure line endings in cx25821-audio-upstream.c
  Staging: cx25821: Fix long lines in cx25821-audio-upstream.c
  Staging: cx25821: Fix long lines in cx25821-audio-upstream.h
  Staging: cx25821: Replace :? by if-else in cx25821-video-upstream-ch2.c
  Staging: cx25821: Fix labels' placement in cx25821-video-upstream-ch2.c
  Staging: cx25821: Fix wrong line endings in cx25821-video-upstream-ch2.c
  Staging: cx25821: Fix long lines in cx25821-video-upstream-ch2.c
  Staging: cx25821: Fix long lines in cx25821-video-upstream-ch2.h
  Staging: cx25821: Fix long lines in cx25821-video-upstream.c
  Staging: cx25821: Fix long lines in cx25821-video-upstream.h

 drivers/staging/cx25821/cx25821-audio-upstream.c   |   33 +++-----
 drivers/staging/cx25821/cx25821-audio-upstream.h   |    9 ++-
 drivers/staging/cx25821/cx25821-audio.h            |    6 +-
 drivers/staging/cx25821/cx25821-cards.c            |    6 +-
 drivers/staging/cx25821/cx25821-core.c             |   31 ++++----
 drivers/staging/cx25821/cx25821-gpio.c             |    1 +
 drivers/staging/cx25821/cx25821-gpio.h             |    2 -
 drivers/staging/cx25821/cx25821-i2c.c              |    6 +-
 .../staging/cx25821/cx25821-video-upstream-ch2.c   |   79 ++++++++-----------
 .../staging/cx25821/cx25821-video-upstream-ch2.h   |   83 ++++++++++++++------
 drivers/staging/cx25821/cx25821-video-upstream.c   |   16 ++---
 drivers/staging/cx25821/cx25821-video-upstream.h   |   78 +++++++++++++------
 drivers/staging/cx25821/cx25821.h                  |    8 +-
 13 files changed, 204 insertions(+), 154 deletions(-)
 delete mode 100644 drivers/staging/cx25821/cx25821-gpio.h


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

* [PATCH v3 01/18] Staging: cx25821: Get rid of typedef in cx25821.h
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
@ 2011-08-30  4:16 ` Leonid V. Fedorenchik
  2011-08-30  4:16 ` [PATCH v3 02/18] Staging: cx25821: Delete file cx25821-gpio.h Leonid V. Fedorenchik
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Get rid of typedef in cx25821.h

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821.h b/drivers/staging/cx25821/cx25821.h
index 6230243..a282592 100644
--- a/drivers/staging/cx25821/cx25821.h
+++ b/drivers/staging/cx25821/cx25821.h
@@ -179,15 +179,17 @@ struct cx25821_input {
 	u32 gpio0, gpio1, gpio2, gpio3;
 };
 
-typedef enum {
+enum port {
 	CX25821_UNDEFINED = 0,
 	CX25821_RAW,
 	CX25821_264
-} port_t;
+};
 
 struct cx25821_board {
 	char *name;
-	port_t porta, portb, portc;
+	enum port porta;
+	enum port portb;
+	enum port portc;
 	unsigned int tuner_type;
 	unsigned int radio_type;
 	unsigned char tuner_addr;
-- 
1.7.0.4


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

* [PATCH v3 02/18] Staging: cx25821: Delete file cx25821-gpio.h
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
  2011-08-30  4:16 ` [PATCH v3 01/18] Staging: cx25821: Get rid of typedef in cx25821.h Leonid V. Fedorenchik
@ 2011-08-30  4:16 ` Leonid V. Fedorenchik
  2011-08-30  4:16 ` [PATCH v3 03/18] Staging: cx25821: Move EXPORT_SYMBOL() to the right place Leonid V. Fedorenchik
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Delete file cx25821-gpio.h since it is not used.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-gpio.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
 delete mode 100644 drivers/staging/cx25821/cx25821-gpio.h

diff --git a/drivers/staging/cx25821/cx25821-gpio.h b/drivers/staging/cx25821/cx25821-gpio.h
deleted file mode 100644
index ca07644..0000000
--- a/drivers/staging/cx25821/cx25821-gpio.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-void cx25821_gpio_init(struct athena_dev *dev);
-- 
1.7.0.4


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

* [PATCH v3 03/18] Staging: cx25821: Move EXPORT_SYMBOL() to the right place
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
  2011-08-30  4:16 ` [PATCH v3 01/18] Staging: cx25821: Get rid of typedef in cx25821.h Leonid V. Fedorenchik
  2011-08-30  4:16 ` [PATCH v3 02/18] Staging: cx25821: Delete file cx25821-gpio.h Leonid V. Fedorenchik
@ 2011-08-30  4:16 ` Leonid V. Fedorenchik
  2011-08-30  4:16 ` [PATCH v3 04/18] Staging: cx25821: Use DEFINE_PCI_DEVICE_TABLE for cx25821_pci_tbl Leonid V. Fedorenchik
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Move EXPORT_SYMBOL(cx25821_set_gpiopin_direction) to the right place.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-core.c |    1 -
 drivers/staging/cx25821/cx25821-gpio.c |    1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-core.c b/drivers/staging/cx25821/cx25821-core.c
index 523ac5e..8e8a56d 100644
--- a/drivers/staging/cx25821/cx25821-core.c
+++ b/drivers/staging/cx25821/cx25821-core.c
@@ -1512,7 +1512,6 @@ static void __exit cx25821_fini(void)
 	pci_unregister_driver(&cx25821_pci_driver);
 }
 
-EXPORT_SYMBOL(cx25821_set_gpiopin_direction);
 
 module_init(cx25821_init);
 module_exit(cx25821_fini);
diff --git a/drivers/staging/cx25821/cx25821-gpio.c b/drivers/staging/cx25821/cx25821-gpio.c
index 2f154b3..29e43b0 100644
--- a/drivers/staging/cx25821/cx25821-gpio.c
+++ b/drivers/staging/cx25821/cx25821-gpio.c
@@ -50,6 +50,7 @@ void cx25821_set_gpiopin_direction(struct cx25821_dev *dev,
 
 	cx_write(gpio_oe_reg, value);
 }
+EXPORT_SYMBOL(cx25821_set_gpiopin_direction);
 
 static void cx25821_set_gpiopin_logicvalue(struct cx25821_dev *dev,
 					   int pin_number, int pin_logic_value)
-- 
1.7.0.4


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

* [PATCH v3 04/18] Staging: cx25821: Use DEFINE_PCI_DEVICE_TABLE for cx25821_pci_tbl
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (2 preceding siblings ...)
  2011-08-30  4:16 ` [PATCH v3 03/18] Staging: cx25821: Move EXPORT_SYMBOL() to the right place Leonid V. Fedorenchik
@ 2011-08-30  4:16 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 05/18] Staging: cx25821: Fix wrong brace placement in cx25821-cards.c Leonid V. Fedorenchik
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Use DEFINE_PCI_DEVICE_TABLE for cx25821_pci_tbl

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-core.c b/drivers/staging/cx25821/cx25821-core.c
index 8e8a56d..26d2879 100644
--- a/drivers/staging/cx25821/cx25821-core.c
+++ b/drivers/staging/cx25821/cx25821-core.c
@@ -1473,7 +1473,7 @@ static void __devexit cx25821_finidev(struct pci_dev *pci_dev)
 	kfree(dev);
 }
 
-static struct pci_device_id cx25821_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(cx25821_pci_tbl) = {
 	{
 	 /* CX25821 Athena */
 	 .vendor = 0x14f1,
-- 
1.7.0.4


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

* [PATCH v3 05/18] Staging: cx25821: Fix wrong brace placement in cx25821-cards.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (3 preceding siblings ...)
  2011-08-30  4:16 ` [PATCH v3 04/18] Staging: cx25821: Use DEFINE_PCI_DEVICE_TABLE for cx25821_pci_tbl Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30 14:05   ` Dan Carpenter
  2011-08-30  4:17 ` [PATCH v3 06/18] Staging: cx25821: Fix wrong brace placement in cx25821-core.c Leonid V. Fedorenchik
                   ` (12 subsequent siblings)
  17 siblings, 1 reply; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix wrong brace placement in cx25821-cards.c

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-cards.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-cards.c b/drivers/staging/cx25821/cx25821-cards.c
index 94e8d68..876345a 100644
--- a/drivers/staging/cx25821/cx25821-cards.c
+++ b/drivers/staging/cx25821/cx25821-cards.c
@@ -39,14 +39,14 @@ struct cx25821_board cx25821_boards[] = {
 			   .name = "UNKNOWN/GENERIC",
 			   /* Ensure safe default for unknown boards */
 			   .clk_freq = 0,
-			   },
+	},
 
 	[CX25821_BOARD] = {
 			   .name = "CX25821",
 			   .portb = CX25821_RAW,
 			   .portc = CX25821_264,
 			   .input[0].type = CX25821_VMUX_COMPOSITE,
-			   },
+	},
 
 };
 
@@ -57,7 +57,7 @@ struct cx25821_subid cx25821_subids[] = {
 	 .subvendor = 0x14f1,
 	 .subdevice = 0x0920,
 	 .card = CX25821_BOARD,
-	 },
+	},
 };
 
 void cx25821_card_setup(struct cx25821_dev *dev)
-- 
1.7.0.4


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

* [PATCH v3 06/18] Staging: cx25821: Fix wrong brace placement in cx25821-core.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (4 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 05/18] Staging: cx25821: Fix wrong brace placement in cx25821-cards.c Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 07/18] Staging: cx25821: Fix wrong brace placement in cx25821-i2c.c Leonid V. Fedorenchik
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix wrong brace placement in cx25821-core.c

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-core.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-core.c b/drivers/staging/cx25821/cx25821-core.c
index 26d2879..4382e45 100644
--- a/drivers/staging/cx25821/cx25821-core.c
+++ b/drivers/staging/cx25821/cx25821-core.c
@@ -69,7 +69,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .gpcnt = VID_DST_A_GPCNT,
 		       .vip_ctl = VID_DST_A_VIP_CTL,
 		       .pix_frmt = VID_DST_A_PIX_FRMT,
-		       },
+	},
 
 	[SRAM_CH01] = {
 		       .i = SRAM_CH01,
@@ -91,7 +91,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .gpcnt = VID_DST_B_GPCNT,
 		       .vip_ctl = VID_DST_B_VIP_CTL,
 		       .pix_frmt = VID_DST_B_PIX_FRMT,
-		       },
+	},
 
 	[SRAM_CH02] = {
 		       .i = SRAM_CH02,
@@ -113,7 +113,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .gpcnt = VID_DST_C_GPCNT,
 		       .vip_ctl = VID_DST_C_VIP_CTL,
 		       .pix_frmt = VID_DST_C_PIX_FRMT,
-		       },
+	},
 
 	[SRAM_CH03] = {
 		       .i = SRAM_CH03,
@@ -135,7 +135,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .gpcnt = VID_DST_D_GPCNT,
 		       .vip_ctl = VID_DST_D_VIP_CTL,
 		       .pix_frmt = VID_DST_D_PIX_FRMT,
-		       },
+	},
 
 	[SRAM_CH04] = {
 		       .i = SRAM_CH04,
@@ -157,7 +157,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .gpcnt = VID_DST_E_GPCNT,
 		       .vip_ctl = VID_DST_E_VIP_CTL,
 		       .pix_frmt = VID_DST_E_PIX_FRMT,
-		       },
+	},
 
 	[SRAM_CH05] = {
 		       .i = SRAM_CH05,
@@ -179,7 +179,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .gpcnt = VID_DST_F_GPCNT,
 		       .vip_ctl = VID_DST_F_VIP_CTL,
 		       .pix_frmt = VID_DST_F_PIX_FRMT,
-		       },
+	},
 
 	[SRAM_CH06] = {
 		       .i = SRAM_CH06,
@@ -201,7 +201,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .gpcnt = VID_DST_G_GPCNT,
 		       .vip_ctl = VID_DST_G_VIP_CTL,
 		       .pix_frmt = VID_DST_G_PIX_FRMT,
-		       },
+	},
 
 	[SRAM_CH07] = {
 		       .i = SRAM_CH07,
@@ -223,7 +223,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .gpcnt = VID_DST_H_GPCNT,
 		       .vip_ctl = VID_DST_H_VIP_CTL,
 		       .pix_frmt = VID_DST_H_PIX_FRMT,
-		       },
+	},
 
 	[SRAM_CH08] = {
 		       .name = "audio from",
@@ -236,7 +236,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .ptr2_reg = DMA17_PTR2,
 		       .cnt1_reg = DMA17_CNT1,
 		       .cnt2_reg = DMA17_CNT2,
-		       },
+	},
 
 	[SRAM_CH09] = {
 		       .i = SRAM_CH09,
@@ -262,7 +262,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .vid_active_ctl2 = VID_SRC_I_ACTIVE_CTL2,
 		       .vid_cdt_size = VID_SRC_I_CDT_SZ,
 		       .irq_bit = 8,
-		       },
+	},
 
 	[SRAM_CH10] = {
 		       .i = SRAM_CH10,
@@ -288,7 +288,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .vid_active_ctl2 = VID_SRC_J_ACTIVE_CTL2,
 		       .vid_cdt_size = VID_SRC_J_CDT_SZ,
 		       .irq_bit = 9,
-		       },
+	},
 
 	[SRAM_CH11] = {
 		       .i = SRAM_CH11,
@@ -313,7 +313,7 @@ struct sram_channel cx25821_sram_channels[] = {
 		       .fld_aud_fifo_en = FLD_AUD_SRC_B_FIFO_EN,
 		       .fld_aud_risc_en = FLD_AUD_SRC_B_RISC_EN,
 		       .irq_bit = 11,
-		       },
+	},
 };
 EXPORT_SYMBOL(cx25821_sram_channels);
 
@@ -1480,10 +1480,10 @@ static DEFINE_PCI_DEVICE_TABLE(cx25821_pci_tbl) = {
 	 .device = 0x8210,
 	 .subvendor = 0x14f1,
 	 .subdevice = 0x0920,
-	 },
+	},
 	{
 	 /* --- end of list --- */
-	 }
+	}
 };
 
 MODULE_DEVICE_TABLE(pci, cx25821_pci_tbl);
-- 
1.7.0.4


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

* [PATCH v3 07/18] Staging: cx25821: Fix wrong brace placement in cx25821-i2c.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (5 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 06/18] Staging: cx25821: Fix wrong brace placement in cx25821-core.c Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 08/18] Staging: cx25821: Fix too long lines in cx25821-audio.h Leonid V. Fedorenchik
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix wrong brace placement in cx25821-i2c.c

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-i2c.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-i2c.c b/drivers/staging/cx25821/cx25821-i2c.c
index 130dfeb..ea5a878 100644
--- a/drivers/staging/cx25821/cx25821-i2c.c
+++ b/drivers/staging/cx25821/cx25821-i2c.c
@@ -374,12 +374,12 @@ int cx25821_i2c_read(struct cx25821_i2c *bus, u16 reg_addr, int *value)
 		 .flags = 0,
 		 .len = 2,
 		 .buf = addr,
-		 }, {
+		}, {
 		     .addr = client->addr,
 		     .flags = I2C_M_RD,
 		     .len = 4,
 		     .buf = buf,
-		     }
+		}
 	};
 
 	addr[0] = (reg_addr >> 8);
@@ -407,7 +407,7 @@ int cx25821_i2c_write(struct cx25821_i2c *bus, u16 reg_addr, int value)
 		 .flags = 0,
 		 .len = 6,
 		 .buf = buf,
-		 }
+		}
 	};
 
 	buf[0] = reg_addr >> 8;
-- 
1.7.0.4


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

* [PATCH v3 08/18] Staging: cx25821: Fix too long lines in cx25821-audio.h
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (6 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 07/18] Staging: cx25821: Fix wrong brace placement in cx25821-i2c.c Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30 14:08   ` Dan Carpenter
  2011-08-30  4:17 ` [PATCH v3 09/18] Staging: cx25821: Fix obscure line endings in cx25821-audio-upstream.c Leonid V. Fedorenchik
                   ` (9 subsequent siblings)
  17 siblings, 1 reply; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix too long lines in cx25821-audio.h

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-audio.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-audio.h b/drivers/staging/cx25821/cx25821-audio.h
index 2771725..a2098fb 100644
--- a/drivers/staging/cx25821/cx25821-audio.h
+++ b/drivers/staging/cx25821/cx25821-audio.h
@@ -36,13 +36,15 @@
  */
 #ifndef USE_RISC_NOOP
 #define MAX_BUFFER_PROGRAM_SIZE     \
-	(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE*4)
+	(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + \
+	RISC_WRITECR_INSTRUCTION_SIZE*4)
 #endif
 
 /* MAE 12 July 2005 Try to use NOOP RISC instruction instead */
 #ifdef USE_RISC_NOOP
 #define MAX_BUFFER_PROGRAM_SIZE     \
-	(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_NOOP_INSTRUCTION_SIZE*4)
+	(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + \
+	RISC_NOOP_INSTRUCTION_SIZE*4)
 #endif
 
 /* Sizes of various instructions in bytes.  Used when adding instructions. */
-- 
1.7.0.4


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

* [PATCH v3 09/18] Staging: cx25821: Fix obscure line endings in cx25821-audio-upstream.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (7 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 08/18] Staging: cx25821: Fix too long lines in cx25821-audio.h Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 10/18] Staging: cx25821: Fix long lines " Leonid V. Fedorenchik
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Change obscure line endings to less obscure ones. Rationale: more
readable.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-audio-upstream.c |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.c b/drivers/staging/cx25821/cx25821-audio-upstream.c
index 0f9ca77..ed62231 100644
--- a/drivers/staging/cx25821/cx25821-audio-upstream.c
+++ b/drivers/staging/cx25821/cx25821-audio-upstream.c
@@ -555,8 +555,7 @@ int cx25821_audio_upstream_irq(struct cx25821_dev *dev, int chan_num,
 					}
 				}
 				/* Jump to 2nd Audio Frame */
-				*(rp++) =
-				    cpu_to_le32(RISC_JUMP | RISC_IRQ1 |
+				*(rp++) = cpu_to_le32(RISC_JUMP | RISC_IRQ1 |
 						RISC_CNT_RESET);
 				*(rp++) = cpu_to_le32(risc_phys_jump_addr);
 				*(rp++) = cpu_to_le32(0);
@@ -611,11 +610,9 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
 
 	/* Only deal with our interrupt */
 	if (audio_status) {
-		handled =
-		    cx25821_audio_upstream_irq(dev,
-					       dev->
-					       _audio_upstream_channel_select,
-					       audio_status);
+		handled = cx25821_audio_upstream_irq(dev,
+				dev->_audio_upstream_channel_select,
+				audio_status);
 	}
 
 	if (handled < 0)
@@ -770,9 +767,8 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)
 		memcpy(dev->_audiofilename, _defaultAudioName, str_length + 1);
 	}
 
-	retval =
-	    cx25821_sram_channel_setup_upstream_audio(dev, sram_ch, _line_size,
-						      0);
+	retval = cx25821_sram_channel_setup_upstream_audio(dev, sram_ch,
+							_line_size, 0);
 
 	dev->audio_upstream_riscbuf_size =
 	    AUDIO_RISC_DMA_BUF_SIZE * NUM_AUDIO_PROGS +
@@ -780,8 +776,8 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)
 	dev->audio_upstream_databuf_size = AUDIO_DATA_BUF_SZ * NUM_AUDIO_PROGS;
 
 	/* Allocating buffers and prepare RISC program */
-	retval =
-	    cx25821_audio_upstream_buffer_prepare(dev, sram_ch, _line_size);
+	retval = cx25821_audio_upstream_buffer_prepare(dev, sram_ch,
+							_line_size);
 	if (retval < 0) {
 		pr_err("%s: Failed to set up Audio upstream buffers!\n",
 		       dev->name);
-- 
1.7.0.4


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

* [PATCH v3 10/18] Staging: cx25821: Fix long lines in cx25821-audio-upstream.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (8 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 09/18] Staging: cx25821: Fix obscure line endings in cx25821-audio-upstream.c Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30 14:12   ` Dan Carpenter
  2011-08-30  4:17 ` [PATCH v3 11/18] Staging: cx25821: Fix long lines in cx25821-audio-upstream.h Leonid V. Fedorenchik
                   ` (7 subsequent siblings)
  17 siblings, 1 reply; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix long lines in cx25821-audio-upstream.c

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-audio-upstream.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.c b/drivers/staging/cx25821/cx25821-audio-upstream.c
index ed62231..ca1369f 100644
--- a/drivers/staging/cx25821/cx25821-audio-upstream.c
+++ b/drivers/staging/cx25821/cx25821-audio-upstream.c
@@ -540,13 +540,9 @@ int cx25821_audio_upstream_irq(struct cx25821_dev *dev, int chan_num,
 				    AUDIO_RISC_DMA_BUF_SIZE;
 
 				rp = cx25821_risc_field_upstream_audio(dev,
-								       dev->
-								       _risc_virt_start_addr
-								       + 1,
-								       dev->
-								       _audiodata_buf_phys_addr,
-								       AUDIO_LINE_SIZE,
-								       FIFO_DISABLE);
+						dev->_risc_virt_start_addr + 1,
+						dev->_audiodata_buf_phys_addr,
+						AUDIO_LINE_SIZE, FIFO_DISABLE);
 
 				if (USE_RISC_NOOP_AUDIO) {
 					for (i = 0; i < NUM_NO_OPS; i++) {
@@ -603,7 +599,8 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
 	if (!dev)
 		return -1;
 
-	sram_ch = dev->channels[dev->_audio_upstream_channel_select].sram_channels;
+	sram_ch = dev->channels[dev->_audio_upstream_channel_select].
+			sram_channels;
 
 	msk_stat = cx_read(sram_ch->int_mstat);
 	audio_status = cx_read(sram_ch->int_stat);
-- 
1.7.0.4


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

* [PATCH v3 11/18] Staging: cx25821: Fix long lines in cx25821-audio-upstream.h
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (9 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 10/18] Staging: cx25821: Fix long lines " Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 12/18] Staging: cx25821: Replace :? by if-else in cx25821-video-upstream-ch2.c Leonid V. Fedorenchik
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix long lines in cx25821-audio-upstream.h

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-audio-upstream.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.h b/drivers/staging/cx25821/cx25821-audio-upstream.h
index 668a4f1..ae1d37c 100644
--- a/drivers/staging/cx25821/cx25821-audio-upstream.h
+++ b/drivers/staging/cx25821/cx25821-audio-upstream.h
@@ -46,11 +46,16 @@
 #define USE_RISC_NOOP_AUDIO   1
 
 #ifdef USE_RISC_NOOP_AUDIO
-#define AUDIO_RISC_DMA_BUF_SIZE    (LINES_PER_AUDIO_BUFFER*RISC_READ_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE + RISC_JUMP_INSTRUCTION_SIZE)
+#define AUDIO_RISC_DMA_BUF_SIZE						\
+	(LINES_PER_AUDIO_BUFFER*RISC_READ_INSTRUCTION_SIZE +		\
+	 RISC_WRITECR_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE +	\
+	 RISC_JUMP_INSTRUCTION_SIZE)
 #endif
 
 #ifndef USE_RISC_NOOP_AUDIO
-#define AUDIO_RISC_DMA_BUF_SIZE    (LINES_PER_AUDIO_BUFFER*RISC_READ_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + RISC_JUMP_INSTRUCTION_SIZE)
+#define AUDIO_RISC_DMA_BUF_SIZE						\
+	(LINES_PER_AUDIO_BUFFER*RISC_READ_INSTRUCTION_SIZE +		\
+	 RISC_WRITECR_INSTRUCTION_SIZE + RISC_JUMP_INSTRUCTION_SIZE)
 #endif
 
 static int _line_size;
-- 
1.7.0.4


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

* [PATCH v3 12/18] Staging: cx25821: Replace :? by if-else in cx25821-video-upstream-ch2.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (10 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 11/18] Staging: cx25821: Fix long lines in cx25821-audio-upstream.h Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 13/18] Staging: cx25821: Fix labels' placement " Leonid V. Fedorenchik
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Replace :? operator by if-else equivalent where it improves readability.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 .../staging/cx25821/cx25821-video-upstream-ch2.c   |   23 ++++++++++---------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
index 655357d..a642416 100644
--- a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
+++ b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
@@ -145,15 +145,16 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,
 	if (dev->_isNTSC_ch2) {
 		odd_num_lines = singlefield_lines + 1;
 		risc_program_size = FRAME1_VID_PROG_SIZE;
-		frame_size =
-		    (bpl ==
-		     Y411_LINE_SZ) ? FRAME_SIZE_NTSC_Y411 :
-		    FRAME_SIZE_NTSC_Y422;
+		if (bpl == Y411_LINE_SZ)
+			frame_size = FRAME_SIZE_NTSC_Y411;
+		else
+			frame_size = FRAME_SIZE_NTSC_Y422;
 	} else {
 		risc_program_size = PAL_VID_PROG_SIZE;
-		frame_size =
-		    (bpl ==
-		     Y411_LINE_SZ) ? FRAME_SIZE_PAL_Y411 : FRAME_SIZE_PAL_Y422;
+		if (bpl == Y411_LINE_SZ)
+			frame_size = FRAME_SIZE_PAL_Y411;
+		else
+			frame_size = FRAME_SIZE_PAL_Y422;
 	}
 
 	/* Virtual address of Risc buffer program */
@@ -565,10 +566,10 @@ int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num,
 			}
 
 			if (dev->_dma_virt_start_addr_ch2 != NULL) {
-				line_size_in_bytes =
-				    (dev->_pixel_format_ch2 ==
-				     PIXEL_FRMT_411) ? Y411_LINE_SZ :
-				    Y422_LINE_SZ;
+				if (dev->_pixel_format_ch2 == PIXEL_FRMT_411)
+					line_size_in_bytes = Y411_LINE_SZ;
+				else
+					line_size_in_bytes = Y422_LINE_SZ;
 				risc_phys_jump_addr =
 				    dev->_dma_phys_start_addr_ch2 +
 				    odd_risc_prog_size;
-- 
1.7.0.4


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

* [PATCH v3 13/18] Staging: cx25821: Fix labels' placement in cx25821-video-upstream-ch2.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (11 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 12/18] Staging: cx25821: Replace :? by if-else in cx25821-video-upstream-ch2.c Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 14/18] Staging: cx25821: Fix wrong line endings " Leonid V. Fedorenchik
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Delete whitespace characters before labels.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 .../staging/cx25821/cx25821-video-upstream-ch2.c   |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
index a642416..b02dbe0 100644
--- a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
+++ b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
@@ -521,7 +521,7 @@ static int cx25821_upstream_buffer_prepare_ch2(struct cx25821_dev *dev,
 
 	return 0;
 
-	error:
+error:
 	return ret;
 }
 
@@ -720,7 +720,7 @@ int cx25821_start_video_dma_upstream_ch2(struct cx25821_dev *dev,
 
 	return 0;
 
-	fail_irq:
+fail_irq:
 	cx25821_dev_unregister(dev);
 	return err;
 }
@@ -830,7 +830,7 @@ int cx25821_vidupstream_init_ch2(struct cx25821_dev *dev, int channel_select,
 
 	return 0;
 
-	error:
+error:
 	cx25821_dev_unregister(dev);
 
 	return err;
-- 
1.7.0.4


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

* [PATCH v3 14/18] Staging: cx25821: Fix wrong line endings in cx25821-video-upstream-ch2.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (12 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 13/18] Staging: cx25821: Fix labels' placement " Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 15/18] Staging: cx25821: Fix long lines " Leonid V. Fedorenchik
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Change obscure line endings to less obscure ones. Rationale: improve
readability.

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 .../staging/cx25821/cx25821-video-upstream-ch2.c   |   24 +++++++------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
index b02dbe0..b281ced 100644
--- a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
+++ b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
@@ -179,17 +179,14 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,
 
 	       /* Even field */
 		rp = cx25821_risc_field_upstream_ch2(dev, rp,
-						     dev->
-						     _data_buf_phys_addr_ch2 +
-						     databuf_offset,
-						     bottom_offset, 0x200, bpl,
-						     singlefield_lines,
-						     fifo_enable, EVEN_FIELD);
+				dev->_data_buf_phys_addr_ch2 + databuf_offset,
+				bottom_offset, 0x200, bpl, singlefield_lines,
+				fifo_enable, EVEN_FIELD);
 
 		if (frame == 0) {
 			risc_flag = RISC_CNT_RESET;
-			risc_phys_jump_addr =
-			    dev->_dma_phys_start_addr_ch2 + risc_program_size;
+			risc_phys_jump_addr = dev->_dma_phys_start_addr_ch2 +
+					risc_program_size;
 		} else {
 			risc_flag = RISC_CNT_INC;
 			risc_phys_jump_addr = dev->_dma_phys_start_addr_ch2;
@@ -511,9 +508,8 @@ static int cx25821_upstream_buffer_prepare_ch2(struct cx25821_dev *dev,
 		return ret;
 
 	/* Creating RISC programs */
-	ret =
-	    cx25821_risc_buffer_upstream_ch2(dev, dev->pci, 0, bpl,
-					     dev->_lines_count_ch2);
+	ret = cx25821_risc_buffer_upstream_ch2(dev, dev->pci, 0, bpl,
+						dev->_lines_count_ch2);
 	if (ret < 0) {
 		pr_info("Failed creating Video Upstream Risc programs!\n");
 		goto error;
@@ -806,8 +802,7 @@ int cx25821_vidupstream_init_ch2(struct cx25821_dev *dev, int channel_select,
 		}
 	}
 
-	retval =
-	    cx25821_sram_channel_setup_upstream(dev, sram_ch,
+	retval = cx25821_sram_channel_setup_upstream(dev, sram_ch,
 						dev->_line_size_ch2, 0);
 
 	/* setup fifo + format */
@@ -817,8 +812,7 @@ int cx25821_vidupstream_init_ch2(struct cx25821_dev *dev, int channel_select,
 	dev->upstream_databuf_size_ch2 = data_frame_size * 2;
 
 	/* Allocating buffers and prepare RISC program */
-	retval =
-	    cx25821_upstream_buffer_prepare_ch2(dev, sram_ch,
+	retval = cx25821_upstream_buffer_prepare_ch2(dev, sram_ch,
 						dev->_line_size_ch2);
 	if (retval < 0) {
 		pr_err("%s: Failed to set up Video upstream buffers!\n",
-- 
1.7.0.4


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

* [PATCH v3 15/18] Staging: cx25821: Fix long lines in cx25821-video-upstream-ch2.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (13 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 14/18] Staging: cx25821: Fix wrong line endings " Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 16/18] Staging: cx25821: Fix long lines in cx25821-video-upstream-ch2.h Leonid V. Fedorenchik
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix long lines in cx25821-video-upstream-ch2.c

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 .../staging/cx25821/cx25821-video-upstream-ch2.c   |   26 +++++++-------------
 1 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
index b281ced..08ac7c1 100644
--- a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
+++ b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c
@@ -40,8 +40,8 @@ MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards");
 MODULE_AUTHOR("Hiep Huynh <hiep.huynh@conexant.com>");
 MODULE_LICENSE("GPL");
 
-static int _intr_msk =
-	FLD_VID_SRC_RISC1 | FLD_VID_SRC_UF | FLD_VID_SRC_SYNC | FLD_VID_SRC_OPC_ERR;
+static int _intr_msk = FLD_VID_SRC_RISC1 | FLD_VID_SRC_UF | FLD_VID_SRC_SYNC |
+			FLD_VID_SRC_OPC_ERR;
 
 static __le32 *cx25821_update_riscprogram_ch2(struct cx25821_dev *dev,
 					      __le32 *rp, unsigned int offset,
@@ -166,13 +166,9 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,
 		if (UNSET != top_offset) {
 			fifo_enable = (frame == 0) ? FIFO_ENABLE : FIFO_DISABLE;
 			rp = cx25821_risc_field_upstream_ch2(dev, rp,
-							     dev->
-							     _data_buf_phys_addr_ch2
-							     + databuf_offset,
-							     top_offset, 0, bpl,
-							     odd_num_lines,
-							     fifo_enable,
-							     ODD_FIELD);
+				dev->_data_buf_phys_addr_ch2 + databuf_offset,
+				top_offset, 0, bpl, odd_num_lines, fifo_enable,
+				ODD_FIELD);
 		}
 
 		fifo_enable = FIFO_DISABLE;
@@ -571,14 +567,10 @@ int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num,
 				    odd_risc_prog_size;
 
 				rp = cx25821_update_riscprogram_ch2(dev,
-								    dev->
-								    _dma_virt_start_addr_ch2,
-								    TOP_OFFSET,
-								    line_size_in_bytes,
-								    0x0,
-								    singlefield_lines,
-								    FIFO_DISABLE,
-								    ODD_FIELD);
+						dev->_dma_virt_start_addr_ch2,
+						TOP_OFFSET, line_size_in_bytes,
+						0x0, singlefield_lines,
+						FIFO_DISABLE, ODD_FIELD);
 
 			       /* Jump to Even Risc program of 1st Frame */
 				*(rp++) = cpu_to_le32(RISC_JUMP);
-- 
1.7.0.4


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

* [PATCH v3 16/18] Staging: cx25821: Fix long lines in cx25821-video-upstream-ch2.h
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (14 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 15/18] Staging: cx25821: Fix long lines " Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 17/18] Staging: cx25821: Fix long lines in cx25821-video-upstream.c Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 18/18] Staging: cx25821: Fix long lines in cx25821-video-upstream.h Leonid V. Fedorenchik
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix long lines in cx25821-video-upstream-ch2.h

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 .../staging/cx25821/cx25821-video-upstream-ch2.h   |   83 ++++++++++++++------
 1 files changed, 60 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-video-upstream-ch2.h b/drivers/staging/cx25821/cx25821-video-upstream-ch2.h
index 029e830..c68aa29 100644
--- a/drivers/staging/cx25821/cx25821-video-upstream-ch2.h
+++ b/drivers/staging/cx25821/cx25821-video-upstream-ch2.h
@@ -65,37 +65,74 @@
 #define USE_RISC_NOOP_VIDEO   1
 
 #ifdef USE_RISC_NOOP_VIDEO
-#define PAL_US_VID_PROG_SIZE      ((PAL_FIELD_HEIGHT) * 3 * DWORD_SIZE + RISC_WRITECR_INSTRUCTION_SIZE +   \
-				    RISC_SYNC_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE)
+#define PAL_US_VID_PROG_SIZE						\
+	(PAL_FIELD_HEIGHT * 3 * DWORD_SIZE +				\
+	 RISC_WRITECR_INSTRUCTION_SIZE + RISC_SYNC_INSTRUCTION_SIZE +	\
+	 NUM_NO_OPS * DWORD_SIZE)
 
 #define PAL_RISC_BUF_SIZE         (2 * PAL_US_VID_PROG_SIZE)
 
-#define PAL_VID_PROG_SIZE         ((PAL_FIELD_HEIGHT*2) * 3 * DWORD_SIZE + 2*RISC_SYNC_INSTRUCTION_SIZE + \
-				    RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE + 2*NUM_NO_OPS*DWORD_SIZE)
+#define PAL_VID_PROG_SIZE						\
+	((PAL_FIELD_HEIGHT * 2) * 3 * DWORD_SIZE +			\
+	 2 * RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
+	 JUMP_INSTRUCTION_SIZE + 2 * NUM_NO_OPS * DWORD_SIZE)
 
-#define ODD_FLD_PAL_PROG_SIZE     ((PAL_FIELD_HEIGHT) * 3 * DWORD_SIZE + RISC_SYNC_INSTRUCTION_SIZE + \
-				    RISC_WRITECR_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE)
+#define ODD_FLD_PAL_PROG_SIZE						\
+	(PAL_FIELD_HEIGHT * 3 * DWORD_SIZE +				\
+	 RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE +	\
+	 NUM_NO_OPS * DWORD_SIZE)
 
-#define NTSC_US_VID_PROG_SIZE     ((NTSC_ODD_FLD_LINES + 1) * 3 * DWORD_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
-				    JUMP_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE)
+#define NTSC_US_VID_PROG_SIZE						\
+	((NTSC_ODD_FLD_LINES + 1) * 3 * DWORD_SIZE +			\
+	 RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE +	\
+	 NUM_NO_OPS * DWORD_SIZE)
 
-#define NTSC_RISC_BUF_SIZE        (2 * (RISC_SYNC_INSTRUCTION_SIZE + NTSC_US_VID_PROG_SIZE))
+#define NTSC_RISC_BUF_SIZE						\
+	(2 * (RISC_SYNC_INSTRUCTION_SIZE + NTSC_US_VID_PROG_SIZE))
 
-#define FRAME1_VID_PROG_SIZE      ((NTSC_ODD_FLD_LINES + NTSC_FIELD_HEIGHT) * 3 * DWORD_SIZE + 2*RISC_SYNC_INSTRUCTION_SIZE + \
-				    RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE + 2*NUM_NO_OPS*DWORD_SIZE)
-#define ODD_FLD_NTSC_PROG_SIZE    ((NTSC_ODD_FLD_LINES) * 3 * DWORD_SIZE + RISC_SYNC_INSTRUCTION_SIZE + \
-				    RISC_WRITECR_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE)
+#define FRAME1_VID_PROG_SIZE						\
+	((NTSC_ODD_FLD_LINES + NTSC_FIELD_HEIGHT) *			\
+	 3 * DWORD_SIZE + 2 * RISC_SYNC_INSTRUCTION_SIZE +		\
+	 RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE +	\
+	 2 * NUM_NO_OPS * DWORD_SIZE)
+
+#define ODD_FLD_NTSC_PROG_SIZE						\
+	(NTSC_ODD_FLD_LINES * 3 * DWORD_SIZE +				\
+	 RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE +	\
+	 NUM_NO_OPS * DWORD_SIZE)
 #endif
 
 #ifndef USE_RISC_NOOP_VIDEO
-#define PAL_US_VID_PROG_SIZE      ((PAL_FIELD_HEIGHT + 1) * 3 * DWORD_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
-#define PAL_RISC_BUF_SIZE         (2 * (RISC_SYNC_INSTRUCTION_SIZE + PAL_US_VID_PROG_SIZE))
-#define PAL_VID_PROG_SIZE         ((PAL_FIELD_HEIGHT*2) * 3 * DWORD_SIZE + 2*RISC_SYNC_INSTRUCTION_SIZE + \
-				    RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
-#define ODD_FLD_PAL_PROG_SIZE     ((PAL_FIELD_HEIGHT) * 3 * DWORD_SIZE + RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
-#define ODD_FLD_NTSC_PROG_SIZE    ((NTSC_ODD_FLD_LINES) * 3 * DWORD_SIZE + RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
-#define NTSC_US_VID_PROG_SIZE     ((NTSC_ODD_FLD_LINES + 1) * 3 * DWORD_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
-#define NTSC_RISC_BUF_SIZE        (2 * (RISC_SYNC_INSTRUCTION_SIZE + NTSC_US_VID_PROG_SIZE))
-#define FRAME1_VID_PROG_SIZE      ((NTSC_ODD_FLD_LINES + NTSC_FIELD_HEIGHT) * 3 * DWORD_SIZE + 2*RISC_SYNC_INSTRUCTION_SIZE + \
-				    RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
+#define PAL_US_VID_PROG_SIZE						\
+	((PAL_FIELD_HEIGHT + 1) * 3 * DWORD_SIZE +			\
+	 RISC_WRITECR_INSTRUCTION_SIZE)
+
+#define PAL_RISC_BUF_SIZE						\
+	(2 * (RISC_SYNC_INSTRUCTION_SIZE + PAL_US_VID_PROG_SIZE))
+
+#define PAL_VID_PROG_SIZE						\
+	((PAL_FIELD_HEIGHT*2) * 3 * DWORD_SIZE +			\
+	 2 * RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
+	 JUMP_INSTRUCTION_SIZE)
+
+#define ODD_FLD_PAL_PROG_SIZE						\
+	(PAL_FIELD_HEIGHT * 3 * DWORD_SIZE +				\
+	 RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
+
+#define ODD_FLD_NTSC_PROG_SIZE						\
+	(NTSC_ODD_FLD_LINES * 3 * DWORD_SIZE +				\
+	 RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
+
+#define NTSC_US_VID_PROG_SIZE						\
+	((NTSC_ODD_FLD_LINES + 1) * 3 * DWORD_SIZE +			\
+	 RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
+
+#define NTSC_RISC_BUF_SIZE						\
+	(2 * (RISC_SYNC_INSTRUCTION_SIZE + NTSC_US_VID_PROG_SIZE))
+
+#define FRAME1_VID_PROG_SIZE						\
+	((NTSC_ODD_FLD_LINES + NTSC_FIELD_HEIGHT) *			\
+	 3 * DWORD_SIZE + 2 * RISC_SYNC_INSTRUCTION_SIZE +		\
+	 RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
+
 #endif
-- 
1.7.0.4


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

* [PATCH v3 17/18] Staging: cx25821: Fix long lines in cx25821-video-upstream.c
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (15 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 16/18] Staging: cx25821: Fix long lines in cx25821-video-upstream-ch2.h Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  2011-08-30  4:17 ` [PATCH v3 18/18] Staging: cx25821: Fix long lines in cx25821-video-upstream.h Leonid V. Fedorenchik
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix long lines in cx25821-video-upstream.c

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-video-upstream.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-video-upstream.c b/drivers/staging/cx25821/cx25821-video-upstream.c
index eb0172b..14a6a6c 100644
--- a/drivers/staging/cx25821/cx25821-video-upstream.c
+++ b/drivers/staging/cx25821/cx25821-video-upstream.c
@@ -40,8 +40,8 @@ MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards");
 MODULE_AUTHOR("Hiep Huynh <hiep.huynh@conexant.com>");
 MODULE_LICENSE("GPL");
 
-static int _intr_msk =
-	FLD_VID_SRC_RISC1 | FLD_VID_SRC_UF | FLD_VID_SRC_SYNC | FLD_VID_SRC_OPC_ERR;
+static int _intr_msk = FLD_VID_SRC_RISC1 | FLD_VID_SRC_UF | FLD_VID_SRC_SYNC |
+			FLD_VID_SRC_OPC_ERR;
 
 int cx25821_sram_channel_setup_upstream(struct cx25821_dev *dev,
 					struct sram_channel *ch,
@@ -615,14 +615,10 @@ int cx25821_video_upstream_irq(struct cx25821_dev *dev, int chan_num,
 				    odd_risc_prog_size;
 
 				rp = cx25821_update_riscprogram(dev,
-								dev->
-								_dma_virt_start_addr,
-								TOP_OFFSET,
-								line_size_in_bytes,
-								0x0,
-								singlefield_lines,
-								FIFO_DISABLE,
-								ODD_FIELD);
+					dev->_dma_virt_start_addr, TOP_OFFSET,
+					line_size_in_bytes, 0x0,
+					singlefield_lines, FIFO_DISABLE,
+					ODD_FIELD);
 
 				/* Jump to Even Risc program of 1st Frame */
 				*(rp++) = cpu_to_le32(RISC_JUMP);
-- 
1.7.0.4


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

* [PATCH v3 18/18] Staging: cx25821: Fix long lines in cx25821-video-upstream.h
  2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
                   ` (16 preceding siblings ...)
  2011-08-30  4:17 ` [PATCH v3 17/18] Staging: cx25821: Fix long lines in cx25821-video-upstream.c Leonid V. Fedorenchik
@ 2011-08-30  4:17 ` Leonid V. Fedorenchik
  17 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-30  4:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mauro Carvalho Chehab, Ruslan Pisarev, Ilia Mirkin, Ilya Gorskin,
	Joe Perches, Palash Bandyopadhyay, Hans Verkuil, Arnd Bergmann,
	Youquan Song, linux-kernel, devel, Leonid V. Fedorenchik

Fix long lines in cx25821-video-upstream.h

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
---
 drivers/staging/cx25821/cx25821-video-upstream.h |   78 +++++++++++++++-------
 1 files changed, 54 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-video-upstream.h b/drivers/staging/cx25821/cx25821-video-upstream.h
index f0b3ac0..268ec8a 100644
--- a/drivers/staging/cx25821/cx25821-video-upstream.h
+++ b/drivers/staging/cx25821/cx25821-video-upstream.h
@@ -66,44 +66,74 @@
 #define USE_RISC_NOOP_VIDEO   1
 
 #ifdef USE_RISC_NOOP_VIDEO
-#define PAL_US_VID_PROG_SIZE        ((PAL_FIELD_HEIGHT) * 3 * DWORD_SIZE + RISC_WRITECR_INSTRUCTION_SIZE +   \
-				      RISC_SYNC_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE)
+#define PAL_US_VID_PROG_SIZE						\
+	(PAL_FIELD_HEIGHT * 3 * DWORD_SIZE +				\
+	 RISC_WRITECR_INSTRUCTION_SIZE + RISC_SYNC_INSTRUCTION_SIZE +	\
+	 NUM_NO_OPS * DWORD_SIZE)
 
 #define PAL_RISC_BUF_SIZE           (2 * PAL_US_VID_PROG_SIZE)
 
-#define PAL_VID_PROG_SIZE           ((PAL_FIELD_HEIGHT*2) * 3 * DWORD_SIZE + 2*RISC_SYNC_INSTRUCTION_SIZE + \
-				      RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE + 2*NUM_NO_OPS*DWORD_SIZE)
+#define PAL_VID_PROG_SIZE						\
+	((PAL_FIELD_HEIGHT * 2) * 3 * DWORD_SIZE +			\
+	 2 * RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
+	 JUMP_INSTRUCTION_SIZE + 2 * NUM_NO_OPS * DWORD_SIZE)
 
-#define ODD_FLD_PAL_PROG_SIZE       ((PAL_FIELD_HEIGHT) * 3 * DWORD_SIZE + RISC_SYNC_INSTRUCTION_SIZE + \
-				      RISC_WRITECR_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE)
+#define ODD_FLD_PAL_PROG_SIZE						\
+	(PAL_FIELD_HEIGHT * 3 * DWORD_SIZE +				\
+	 RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE +	\
+	 NUM_NO_OPS * DWORD_SIZE)
 
-#define ODD_FLD_NTSC_PROG_SIZE      ((NTSC_ODD_FLD_LINES) * 3 * DWORD_SIZE + RISC_SYNC_INSTRUCTION_SIZE + \
-				      RISC_WRITECR_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE)
+#define ODD_FLD_NTSC_PROG_SIZE						\
+	(NTSC_ODD_FLD_LINES * 3 * DWORD_SIZE +				\
+	 RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE +	\
+	 NUM_NO_OPS * DWORD_SIZE)
 
-#define NTSC_US_VID_PROG_SIZE       ((NTSC_ODD_FLD_LINES + 1) * 3 * DWORD_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
-				      JUMP_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE)
+#define NTSC_US_VID_PROG_SIZE						\
+	((NTSC_ODD_FLD_LINES + 1) * 3 * DWORD_SIZE +			\
+	 RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE +	\
+	 NUM_NO_OPS * DWORD_SIZE)
 
-#define NTSC_RISC_BUF_SIZE          (2 * (RISC_SYNC_INSTRUCTION_SIZE + NTSC_US_VID_PROG_SIZE))
+#define NTSC_RISC_BUF_SIZE						\
+	(2 * (RISC_SYNC_INSTRUCTION_SIZE + NTSC_US_VID_PROG_SIZE))
 
-#define FRAME1_VID_PROG_SIZE        ((NTSC_ODD_FLD_LINES + NTSC_FIELD_HEIGHT) * 3 * DWORD_SIZE + 2*RISC_SYNC_INSTRUCTION_SIZE + \
-				      RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE + 2*NUM_NO_OPS*DWORD_SIZE)
+#define FRAME1_VID_PROG_SIZE						\
+	((NTSC_ODD_FLD_LINES + NTSC_FIELD_HEIGHT) * 3 * DWORD_SIZE +	\
+	 2 * RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
+	 JUMP_INSTRUCTION_SIZE + 2 * NUM_NO_OPS * DWORD_SIZE)
 
 #endif
 
 #ifndef USE_RISC_NOOP_VIDEO
-#define PAL_US_VID_PROG_SIZE        ((PAL_FIELD_HEIGHT) * 3 * DWORD_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
-				      RISC_SYNC_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
+#define PAL_US_VID_PROG_SIZE						\
+	(PAL_FIELD_HEIGHT * 3 * DWORD_SIZE +				\
+	 RISC_WRITECR_INSTRUCTION_SIZE + RISC_SYNC_INSTRUCTION_SIZE +	\
+	 JUMP_INSTRUCTION_SIZE)
 
-#define PAL_RISC_BUF_SIZE           (2 * PAL_US_VID_PROG_SIZE)
+#define PAL_RISC_BUF_SIZE		(2 * PAL_US_VID_PROG_SIZE)
+
+#define PAL_VID_PROG_SIZE						\
+	((PAL_FIELD_HEIGHT * 2) * 3 * DWORD_SIZE +			\
+	 2 * RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
+	 JUMP_INSTRUCTION_SIZE)
+
+#define ODD_FLD_PAL_PROG_SIZE						\
+	(PAL_FIELD_HEIGHT * 3 * DWORD_SIZE +				\
+	 RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
+
+#define ODD_FLD_NTSC_PROG_SIZE						\
+	(NTSC_ODD_FLD_LINES * 3 * DWORD_SIZE +				\
+	 RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
+
+#define NTSC_US_VID_PROG_SIZE						\
+	((NTSC_ODD_FLD_LINES + 1) * 3 * DWORD_SIZE +			\
+	 RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
 
-#define PAL_VID_PROG_SIZE           ((PAL_FIELD_HEIGHT*2) * 3 * DWORD_SIZE + 2*RISC_SYNC_INSTRUCTION_SIZE + \
-				      RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
+#define NTSC_RISC_BUF_SIZE						\
+	(2 * (RISC_SYNC_INSTRUCTION_SIZE + NTSC_US_VID_PROG_SIZE))
 
-#define ODD_FLD_PAL_PROG_SIZE       ((PAL_FIELD_HEIGHT) * 3 * DWORD_SIZE + RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
-#define ODD_FLD_NTSC_PROG_SIZE      ((NTSC_ODD_FLD_LINES) * 3 * DWORD_SIZE + RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE)
+#define FRAME1_VID_PROG_SIZE						\
+	((NTSC_ODD_FLD_LINES + NTSC_FIELD_HEIGHT) * 3 * DWORD_SIZE +	\
+	 2 * RISC_SYNC_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + \
+	 JUMP_INSTRUCTION_SIZE)
 
-#define NTSC_US_VID_PROG_SIZE       ((NTSC_ODD_FLD_LINES + 1) * 3 * DWORD_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
-#define NTSC_RISC_BUF_SIZE          (2 * (RISC_SYNC_INSTRUCTION_SIZE + NTSC_US_VID_PROG_SIZE))
-#define FRAME1_VID_PROG_SIZE        ((NTSC_ODD_FLD_LINES + NTSC_FIELD_HEIGHT) * 3 * DWORD_SIZE + 2*RISC_SYNC_INSTRUCTION_SIZE + \
-				      RISC_WRITECR_INSTRUCTION_SIZE + JUMP_INSTRUCTION_SIZE)
 #endif
-- 
1.7.0.4


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

* Re: [PATCH v3 05/18] Staging: cx25821: Fix wrong brace placement in cx25821-cards.c
  2011-08-30  4:17 ` [PATCH v3 05/18] Staging: cx25821: Fix wrong brace placement in cx25821-cards.c Leonid V. Fedorenchik
@ 2011-08-30 14:05   ` Dan Carpenter
  2011-08-31  6:26     ` Leonid V. Fedorenchik
  0 siblings, 1 reply; 25+ messages in thread
From: Dan Carpenter @ 2011-08-30 14:05 UTC (permalink / raw)
  To: Leonid V. Fedorenchik
  Cc: Greg Kroah-Hartman, Youquan Song, Mauro Carvalho Chehab,
	Arnd Bergmann, linux-kernel, Hans Verkuil, Palash Bandyopadhyay,
	Ruslan Pisarev, devel, Joe Perches, Ilya Gorskin, Ilia Mirkin

On Tue, Aug 30, 2011 at 12:17:00PM +0800, Leonid V. Fedorenchik wrote:
> Fix wrong brace placement in cx25821-cards.c
> 
> Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
> ---
>  drivers/staging/cx25821/cx25821-cards.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/cx25821/cx25821-cards.c b/drivers/staging/cx25821/cx25821-cards.c
> index 94e8d68..876345a 100644
> --- a/drivers/staging/cx25821/cx25821-cards.c
> +++ b/drivers/staging/cx25821/cx25821-cards.c
> @@ -39,14 +39,14 @@ struct cx25821_board cx25821_boards[] = {
>  			   .name = "UNKNOWN/GENERIC",
>  			   /* Ensure safe default for unknown boards */
>  			   .clk_freq = 0,
                           ^^^^^^^^^^^^^
You may as well pull these in an indent level while you're at it.

> -			   },
> +	},

regards,
dan carpenter


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

* Re: [PATCH v3 08/18] Staging: cx25821: Fix too long lines in cx25821-audio.h
  2011-08-30  4:17 ` [PATCH v3 08/18] Staging: cx25821: Fix too long lines in cx25821-audio.h Leonid V. Fedorenchik
@ 2011-08-30 14:08   ` Dan Carpenter
  2011-08-31  6:27     ` Leonid V. Fedorenchik
  0 siblings, 1 reply; 25+ messages in thread
From: Dan Carpenter @ 2011-08-30 14:08 UTC (permalink / raw)
  To: Leonid V. Fedorenchik
  Cc: Greg Kroah-Hartman, Youquan Song, Mauro Carvalho Chehab,
	Arnd Bergmann, linux-kernel, Hans Verkuil, Palash Bandyopadhyay,
	Ruslan Pisarev, devel, Joe Perches, Ilya Gorskin, Ilia Mirkin

On Tue, Aug 30, 2011 at 12:17:03PM +0800, Leonid V. Fedorenchik wrote:
> @@ -36,13 +36,15 @@
>   */
>  #ifndef USE_RISC_NOOP
>  #define MAX_BUFFER_PROGRAM_SIZE     \
> -	(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE*4)
> +	(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + \
> +	RISC_WRITECR_INSTRUCTION_SIZE*4)

Put spaces around the operands:

+	(2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \
+		RISC_WRITECR_INSTRUCTION_SIZE * 4)

regards,
dan carpenter



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

* Re: [PATCH v3 10/18] Staging: cx25821: Fix long lines in cx25821-audio-upstream.c
  2011-08-30  4:17 ` [PATCH v3 10/18] Staging: cx25821: Fix long lines " Leonid V. Fedorenchik
@ 2011-08-30 14:12   ` Dan Carpenter
  2011-08-31  6:56     ` Leonid V. Fedorenchik
  0 siblings, 1 reply; 25+ messages in thread
From: Dan Carpenter @ 2011-08-30 14:12 UTC (permalink / raw)
  To: Leonid V. Fedorenchik
  Cc: Greg Kroah-Hartman, Youquan Song, Mauro Carvalho Chehab,
	Arnd Bergmann, linux-kernel, Hans Verkuil, Palash Bandyopadhyay,
	Ruslan Pisarev, devel, Joe Perches, Ilya Gorskin, Ilia Mirkin

On Tue, Aug 30, 2011 at 12:17:05PM +0800, Leonid V. Fedorenchik wrote:
> @@ -603,7 +599,8 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
>  	if (!dev)
>  		return -1;
>  
> -	sram_ch = dev->channels[dev->_audio_upstream_channel_select].sram_channels;
> +	sram_ch = dev->channels[dev->_audio_upstream_channel_select].
> +			sram_channels;

$ echo -n "_audio_upstream_channel_select" | wc -c 
30

I think I may have found the problem.  (Don't use variable names that
are a 30 zillion chars long).

regards,
dan carpenter


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

* Re: [PATCH v3 05/18] Staging: cx25821: Fix wrong brace placement in cx25821-cards.c
  2011-08-30 14:05   ` Dan Carpenter
@ 2011-08-31  6:26     ` Leonid V. Fedorenchik
  0 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-31  6:26 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Youquan Song, Mauro Carvalho Chehab,
	Arnd Bergmann, linux-kernel, Hans Verkuil, Palash Bandyopadhyay,
	Ruslan Pisarev, devel, Joe Perches, Ilya Gorskin, Ilia Mirkin

On Tue, 30 Aug 2011 17:05:32 +0300
Dan Carpenter <error27@gmail.com> wrote:

> On Tue, Aug 30, 2011 at 12:17:00PM +0800, Leonid V. Fedorenchik wrote:
> > Fix wrong brace placement in cx25821-cards.c
> > 
> > Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
> > ---
> >  drivers/staging/cx25821/cx25821-cards.c |    6 +++---
> >  1 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/staging/cx25821/cx25821-cards.c b/drivers/staging/cx25821/cx25821-cards.c
> > index 94e8d68..876345a 100644
> > --- a/drivers/staging/cx25821/cx25821-cards.c
> > +++ b/drivers/staging/cx25821/cx25821-cards.c
> > @@ -39,14 +39,14 @@ struct cx25821_board cx25821_boards[] = {
> >  			   .name = "UNKNOWN/GENERIC",
> >  			   /* Ensure safe default for unknown boards */
> >  			   .clk_freq = 0,
>                            ^^^^^^^^^^^^^
> You may as well pull these in an indent level while you're at it.
OK. Didn't think about it. Thanks.
> 
> > -			   },
> > +	},
> 
> regards,
> dan carpenter
> 



Leonid V. Fedorenchik

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

* Re: [PATCH v3 08/18] Staging: cx25821: Fix too long lines in cx25821-audio.h
  2011-08-30 14:08   ` Dan Carpenter
@ 2011-08-31  6:27     ` Leonid V. Fedorenchik
  0 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-31  6:27 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Youquan Song, Mauro Carvalho Chehab,
	Arnd Bergmann, linux-kernel, Hans Verkuil, Palash Bandyopadhyay,
	Ruslan Pisarev, devel, Joe Perches, Ilya Gorskin, Ilia Mirkin

On Tue, 30 Aug 2011 17:08:19 +0300
Dan Carpenter <error27@gmail.com> wrote:

> On Tue, Aug 30, 2011 at 12:17:03PM +0800, Leonid V. Fedorenchik wrote:
> > @@ -36,13 +36,15 @@
> >   */
> >  #ifndef USE_RISC_NOOP
> >  #define MAX_BUFFER_PROGRAM_SIZE     \
> > -	(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE*4)
> > +	(2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + \
> > +	RISC_WRITECR_INSTRUCTION_SIZE*4)
> 
> Put spaces around the operands:
> 
> +	(2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \
> +		RISC_WRITECR_INSTRUCTION_SIZE * 4)
> 
I've missed this. Thanks.

> regards,
> dan carpenter
> 
> 



Leonid V. Fedorenchik

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

* Re: [PATCH v3 10/18] Staging: cx25821: Fix long lines in cx25821-audio-upstream.c
  2011-08-30 14:12   ` Dan Carpenter
@ 2011-08-31  6:56     ` Leonid V. Fedorenchik
  0 siblings, 0 replies; 25+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-31  6:56 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Youquan Song, Mauro Carvalho Chehab,
	Arnd Bergmann, linux-kernel, Hans Verkuil, Palash Bandyopadhyay,
	Ruslan Pisarev, devel, Joe Perches, Ilya Gorskin, Ilia Mirkin

On Tue, 30 Aug 2011 17:12:50 +0300
Dan Carpenter <error27@gmail.com> wrote:

> On Tue, Aug 30, 2011 at 12:17:05PM +0800, Leonid V. Fedorenchik wrote:
> > @@ -603,7 +599,8 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
> >  	if (!dev)
> >  		return -1;
> >  
> > -	sram_ch = dev->channels[dev->_audio_upstream_channel_select].sram_channels;
> > +	sram_ch = dev->channels[dev->_audio_upstream_channel_select].
> > +			sram_channels;
> 
> $ echo -n "_audio_upstream_channel_select" | wc -c 
> 30
> 
> I think I may have found the problem.  (Don't use variable names that
> are a 30 zillion chars long).
Yes, it's long, but I don't really know how to make it shorter. Is
_audio_upstream_channel OK?

> 
> regards,
> dan carpenter
> 



Leonid V. Fedorenchik

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

end of thread, other threads:[~2011-08-31  6:56 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-30  4:16 [PATCH v3 00/18] Staging: cx25821: Fix style issues Leonid V. Fedorenchik
2011-08-30  4:16 ` [PATCH v3 01/18] Staging: cx25821: Get rid of typedef in cx25821.h Leonid V. Fedorenchik
2011-08-30  4:16 ` [PATCH v3 02/18] Staging: cx25821: Delete file cx25821-gpio.h Leonid V. Fedorenchik
2011-08-30  4:16 ` [PATCH v3 03/18] Staging: cx25821: Move EXPORT_SYMBOL() to the right place Leonid V. Fedorenchik
2011-08-30  4:16 ` [PATCH v3 04/18] Staging: cx25821: Use DEFINE_PCI_DEVICE_TABLE for cx25821_pci_tbl Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 05/18] Staging: cx25821: Fix wrong brace placement in cx25821-cards.c Leonid V. Fedorenchik
2011-08-30 14:05   ` Dan Carpenter
2011-08-31  6:26     ` Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 06/18] Staging: cx25821: Fix wrong brace placement in cx25821-core.c Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 07/18] Staging: cx25821: Fix wrong brace placement in cx25821-i2c.c Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 08/18] Staging: cx25821: Fix too long lines in cx25821-audio.h Leonid V. Fedorenchik
2011-08-30 14:08   ` Dan Carpenter
2011-08-31  6:27     ` Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 09/18] Staging: cx25821: Fix obscure line endings in cx25821-audio-upstream.c Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 10/18] Staging: cx25821: Fix long lines " Leonid V. Fedorenchik
2011-08-30 14:12   ` Dan Carpenter
2011-08-31  6:56     ` Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 11/18] Staging: cx25821: Fix long lines in cx25821-audio-upstream.h Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 12/18] Staging: cx25821: Replace :? by if-else in cx25821-video-upstream-ch2.c Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 13/18] Staging: cx25821: Fix labels' placement " Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 14/18] Staging: cx25821: Fix wrong line endings " Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 15/18] Staging: cx25821: Fix long lines " Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 16/18] Staging: cx25821: Fix long lines in cx25821-video-upstream-ch2.h Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 17/18] Staging: cx25821: Fix long lines in cx25821-video-upstream.c Leonid V. Fedorenchik
2011-08-30  4:17 ` [PATCH v3 18/18] Staging: cx25821: Fix long lines in cx25821-video-upstream.h Leonid V. Fedorenchik

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