: alg_key_len should be unsigned to avoid integer divides
Subsystems (2)
alg_key_len is currently defined as 'signed int'. This unfortunatly leads to integer divides in several paths.
Converting it to unsigned is safe and saves 208 bytes of text on i386.
Signed-off-by Eric Dumazet <[email protected]>
include/linux/xfrm.h +1 -1
@@ -92,7 +92,7 @@ struct xfrm_replay_statestruct xfrm_algo {char alg_name[64 ]; -int alg_key_len;/* in bits */ +unsigned int alg_key_len;/* in bits */ char alg_key[0 ]; };
From: Eric Dumazet <[email protected]>
Date: Sat, 12 Jan 2008 18:29:32 +0100
Quoted 6 lines
alg_key_lenis currently defined as 'signed int'. This unfortunatly leads to integer divides in several paths.Converting it to unsigned is safe and saves 208 bytes of text on i386.
Signed-off-by Eric Dumazet <[email protected]>
Applied.
I realigned the struct members in a follow-on changeset.
commit 7305e737926be49e09718df53f4285bf69cc3755
Author: David S. Miller <[email protected]> Date: Sat Jan 12 21:31:29 2008 -0800
[XFRM]: Fix struct xfrm_algo code formatting.
Realign struct members.
Signed-off-by David S. Miller <[email protected]>
include/linux/xfrm.h +2 -2
@@ -91,9 +91,9 @@ struct xfrm_replay_state };struct xfrm_algo { -char alg_name[64 ]; +char alg_name[64 ];unsigned int alg_key_len;/* in bits */ -char alg_key[0 ]; +char alg_key[0 ]; };struct xfrm_stats {