linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] stv090x: Fix typo in register macros
@ 2012-02-27 20:42 Andreas Regel
  2012-03-11 13:50 ` Mauro Carvalho Chehab
  2012-05-15 12:43 ` Manu Abraham
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Regel @ 2012-02-27 20:42 UTC (permalink / raw)
  To: abraham.manu; +Cc: linux-media

Fix typo in register macros of ERRCNT2.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
---
  drivers/media/dvb/frontends/stv090x.c     |    2 +-
  drivers/media/dvb/frontends/stv090x_reg.h |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/dvb/frontends/stv090x.c 
b/drivers/media/dvb/frontends/stv090x.c
index 4aef187..6c3c095 100644
--- a/drivers/media/dvb/frontends/stv090x.c
+++ b/drivers/media/dvb/frontends/stv090x.c
@@ -3526,7 +3526,7 @@ static int stv090x_read_per(struct dvb_frontend 
*fe, u32 *per)
  	} else {
  		/* Counter 2 */
  		reg = STV090x_READ_DEMOD(state, ERRCNT22);
-		h = STV090x_GETFIELD_Px(reg, ERR_CNT2_FIELD);
+		h = STV090x_GETFIELD_Px(reg, ERR_CNT22_FIELD);
   		reg = STV090x_READ_DEMOD(state, ERRCNT21);
  		m = STV090x_GETFIELD_Px(reg, ERR_CNT21_FIELD);
diff --git a/drivers/media/dvb/frontends/stv090x_reg.h 
b/drivers/media/dvb/frontends/stv090x_reg.h
index 93741ee..26c8885 100644
--- a/drivers/media/dvb/frontends/stv090x_reg.h
+++ b/drivers/media/dvb/frontends/stv090x_reg.h
@@ -2232,8 +2232,8 @@
  #define STV090x_P2_ERRCNT22				STV090x_Px_ERRCNT22(2)
  #define STV090x_OFFST_Px_ERRCNT2_OLDVALUE_FIELD		7
  #define STV090x_WIDTH_Px_ERRCNT2_OLDVALUE_FIELD		1
-#define STV090x_OFFST_Px_ERR_CNT2_FIELD			0
-#define STV090x_WIDTH_Px_ERR_CNT2_FIELD			7
+#define STV090x_OFFST_Px_ERR_CNT22_FIELD		0
+#define STV090x_WIDTH_Px_ERR_CNT22_FIELD		7
   #define STV090x_Px_ERRCNT21(__x)			(0xF59E - (__x - 1) * 0x200)
  #define STV090x_P1_ERRCNT21				STV090x_Px_ERRCNT21(1)
-- 
1.7.2.5


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

* Re: [PATCH 1/3] stv090x: Fix typo in register macros
  2012-02-27 20:42 [PATCH 1/3] stv090x: Fix typo in register macros Andreas Regel
@ 2012-03-11 13:50 ` Mauro Carvalho Chehab
  2012-03-11 17:59   ` Andreas Regel
  2012-05-15 12:43 ` Manu Abraham
  1 sibling, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2012-03-11 13:50 UTC (permalink / raw)
  To: Andreas Regel; +Cc: abraham.manu, linux-media

Em 27-02-2012 17:42, Andreas Regel escreveu:
> Fix typo in register macros of ERRCNT2.

Patch is line-wrapped:

patch -p1 -i patches/lmml_10078_1_3_stv090x_fix_typo_in_register_macros.patch --dry-run -t -N
patching file drivers/media/dvb/frontends/stv090x.c
patch: **** malformed patch at line 33: *fe, u32 *per)

Patch may be line wrapped
patching file drivers/media/dvb/frontends/stv090x.c
Hunk #1 FAILED at 3526.
patch: **** malformed patch at line 34:  

But, even fixing it, it still doesn't apply:

patch -p1 -i patches/lmml_10078_1_3_stv090x_fix_typo_in_register_macros.patch --dry-run -t -N
patching file drivers/media/dvb/frontends/stv090x.c
Hunk #1 FAILED at 3526.
1 out of 1 hunk FAILED -- saving rejects to file drivers/media/dvb/frontends/stv090x.c.rej
patching file drivers/media/dvb/frontends/stv090x_reg.h
Hunk #1 FAILED at 2232.
1 out of 1 hunk FAILED -- saving rejects to file drivers/media/dvb/frontends/stv090x_reg.h.rej


> 
> Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
> ---
>  drivers/media/dvb/frontends/stv090x.c     |    2 +-
>  drivers/media/dvb/frontends/stv090x_reg.h |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c
> index 4aef187..6c3c095 100644
> --- a/drivers/media/dvb/frontends/stv090x.c
> +++ b/drivers/media/dvb/frontends/stv090x.c
> @@ -3526,7 +3526,7 @@ static int stv090x_read_per(struct dvb_frontend *fe, u32 *per)
>      } else {
>          /* Counter 2 */
>          reg = STV090x_READ_DEMOD(state, ERRCNT22);
> -        h = STV090x_GETFIELD_Px(reg, ERR_CNT2_FIELD);
> +        h = STV090x_GETFIELD_Px(reg, ERR_CNT22_FIELD);
>           reg = STV090x_READ_DEMOD(state, ERRCNT21);
>          m = STV090x_GETFIELD_Px(reg, ERR_CNT21_FIELD);
> diff --git a/drivers/media/dvb/frontends/stv090x_reg.h b/drivers/media/dvb/frontends/stv090x_reg.h
> index 93741ee..26c8885 100644
> --- a/drivers/media/dvb/frontends/stv090x_reg.h
> +++ b/drivers/media/dvb/frontends/stv090x_reg.h
> @@ -2232,8 +2232,8 @@
>  #define STV090x_P2_ERRCNT22                STV090x_Px_ERRCNT22(2)
>  #define STV090x_OFFST_Px_ERRCNT2_OLDVALUE_FIELD        7
>  #define STV090x_WIDTH_Px_ERRCNT2_OLDVALUE_FIELD        1
> -#define STV090x_OFFST_Px_ERR_CNT2_FIELD            0
> -#define STV090x_WIDTH_Px_ERR_CNT2_FIELD            7
> +#define STV090x_OFFST_Px_ERR_CNT22_FIELD        0
> +#define STV090x_WIDTH_Px_ERR_CNT22_FIELD        7
>   #define STV090x_Px_ERRCNT21(__x)            (0xF59E - (__x - 1) * 0x200)
>  #define STV090x_P1_ERRCNT21                STV090x_Px_ERRCNT21(1)


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

* Re: [PATCH 1/3] stv090x: Fix typo in register macros
  2012-03-11 13:50 ` Mauro Carvalho Chehab
@ 2012-03-11 17:59   ` Andreas Regel
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Regel @ 2012-03-11 17:59 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: abraham.manu, linux-media

Hi Mauro,

it should be OK now.

---
 drivers/media/dvb/frontends/stv090x.c     |    2 +-
 drivers/media/dvb/frontends/stv090x_reg.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c
index 4aef187..6c3c095 100644
--- a/drivers/media/dvb/frontends/stv090x.c
+++ b/drivers/media/dvb/frontends/stv090x.c
@@ -3526,7 +3526,7 @@ static int stv090x_read_per(struct dvb_frontend *fe, u32 *per)
 	} else {
 		/* Counter 2 */
 		reg = STV090x_READ_DEMOD(state, ERRCNT22);
-		h = STV090x_GETFIELD_Px(reg, ERR_CNT2_FIELD);
+		h = STV090x_GETFIELD_Px(reg, ERR_CNT22_FIELD);
 
 		reg = STV090x_READ_DEMOD(state, ERRCNT21);
 		m = STV090x_GETFIELD_Px(reg, ERR_CNT21_FIELD);
diff --git a/drivers/media/dvb/frontends/stv090x_reg.h b/drivers/media/dvb/frontends/stv090x_reg.h
index 93741ee..26c8885 100644
--- a/drivers/media/dvb/frontends/stv090x_reg.h
+++ b/drivers/media/dvb/frontends/stv090x_reg.h
@@ -2232,8 +2232,8 @@
 #define STV090x_P2_ERRCNT22				STV090x_Px_ERRCNT22(2)
 #define STV090x_OFFST_Px_ERRCNT2_OLDVALUE_FIELD		7
 #define STV090x_WIDTH_Px_ERRCNT2_OLDVALUE_FIELD		1
-#define STV090x_OFFST_Px_ERR_CNT2_FIELD			0
-#define STV090x_WIDTH_Px_ERR_CNT2_FIELD			7
+#define STV090x_OFFST_Px_ERR_CNT22_FIELD		0
+#define STV090x_WIDTH_Px_ERR_CNT22_FIELD		7
 
 #define STV090x_Px_ERRCNT21(__x)			(0xF59E - (__x - 1) * 0x200)
 #define STV090x_P1_ERRCNT21				STV090x_Px_ERRCNT21(1)
-- 
1.7.2.5


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

* Re: [PATCH 1/3] stv090x: Fix typo in register macros
  2012-02-27 20:42 [PATCH 1/3] stv090x: Fix typo in register macros Andreas Regel
  2012-03-11 13:50 ` Mauro Carvalho Chehab
@ 2012-05-15 12:43 ` Manu Abraham
  2012-05-24 18:26   ` Andreas Regel
  1 sibling, 1 reply; 5+ messages in thread
From: Manu Abraham @ 2012-05-15 12:43 UTC (permalink / raw)
  To: Andreas Regel; +Cc: linux-media

Hi Andreas,

Sorry about the late reply.

Which datasheet revision are you using ? I looked at RevG and found that the
register ERRCNT22 @ 0xF59D, 0xF39D do have bitfields by name Px_ERR_CNT2
on Page 227.

Did you overlook that by some chance ?

Best Regards,
Manu


On Tue, Feb 28, 2012 at 2:12 AM, Andreas Regel <andreas.regel@gmx.de> wrote:
> Fix typo in register macros of ERRCNT2.
>
> Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
> ---
>  drivers/media/dvb/frontends/stv090x.c     |    2 +-
>  drivers/media/dvb/frontends/stv090x_reg.h |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/stv090x.c
> b/drivers/media/dvb/frontends/stv090x.c
> index 4aef187..6c3c095 100644
> --- a/drivers/media/dvb/frontends/stv090x.c
> +++ b/drivers/media/dvb/frontends/stv090x.c
> @@ -3526,7 +3526,7 @@ static int stv090x_read_per(struct dvb_frontend *fe,
> u32 *per)
>        } else {
>                /* Counter 2 */
>                reg = STV090x_READ_DEMOD(state, ERRCNT22);
> -               h = STV090x_GETFIELD_Px(reg, ERR_CNT2_FIELD);
> +               h = STV090x_GETFIELD_Px(reg, ERR_CNT22_FIELD);
>                reg = STV090x_READ_DEMOD(state, ERRCNT21);
>                m = STV090x_GETFIELD_Px(reg, ERR_CNT21_FIELD);
> diff --git a/drivers/media/dvb/frontends/stv090x_reg.h
> b/drivers/media/dvb/frontends/stv090x_reg.h
> index 93741ee..26c8885 100644
> --- a/drivers/media/dvb/frontends/stv090x_reg.h
> +++ b/drivers/media/dvb/frontends/stv090x_reg.h
> @@ -2232,8 +2232,8 @@
>  #define STV090x_P2_ERRCNT22
>  STV090x_Px_ERRCNT22(2)
>  #define STV090x_OFFST_Px_ERRCNT2_OLDVALUE_FIELD                7
>  #define STV090x_WIDTH_Px_ERRCNT2_OLDVALUE_FIELD                1
> -#define STV090x_OFFST_Px_ERR_CNT2_FIELD                        0
> -#define STV090x_WIDTH_Px_ERR_CNT2_FIELD                        7
> +#define STV090x_OFFST_Px_ERR_CNT22_FIELD               0
> +#define STV090x_WIDTH_Px_ERR_CNT22_FIELD               7
>  #define STV090x_Px_ERRCNT21(__x)                      (0xF59E - (__x - 1) *
> 0x200)
>  #define STV090x_P1_ERRCNT21
>  STV090x_Px_ERRCNT21(1)
> --
> 1.7.2.5
>

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

* Re: [PATCH 1/3] stv090x: Fix typo in register macros
  2012-05-15 12:43 ` Manu Abraham
@ 2012-05-24 18:26   ` Andreas Regel
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Regel @ 2012-05-24 18:26 UTC (permalink / raw)
  To: Manu Abraham; +Cc: linux-media

Am 15.05.2012 14:43, schrieb Manu Abraham:
> Hi Andreas,
> 
> Sorry about the late reply.
> 
> Which datasheet revision are you using ? I looked at RevG and found that the
> register ERRCNT22 @ 0xF59D, 0xF39D do have bitfields by name Px_ERR_CNT2
> on Page 227.
> 
> Did you overlook that by some chance ?
> 
> Best Regards,
> Manu

Hi Manu,

I checked the datasheet. You are right, the actual bitfield of register Px_ERRCNT22 is named there Px_ERR_CNT2 but the same name is also used for the bitfields of registers Px_ERRCNT21 and Px_ERRCNT20. I think naming it CNT22 better reflects its actual meaning of being the only a part of the counter value. It also would match the naming of ERRCNT12.

Best regards
Andreas

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

end of thread, other threads:[~2012-05-24 18:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-27 20:42 [PATCH 1/3] stv090x: Fix typo in register macros Andreas Regel
2012-03-11 13:50 ` Mauro Carvalho Chehab
2012-03-11 17:59   ` Andreas Regel
2012-05-15 12:43 ` Manu Abraham
2012-05-24 18:26   ` Andreas Regel

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