From owner-freebsd-current@FreeBSD.ORG Wed Feb 2 20:58:46 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C5ED16A4CE for ; Wed, 2 Feb 2005 20:58:46 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75EB043D1F for ; Wed, 2 Feb 2005 20:58:45 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru (8.13.0/vak/3.0) id j12KthvB020388 for current@freebsd.org.checked; Wed, 2 Feb 2005 23:55:43 +0300 (MSK) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (localhost.cronyx.ru [127.0.0.1]) by hanoi.cronyx.ru (8.13.0/vak/3.0) with ESMTP id j12KsUnr020262; Wed, 2 Feb 2005 23:54:30 +0300 (MSK) (envelope-from rik@cronyx.ru) Message-ID: <42013BC8.5040204@cronyx.ru> Date: Wed, 02 Feb 2005 23:44:56 +0300 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: Alexander Leidinger References: <20050129161022.0de822fe@Magellan.Leidinger.net> In-Reply-To: <20050129161022.0de822fe@Magellan.Leidinger.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: We have a lot of duplicated code in the kernel X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2005 20:58:46 -0000 Alexander Leidinger: >Hi, > >http://www.leidinger.net/FreeBSD/simian-20-sys-20050129.log (253k) >contains a log of duplicated code in /sys (-current as of today). The >file starts with files with 20 consecutive lines of duplicated code and >ends with two files which share 1108 lines of code. > >If I let the program detect 6 consecutive lines of duplicated code, it >is also able to detect possible code reuse in the same file, but it also >prints a lot of "noise" then. > >I've filtered the list for some false positives (twa_fwimg, trlld?m, >if_patm_rtables), if someone else notices some more files please tell me >about them and I add them to the filter. > For example if_ct.c and if_cp.c. They have to have the same code since they written by the same authors, and both devices have almost the same architecture. If I remove or would use the same prefix for DDK of both adapters, I am sure, code would have more than 50% of the same code. ;-) It seems that if_cx.c is not there since it is able to work in async mode. rik > >Bye, >Alexander. > > >