Message ID | 1543153.gDfgtO0cjd@useri (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1SS4z8-0007g1-Hy for patchwork@linuxtv.org; Wed, 09 May 2012 13:23:10 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp for <patchwork@linuxtv.org> id 1SS4z8-0004bh-D9; Wed, 09 May 2012 13:23:10 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757704Ab2EILXH (ORCPT <rfc822;patchwork@linuxtv.org>); Wed, 9 May 2012 07:23:07 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:54882 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308Ab2EILXG (ORCPT <rfc822; linux-media@vger.kernel.org>); Wed, 9 May 2012 07:23:06 -0400 Received: by bkcji2 with SMTP id ji2so146377bkc.19 for <linux-media@vger.kernel.org>; Wed, 09 May 2012 04:23:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding:x-gm-message-state; bh=JHvysXHZBPTK0bIenGvzljmqpuCcTWHdWLRkz3G+UPM=; b=X3ccZ/CAtkguwWsKWRjc2gpD+Er43x/iYV316/f+YX/Du4yWB2dQYnSmPppsSz6Azn pcAFUn8QeEGQMaObvibVMaP81LBVUi9NNCYPyQspi3oVBtSSAfRfbsha5+NM3/FUw8EN LBZCTRRMKEWWES0Xsfiorsaw6ekON3DK6gMK7QwD8+k/Y68p3kuYVoPlaL5cLb4XX0f6 4B2YMsYX88pUw9v2GZ8yb0c3dcEwXDZRU/zXWMbiJjOrnOGRx4PCMmlQ45eXxrh3w0M+ OGwP/8axeQh3zNihNIUGSEESc/E4D/w0ZEK0/v0MXg6Vf4jd/cIJcIB2313UXSBuPP01 GRqQ== Received: by 10.204.141.9 with SMTP id k9mr8041472bku.138.1336562584811; Wed, 09 May 2012 04:23:04 -0700 (PDT) Received: from useri.localnet ([93.125.112.3]) by mx.google.com with ESMTPS id ie3sm4388271bkc.1.2012.05.09.04.23.03 (version=SSLv3 cipher=OTHER); Wed, 09 May 2012 04:23:04 -0700 (PDT) From: "Igor M. Liplianin" <liplianin@me.by> To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab <mchehab@redhat.com>, Manu Abraham <abraham.manu@gmail.com> Subject: [PATCH] Terratec Cinergy C PCI HD (CI) Date: Wed, 09 May 2012 14:23:14 +0300 Message-ID: <1543153.gDfgtO0cjd@useri> User-Agent: KMail/4.8.2 (Linux/3.3.4; KDE/4.8.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart4518749.8EDGmXpGgU" Content-Transfer-Encoding: 7Bit X-Gm-Message-State: ALoCoQnqLETfT9cfrJH99pqe28/+57j+JuHuZ7W/hSYMsT2s+2Qe1V2DF3D8WFNzMbVQBGXz+UWY Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.5.9.111218 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MIME_TEXT_ONLY_MP_MIXED 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1800_1899 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, ECARD_WORD 0, INVALID_MSGID_NO_FQDN 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __DATE_TZ_RU 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' |
Commit Message
Igor M. Liplianin
May 9, 2012, 11:23 a.m. UTC
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>
Comments
"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 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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
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 ? -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;