aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-31 03:56:28 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-31 03:56:28 -0400
commitbe859405487324ed548f1ba11dc949b8230ab991 (patch)
tree3893ac2ce3b212b100d9e1e1e3e2fc1fa0c3f47f /fs/afs
parent63779436ab4ad0867bcea53bf853b0004d7b895d (diff)
fs: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/proc.c4
-rw-r--r--fs/afs/server.c9
2 files changed, 6 insertions, 7 deletions
diff --git a/fs/afs/proc.c b/fs/afs/proc.c
index 9f7d1ae70269..7578c1ab9e0b 100644
--- a/fs/afs/proc.c
+++ b/fs/afs/proc.c
@@ -646,7 +646,7 @@ static int afs_proc_cell_vlservers_show(struct seq_file *m, void *v)
646 } 646 }
647 647
648 /* display one cell per line on subsequent lines */ 648 /* display one cell per line on subsequent lines */
649 seq_printf(m, "%u.%u.%u.%u\n", NIPQUAD(addr->s_addr)); 649 seq_printf(m, "%pI4\n", &addr->s_addr);
650 return 0; 650 return 0;
651} 651}
652 652
@@ -737,7 +737,7 @@ static int afs_proc_cell_servers_show(struct seq_file *m, void *v)
737 } 737 }
738 738
739 /* display one cell per line on subsequent lines */ 739 /* display one cell per line on subsequent lines */
740 sprintf(ipaddr, "%u.%u.%u.%u", NIPQUAD(server->addr)); 740 sprintf(ipaddr, "%pI4", &server->addr);
741 seq_printf(m, "%3d %-15.15s %5d\n", 741 seq_printf(m, "%3d %-15.15s %5d\n",
742 atomic_read(&server->usage), ipaddr, server->fs_state); 742 atomic_read(&server->usage), ipaddr, server->fs_state);
743 743
diff --git a/fs/afs/server.c b/fs/afs/server.c
index 28f2451419e1..f49099516675 100644
--- a/fs/afs/server.c
+++ b/fs/afs/server.c
@@ -105,7 +105,7 @@ struct afs_server *afs_lookup_server(struct afs_cell *cell,
105{ 105{
106 struct afs_server *server, *candidate; 106 struct afs_server *server, *candidate;
107 107
108 _enter("%p,"NIPQUAD_FMT, cell, NIPQUAD(addr->s_addr)); 108 _enter("%p,%pI4", cell, &addr->s_addr);
109 109
110 /* quick scan of the list to see if we already have the server */ 110 /* quick scan of the list to see if we already have the server */
111 read_lock(&cell->servers_lock); 111 read_lock(&cell->servers_lock);
@@ -168,9 +168,8 @@ found_server:
168server_in_two_cells: 168server_in_two_cells:
169 write_unlock(&cell->servers_lock); 169 write_unlock(&cell->servers_lock);
170 kfree(candidate); 170 kfree(candidate);
171 printk(KERN_NOTICE "kAFS:" 171 printk(KERN_NOTICE "kAFS: Server %pI4 appears to be in two cells\n",
172 " Server "NIPQUAD_FMT" appears to be in two cells\n", 172 addr);
173 NIPQUAD(*addr));
174 _leave(" = -EEXIST"); 173 _leave(" = -EEXIST");
175 return ERR_PTR(-EEXIST); 174 return ERR_PTR(-EEXIST);
176} 175}
@@ -184,7 +183,7 @@ struct afs_server *afs_find_server(const struct in_addr *_addr)
184 struct rb_node *p; 183 struct rb_node *p;
185 struct in_addr addr = *_addr; 184 struct in_addr addr = *_addr;
186 185
187 _enter(NIPQUAD_FMT, NIPQUAD(addr.s_addr)); 186 _enter("%pI4", &addr.s_addr);
188 187
189 read_lock(&afs_servers_lock); 188 read_lock(&afs_servers_lock);
190 189