Re: We have a lot of duplicated code in the kernel

From: Roman Kurakin <rik_at_cronyx.ru>
Date: Wed, 02 Feb 2005 23:44:56 +0300
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.
>
>  
>
Received on Wed Feb 02 2005 - 19:58:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:27 UTC