[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4DDBE432.3040207@broadcom.com>
Date: Tue, 24 May 2011 19:00:34 +0200
From: "Arend van Spriel" <arend@...adcom.com>
To: "Alan Cox" <alan@...rguk.ukuu.org.uk>
cc: "Andrew Morton" <akpm@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"John W. Linville" <linville@...driver.com>,
"Dan Carpenter" <error27@...il.com>
Subject: Re: [RFC] lib: crc8: add new library module providing crc8
algorithm
On 05/24/2011 02:57 PM, Alan Cox wrote:
> On Tue, 24 May 2011 12:38:45 +0200
> "Arend van Spriel"<arend@...adcom.com> wrote:
>
>> On 05/24/2011 12:27 PM, Alan Cox wrote:
>>>> Not sure whether you mean the source code or the object code. I build
>>>> kernel with debug symbols so the sizes are bit higher.
>>> nm will tell you the actual sizes. I think the n_gsm code is about 500
>>> bytes or so and chunks of it inline.
>> Not counting the crc table I assume.
> I forget but I think including - its a tiny tiny bit of code once inlined.
I used nm on both flavours.
dynamic crc table based on polynomial and bit order
---------------------------------------------------
00000000 00000026 T crc8
00000030 000000dc T crc8_create
fixed crc table with table selection based on bit order
-------------------------------------------------------
00000000 00000026 T crc8
00000030 0000002b T crc8_create
00000100 00000100 r crc8_table_lsb
00000000 00000100 r crc8_table_msb
The first requires the user to provide buffer to hold the table. The
difference is in the crc_create() function (maybe better named
crc_populate_table() in first, and crc_select_table() in second). It is
177 bytes larger. The crc calculating function is 38 bytes. Still pretty
small I would think.
Gr. AvS
--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists