stv090x: Fix typo in register macros
PATCH 1/3 stv090x: Fix typo in register macros
Fix typo in register macros of ERRCNT2.
--- drivers/media/dvb/frontends/stv090x.c | 2 +- drivers/media/dvb/frontends/stv090x_reg.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/media/dvb/frontends/stv090x.c +1 -1
@@ -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 );
drivers/media/dvb/frontends/stv090x_reg.h +2 -2
@@ -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)
Signature · 1 line
1.7.2.5
Em 27-02-2012 17:42, Andreas Regel escreveu:
Quoted 1 line
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
Quoted 33 lines
Signed-off-by Andreas Regel <[email protected]>--- drivers/media/dvb/frontends/stv090x.c | 2 +- drivers/media/dvb/frontends/stv090x_reg.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/media/dvb/frontends/stv090x.c +1
-1@@ -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 );drivers/media/dvb/frontends/stv090x_reg.h +2
-2@@ -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)
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(-)
drivers/media/dvb/frontends/stv090x.c +1 -1
@@ -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 );
drivers/media/dvb/frontends/stv090x_reg.h +2 -2
@@ -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)
Signature · 1 line
1.7.2.5
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
Quoted 43 lines · Andreas Regel
Fix typo in register macros of ERRCNT2.
Signed-off-by Andreas Regel <[email protected]>---
drivers/media/dvb/frontends/stv090x.c | 2 +-drivers/media/dvb/frontends/stv090x_reg.h| 4 ++--2 files changed, 3 insertions(+), 3 deletions(-)drivers/media/dvb/frontends/stv090x.c +1
-1@@ -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);drivers/media/dvb/frontends/stv090x_reg.h +2
-2@@ -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
Am 15.05.2012 14:43, schrieb Manu Abraham:
Quoted 4 lines
Hi Andreas,
Sorry about the late reply.
Quoted 8 lines
Which datasheet revision are you using ? I looked at RevG and found that the register ERRCNT22 @
0xF59D,0xF39Ddo have bitfields by namePx_ERR_CNT2on 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