public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* do we need 10 copies?
@ 2001-09-23 17:57 Garst R. Reese
  2001-09-23 19:24 ` Kai Germaschewski
  0 siblings, 1 reply; 4+ messages in thread
From: Garst R. Reese @ 2001-09-23 17:57 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

This table (512 bytes) and the code to implement crc-ccit is replicated
in 10 drivers. ppp-async even exports it. Surely there is a better way.
Garst

[-- Attachment #2: dupcrc --]
[-- Type: text/plain, Size: 915 bytes --]

arch/ppc/xmon/xmon.c:	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
arch/ia64/sn/io/l1.c:      0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
drivers/net/hamradio/hdlcdrv.c:	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
drivers/net/hamradio/baycom_epp.c:	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
drivers/net/ppp_async.c:	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
drivers/isdn/hisax/rawhdlc.c:	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
drivers/isdn/hisax/netjet.c:	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
drivers/isdn/hisax/st5481_hdlc.c:	0x0000,0x1189,0x2312,0x329b,0x4624,0x57ad,0x6536,0x74bf,
drivers/isdn/tpam/tpam_crcpc.c:	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
net/irda/crc.c:	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: do we need 10 copies?
  2001-09-23 17:57 do we need 10 copies? Garst R. Reese
@ 2001-09-23 19:24 ` Kai Germaschewski
  2001-09-23 22:36   ` Dan Hollis
  2001-09-23 23:39   ` Kai Henningsen
  0 siblings, 2 replies; 4+ messages in thread
From: Kai Germaschewski @ 2001-09-23 19:24 UTC (permalink / raw)
  To: Garst R. Reese; +Cc: linux-kernel

On Sun, 23 Sep 2001, Garst R. Reese wrote:

> This table (512 bytes) and the code to implement crc-ccit is replicated
> in 10 drivers. ppp-async even exports it. Surely there is a better way.

As for the ISDN code (4 copies), there is the plan to use a a common HDLC
en/decoding module, however that's a 2.5 thing. I'll take a look if I can
find a generic solution then, but it might turn out difficult - having a
module of its own just for that table wastes nearly a page, so that's
probably worse than the current state of affairs.

--Kai





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: do we need 10 copies?
  2001-09-23 19:24 ` Kai Germaschewski
@ 2001-09-23 22:36   ` Dan Hollis
  2001-09-23 23:39   ` Kai Henningsen
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Hollis @ 2001-09-23 22:36 UTC (permalink / raw)
  To: Kai Germaschewski; +Cc: Garst R. Reese, linux-kernel

On Sun, 23 Sep 2001, Kai Germaschewski wrote:
> On Sun, 23 Sep 2001, Garst R. Reese wrote:
> > This table (512 bytes) and the code to implement crc-ccit is replicated
> > in 10 drivers. ppp-async even exports it. Surely there is a better way.
> As for the ISDN code (4 copies), there is the plan to use a a common HDLC
> en/decoding module, however that's a 2.5 thing. I'll take a look if I can
> find a generic solution then, but it might turn out difficult - having a
> module of its own just for that table wastes nearly a page, so that's
> probably worse than the current state of affairs.

I think the point is not so much that it tries to save memory, but
that it avoids duplicated code and errors. IIRC there were bugs in
previous kernels related to typos/errors in the individual crc tables...

-Dan
-- 
[-] Omae no subete no kichi wa ore no mono da. [-]


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: do we need 10 copies?
  2001-09-23 19:24 ` Kai Germaschewski
  2001-09-23 22:36   ` Dan Hollis
@ 2001-09-23 23:39   ` Kai Henningsen
  1 sibling, 0 replies; 4+ messages in thread
From: Kai Henningsen @ 2001-09-23 23:39 UTC (permalink / raw)
  To: linux-kernel

kai@tp1.ruhr-uni-bochum.de (Kai Germaschewski)  wrote on 23.09.01 in <Pine.LNX.4.33.0109232106020.14414-100000@vaio>:

> On Sun, 23 Sep 2001, Garst R. Reese wrote:
>
> > This table (512 bytes) and the code to implement crc-ccit is replicated
> > in 10 drivers. ppp-async even exports it. Surely there is a better way.
>
> As for the ISDN code (4 copies), there is the plan to use a a common HDLC
> en/decoding module, however that's a 2.5 thing. I'll take a look if I can
> find a generic solution then, but it might turn out difficult - having a
> module of its own just for that table wastes nearly a page, so that's
> probably worse than the current state of affairs.

Why a module? Just make it something the base kernel exports, like other  
general library functions.

Oh, and ISTR that there are also still a number of zlib copies ... and,  
uh, about the PPP code ...

MfG Kai

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-24  0:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-23 17:57 do we need 10 copies? Garst R. Reese
2001-09-23 19:24 ` Kai Germaschewski
2001-09-23 22:36   ` Dan Hollis
2001-09-23 23:39   ` Kai Henningsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox