* [PATCH] Terratec Cinergy C PCI HD (CI)
@ 2012-05-09 11:23 Igor M. Liplianin
2012-05-09 18:57 ` Bjørn Mork
2012-05-15 11:31 ` Manu Abraham
0 siblings, 2 replies; 4+ messages in thread
From: Igor M. Liplianin @ 2012-05-09 11:23 UTC (permalink / raw)
To: linux-media; +Cc: Mauro Carvalho Chehab, Manu Abraham
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
This patch seems for rectifying a typo. But actually the difference between
mantis_vp2040.c and mantis_vp2033.c code is a card name only.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
[-- Attachment #2: 1.patch --]
[-- Type: text/x-patch, Size: 1167 bytes --]
diff -r 990a92e2410f linux/drivers/media/dvb/mantis/mantis_cards.c
--- a/linux/drivers/media/dvb/mantis/mantis_cards.c Wed May 09 01:37:05 2012 +0300
+++ b/linux/drivers/media/dvb/mantis/mantis_cards.c Wed May 09 14:04:31 2012 +0300
@@ -276,7 +276,7 @@
MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_2033_DVB_C, &vp2033_config),
MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_2040_DVB_C, &vp2040_config),
MAKE_ENTRY(TECHNISAT, CABLESTAR_HD2, &vp2040_config),
- MAKE_ENTRY(TERRATEC, CINERGY_C, &vp2033_config),
+ MAKE_ENTRY(TERRATEC, CINERGY_C, &vp2040_config),
MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_3030_DVB_T, &vp3030_config),
{ }
};
diff -r 990a92e2410f linux/drivers/media/dvb/mantis/mantis_core.c
--- a/linux/drivers/media/dvb/mantis/mantis_core.c Wed May 09 01:37:05 2012 +0300
+++ b/linux/drivers/media/dvb/mantis/mantis_core.c Wed May 09 14:04:31 2012 +0300
@@ -121,7 +121,7 @@
mantis->hwconfig = &vp2033_mantis_config;
break;
case MANTIS_VP_2040_DVB_C: /* VP-2040 */
- case TERRATEC_CINERGY_C_PCI: /* VP-2040 clone */
+ case CINERGY_C: /* VP-2040 clone */
case TECHNISAT_CABLESTAR_HD2:
mantis->hwconfig = &vp2040_mantis_config;
break;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Terratec Cinergy C PCI HD (CI)
2012-05-09 11:23 [PATCH] Terratec Cinergy C PCI HD (CI) Igor M. Liplianin
@ 2012-05-09 18:57 ` Bjørn Mork
2012-05-10 15:23 ` Igor M. Liplianin
2012-05-15 11:31 ` Manu Abraham
1 sibling, 1 reply; 4+ messages in thread
From: Bjørn Mork @ 2012-05-09 18:57 UTC (permalink / raw)
To: Igor M. Liplianin; +Cc: linux-media, Mauro Carvalho Chehab, Manu Abraham
"Igor M. Liplianin" <liplianin@me.by> writes:
> This patch seems for rectifying a typo. But actually the difference between
> mantis_vp2040.c and mantis_vp2033.c code is a card name only.
Yes, there are major code duplication issues in this driver.
> Signed-off-by: Igor M. Liplianin <liplianin@me.by>
> diff -r 990a92e2410f linux/drivers/media/dvb/mantis/mantis_cards.c
> --- a/linux/drivers/media/dvb/mantis/mantis_cards.c Wed May 09 01:37:05 2012 +0300
> +++ b/linux/drivers/media/dvb/mantis/mantis_cards.c Wed May 09 14:04:31 2012 +0300
> @@ -276,7 +276,7 @@
> MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_2033_DVB_C, &vp2033_config),
> MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_2040_DVB_C, &vp2040_config),
> MAKE_ENTRY(TECHNISAT, CABLESTAR_HD2, &vp2040_config),
> - MAKE_ENTRY(TERRATEC, CINERGY_C, &vp2033_config),
> + MAKE_ENTRY(TERRATEC, CINERGY_C, &vp2040_config),
> MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_3030_DVB_T, &vp3030_config),
> { }
> };
What's the point? It's a constructed difference. Makes more sense to
refactor and merge all the duplicated code instead of maintaining this
meaningless code split.
> diff -r 990a92e2410f linux/drivers/media/dvb/mantis/mantis_core.c
> --- a/linux/drivers/media/dvb/mantis/mantis_core.c Wed May 09 01:37:05 2012 +0300
> +++ b/linux/drivers/media/dvb/mantis/mantis_core.c Wed May 09 14:04:31 2012 +0300
> @@ -121,7 +121,7 @@
> mantis->hwconfig = &vp2033_mantis_config;
> break;
> case MANTIS_VP_2040_DVB_C: /* VP-2040 */
> - case TERRATEC_CINERGY_C_PCI: /* VP-2040 clone */
> + case CINERGY_C: /* VP-2040 clone */
> case TECHNISAT_CABLESTAR_HD2:
> mantis->hwconfig = &vp2040_mantis_config;
> break;
And this file should never have been merged into the mainline kernel at
all. If you wonder how a bug like that could survive without being
noticed, then the explanation is simple: This code has never been built
as part of the driver in the mainline kernel.
I tried submitting a cleanup patch to have it removed a long time ago:
http://patchwork.linuxtv.org/patch/3680/
but it doesn't seem to have gone anywhere, like most of the patches for
this driver - silently ignored until everyone forgets it and moves on.
The code could certainly benefit from a major cleanup, but I don't see
how that would ever happen. It sort of works. Better leave it there
and spend valuable time elsewhere.
Bjørn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] Terratec Cinergy C PCI HD (CI)
2012-05-09 18:57 ` Bjørn Mork
@ 2012-05-10 15:23 ` Igor M. Liplianin
0 siblings, 0 replies; 4+ messages in thread
From: Igor M. Liplianin @ 2012-05-10 15:23 UTC (permalink / raw)
To: Bjørn Mork; +Cc: linux-media, Mauro Carvalho Chehab, Manu Abraham
On 9 мая 2012 20:57:49 Bjørn Mork wrote:
> "Igor M. Liplianin" <liplianin@me.by> writes:
> > This patch seems for rectifying a typo. But actually the difference
> > between
> > mantis_vp2040.c and mantis_vp2033.c code is a card name only.
>
> Yes, there are major code duplication issues in this driver.
>
> > Signed-off-by: Igor M. Liplianin <liplianin@me.by>
> > diff -r 990a92e2410f linux/drivers/media/dvb/mantis/mantis_cards.c
> > --- a/linux/drivers/media/dvb/mantis/mantis_cards.c Wed May 09 01:37:05
> > 2012 +0300 +++ b/linux/drivers/media/dvb/mantis/mantis_cards.c Wed May 09
> > 14:04:31 2012 +0300 @@ -276,7 +276,7 @@
> >
> > MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_2033_DVB_C, &vp2033_config),
> > MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_2040_DVB_C, &vp2040_config),
> > MAKE_ENTRY(TECHNISAT, CABLESTAR_HD2, &vp2040_config),
> >
> > - MAKE_ENTRY(TERRATEC, CINERGY_C, &vp2033_config),
> > + MAKE_ENTRY(TERRATEC, CINERGY_C, &vp2040_config),
> >
> > MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_3030_DVB_T, &vp3030_config),
> > { }
> >
> > };
>
> What's the point? It's a constructed difference. Makes more sense to
> refactor and merge all the duplicated code instead of maintaining this
> meaningless code split.
>
> > diff -r 990a92e2410f linux/drivers/media/dvb/mantis/mantis_core.c
> > --- a/linux/drivers/media/dvb/mantis/mantis_core.c Wed May 09 01:37:05
> > 2012 +0300 +++ b/linux/drivers/media/dvb/mantis/mantis_core.c Wed May 09
> > 14:04:31 2012 +0300 @@ -121,7 +121,7 @@
> >
> > mantis->hwconfig = &vp2033_mantis_config;
> > break;
> >
> > case MANTIS_VP_2040_DVB_C: /* VP-2040 */
> >
> > - case TERRATEC_CINERGY_C_PCI: /* VP-2040 clone */
> > + case CINERGY_C: /* VP-2040 clone */
> >
> > case TECHNISAT_CABLESTAR_HD2:
> > mantis->hwconfig = &vp2040_mantis_config;
> > break;
>
> And this file should never have been merged into the mainline kernel at
> all. If you wonder how a bug like that could survive without being
> noticed, then the explanation is simple: This code has never been built
> as part of the driver in the mainline kernel.
>
> I tried submitting a cleanup patch to have it removed a long time ago:
> http://patchwork.linuxtv.org/patch/3680/
Oh, I wasn't aware of that.
> but it doesn't seem to have gone anywhere, like most of the patches for
> this driver - silently ignored until everyone forgets it and moves on.
>
> The code could certainly benefit from a major cleanup, but I don't see
> how that would ever happen. It sort of works. Better leave it there
> and spend valuable time elsewhere.
This patch is just a remainder. Seriously, I don't anticipate something.
Igor.
>
>
>
> Bjørn
--
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Terratec Cinergy C PCI HD (CI)
2012-05-09 11:23 [PATCH] Terratec Cinergy C PCI HD (CI) Igor M. Liplianin
2012-05-09 18:57 ` Bjørn Mork
@ 2012-05-15 11:31 ` Manu Abraham
1 sibling, 0 replies; 4+ messages in thread
From: Manu Abraham @ 2012-05-15 11:31 UTC (permalink / raw)
To: Igor M. Liplianin; +Cc: linux-media, Mauro Carvalho Chehab
On Wed, May 9, 2012 at 4:53 PM, Igor M. Liplianin <liplianin@me.by> wrote:
> This patch seems for rectifying a typo. But actually the difference between
> mantis_vp2040.c and mantis_vp2033.c code is a card name only.
>
> Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Do you have a card with the tda10021 or the tda10023 ?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-15 11:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 11:23 [PATCH] Terratec Cinergy C PCI HD (CI) Igor M. Liplianin
2012-05-09 18:57 ` Bjørn Mork
2012-05-10 15:23 ` Igor M. Liplianin
2012-05-15 11:31 ` Manu Abraham
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.