From b4229934bd11e1dd03d433072ef3871915fc5e4f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 26 Sep 2006 21:23:43 -0700 Subject: [ATM]: use NIPQUAD instead of open-coding it Signed-off-by: Al Viro Signed-off-by: David S. Miller --- net/atm/mpoa_caches.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'net/atm/mpoa_caches.c') diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c index 781ed1b9329..fbf13cdcf46 100644 --- a/net/atm/mpoa_caches.c +++ b/net/atm/mpoa_caches.c @@ -87,7 +87,6 @@ static in_cache_entry *in_cache_get_by_vcc(struct atm_vcc *vcc, static in_cache_entry *in_cache_add_entry(uint32_t dst_ip, struct mpoa_client *client) { - unsigned char *ip __attribute__ ((unused)) = (unsigned char *)&dst_ip; in_cache_entry* entry = kmalloc(sizeof(in_cache_entry), GFP_KERNEL); if (entry == NULL) { @@ -95,7 +94,7 @@ static in_cache_entry *in_cache_add_entry(uint32_t dst_ip, return NULL; } - dprintk("mpoa: mpoa_caches.c: adding an ingress entry, ip = %u.%u.%u.%u\n", ip[0], ip[1], ip[2], ip[3]); + dprintk("mpoa: mpoa_caches.c: adding an ingress entry, ip = %u.%u.%u.%u\n", NIPQUAD(dst_ip)); memset(entry,0,sizeof(in_cache_entry)); atomic_set(&entry->use, 1); @@ -152,10 +151,7 @@ static int cache_hit(in_cache_entry *entry, struct mpoa_client *mpc) if( entry->count > mpc->parameters.mpc_p1 && entry->entry_state == INGRESS_INVALID){ - unsigned char *ip __attribute__ ((unused)) = - (unsigned char *)&entry->ctrl_info.in_dst_ip; - - dprintk("mpoa: (%s) mpoa_caches.c: threshold exceeded for ip %u.%u.%u.%u, sending MPOA res req\n", mpc->dev->name, ip[0], ip[1], ip[2], ip[3]); + dprintk("mpoa: (%s) mpoa_caches.c: threshold exceeded for ip %u.%u.%u.%u, sending MPOA res req\n", mpc->dev->name, NIPQUAD(entry->ctrl_info.in_dst_ip)); entry->entry_state = INGRESS_RESOLVING; msg.type = SND_MPOA_RES_RQST; memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN ); @@ -187,11 +183,9 @@ static void in_cache_remove_entry(in_cache_entry *entry, { struct atm_vcc *vcc; struct k_message msg; - unsigned char *ip; vcc = entry->shortcut; - ip = (unsigned char *)&entry->ctrl_info.in_dst_ip; - dprintk("mpoa: mpoa_caches.c: removing an ingress entry, ip = %u.%u.%u.%u\n",ip[0], ip[1], ip[2], ip[3]); + dprintk("mpoa: mpoa_caches.c: removing an ingress entry, ip = %u.%u.%u.%u\n",NIPQUAD(entry->ctrl_info.in_dst_ip)); if (entry->prev != NULL) entry->prev->next = entry->next; -- cgit v1.2.3