From: Pavel Emelyanov Date: Tue, 11 Dec 2007 10:12:36 +0000 (-0800) Subject: [INET]: Use BUILD_BUG_ON in inet_timewait_sock.c checks X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=95c9382a345262637d3e5c7da5f09f0f46daa930;p=linux-edison.git [INET]: Use BUILD_BUG_ON in inet_timewait_sock.c checks Make the INET_TWDR_TWKILL_SLOTS vs sizeof(twdr->thread_slots) check nicer. Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller --- diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index a60b99e0ebd..d43e787031a 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c @@ -194,16 +194,14 @@ out: EXPORT_SYMBOL_GPL(inet_twdr_hangman); -extern void twkill_slots_invalid(void); - void inet_twdr_twkill_work(struct work_struct *work) { struct inet_timewait_death_row *twdr = container_of(work, struct inet_timewait_death_row, twkill_work); int i; - if ((INET_TWDR_TWKILL_SLOTS - 1) > (sizeof(twdr->thread_slots) * 8)) - twkill_slots_invalid(); + BUILD_BUG_ON((INET_TWDR_TWKILL_SLOTS - 1) > + (sizeof(twdr->thread_slots) * 8)); while (twdr->thread_slots) { spin_lock_bh(&twdr->death_lock);