Re: kernel-doc bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/06/2013 11:57:07 AM, Nishanth Menon wrote:
Synopsys section might be interesting here:
Before: http://pastebin.com/bVt3RWKZ
u32 __pure crc32_le_generic (u32 crc,
                             unsigned char const * p,
                             size_t len,
                             const u32 ( * tab)[256],
                             u32 polynomial);
After: http://pastebin.com/z0NNWHtw
u32 __pure crc32_le_generic (u32 crc,
                             unsigned char const * p,
                             size_t len,
                             const u32 * tab,
                             u32 polynomial);
Not sure if we like that.

*blink* *blink*

commit 836e2af92503f1642dbc3c3281ec68ec1dd39d2e
Author: Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx>
Date:   Mon May 24 14:33:31 2010 -0700

--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -48,12 +48,20 @@ MODULE_LICENSE("GPL");
 #if CRC_LE_BITS == 8 || CRC_BE_BITS == 8

 static inline u32
-crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 *tab) +crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]
 {

That's a crazy type to have a in a prototype. (It looks like function pointers but isn't, I _think_ it's an array of pointers?)

Reading the code, it's a pointer to a series of arrays. It's basically:

  const u32 tab[][256];

Defined in a really weird way.

So the first form and the second form are not equivalent. The first form is highly unusual but the compiler accepts it, so...

Rob--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux