include/linux/ghash.h (2.4.8 & 2.4.9)
PATCH 1/1 include/linux/ghash.h (2.4.8 & 2.4.9)
Dear all,
please find attached two patches for include/linux/ghash.h against 2.4.8 and 2.4.9 (even if they seem to be the same ,-).
The issue, I struggled over:
in find_##NAME_hash() the macro argument was written in lower case. Therefore, a module that makes use of ghash.h cannot be depmod'd as hashfn is a not resolved symbol.
The provided patch fixes this small typo by that it changes hashfn to HASHFN, as required by the macro definition.
I missed this correction in 2.4.8 (up to ac12) as well as in 2.4.9 (vanilla). Please drop a line if I misunderstood something. Otherwise include the patch in the kernel, please.
Any comments are welcome!
Lukas
Signature · 6 lines
Lukas Ruf Swiss Federal Institute of Technology Office: ETZ-G61.2 Computer Engineering and Phone: +41/1/632 7312 Networks Laboratory (TIK) Fax: +41/1/632 1035 ETH Zentrum PGP 2.6: ID D20BA2ED; Gloriastr. 35 Fingerprint 6323 B9BC 9C8E 6563 B477 BADD FEA6 E6B7 CH-8092 Zurich
include/linux/ghash.h +2 -2
@@ -106,7 +106,7 @@ \ LINKAGE TYPE * find_##NAME##_hash(struct NAME##_table * tbl, KEYTYPE pos)\ {\ - int ix = hashfn(pos);\ + int ix = HASHFN(pos);\ TYPE * ptr = tbl->hashtable[ix];\ while(ptr && KEYCMP(ptr->KEY, pos))\ ptr = ptr->PTRS.next_hash;\
@@ -206,7 +206,7 @@ \ LINKAGE TYPE * find_##NAME##_hash(struct NAME##_table * tbl, KEYTYPE pos)\ {\ - int ix = hashfn(pos);\ + int ix = HASHFN(pos);\ TYPE * ptr = tbl->hashtable[ix];\ while(ptr && KEYCMP(ptr->KEY, pos))\ ptr = ptr->PTRS.next_hash;\
include/linux/ghash.h renamed from include/linux/ghash.h,orig +2 -2
@@ -106,7 +106,7 @@ \ LINKAGE TYPE * find_##NAME##_hash(struct NAME##_table * tbl, KEYTYPE pos)\ {\ - int ix = hashfn(pos);\ + int ix = HASHFN(pos);\ TYPE * ptr = tbl->hashtable[ix];\ while(ptr && KEYCMP(ptr->KEY, pos))\ ptr = ptr->PTRS.next_hash;\
@@ -206,7 +206,7 @@ \ LINKAGE TYPE * find_##NAME##_hash(struct NAME##_table * tbl, KEYTYPE pos)\ {\ - int ix = hashfn(pos);\ + int ix = HASHFN(pos);\ TYPE * ptr = tbl->hashtable[ix];\ while(ptr && KEYCMP(ptr->KEY, pos))\ ptr = ptr->PTRS.next_hash;\