Skip to contentSkip to conversation

net/appletalk/: make some code static

PATCH In review Adrian Bunk 2 participants 2 messages Dec 12, 2004 – Dec 28, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/appletalk/: make some code static

The patch below makes some needlessly global code static.

diffstat output:

 include/linux/atalk.h      |    2 --
 net/appletalk/aarp.c       |    4 ++--
 net/appletalk/atalk_proc.c |    6 +++---
 net/appletalk/ddp.c        |    6 +++---
 4 files changed, 8 insertions(+), 10 deletions(-)
include/linux/atalk.h renamed from include/linux/atalk.h.old +0 -2
@@ -188,8 +188,6 @@
 extern int		 aarp_send_ddp(struct net_device *dev,
 				       struct sk_buff *skb,
 				       struct atalk_addr *sa, void *hwaddr);
-extern void		 aarp_send_probe(struct net_device *dev,
-					 struct atalk_addr *addr);
 extern void		 aarp_device_down(struct net_device *dev);
 extern void		 aarp_probe_network(struct atalk_iface *atif);
 extern int 		 aarp_proxy_probe_network(struct atalk_iface *atif,
net/appletalk/aarp.c renamed from net/appletalk/aarp.c.old +2 -2
@@ -199,7 +199,7 @@
  *	aarp_proxy_probe_network.
  */
 
-void aarp_send_probe(struct net_device *dev, struct atalk_addr *us)
+static void aarp_send_probe(struct net_device *dev, struct atalk_addr *us)
 {
 	struct elapaarp *eah;
 	int len = dev->hard_header_len + sizeof(*eah) + aarp_dl->header_length;
@@ -429,7 +429,7 @@
  * Probe a Phase 1 device or a device that requires its Net:Node to
  * be set via an ioctl.
  */
-void aarp_send_probe_phase1(struct atalk_iface *iface)
+static void aarp_send_probe_phase1(struct atalk_iface *iface)
 {
 	struct ifreq atreq;
 	struct sockaddr_at *sa = (struct sockaddr_at *)&atreq.ifr_addr;
net/appletalk/atalk_proc.c renamed from net/appletalk/atalk_proc.c.old +3 -3
@@ -205,21 +205,21 @@
 	return 0;
 }
 
-struct seq_operations atalk_seq_interface_ops = {
+static struct seq_operations atalk_seq_interface_ops = {
 	.start  = atalk_seq_interface_start,
 	.next   = atalk_seq_interface_next,
 	.stop   = atalk_seq_interface_stop,
 	.show   = atalk_seq_interface_show,
 };
 
-struct seq_operations atalk_seq_route_ops = {
+static struct seq_operations atalk_seq_route_ops = {
 	.start  = atalk_seq_route_start,
 	.next   = atalk_seq_route_next,
 	.stop   = atalk_seq_route_stop,
 	.show   = atalk_seq_route_show,
 };
 
-struct seq_operations atalk_seq_socket_ops = {
+static struct seq_operations atalk_seq_socket_ops = {
 	.start  = atalk_seq_socket_start,
 	.next   = atalk_seq_socket_next,
 	.stop   = atalk_seq_socket_stop,
net/appletalk/ddp.c renamed from net/appletalk/ddp.c.old +3 -3
@@ -612,7 +612,7 @@
  * Called when a device is downed. Just throw away any routes
  * via it.
  */
-void atrtr_device_down(struct net_device *dev)
+static void atrtr_device_down(struct net_device *dev)
 {
 	struct atalk_route **r = &atalk_routes;
 	struct atalk_route *tmp;
@@ -1854,12 +1854,12 @@
 	.notifier_call	= ddp_device_event,
 };
 
-struct packet_type ltalk_packet_type = {
+static struct packet_type ltalk_packet_type = {
 	.type		= __constant_htons(ETH_P_LOCALTALK),
 	.func		= ltalk_rcv,
 };
 
-struct packet_type ppptalk_packet_type = {
+static struct packet_type ppptalk_packet_type = {
 	.type		= __constant_htons(ETH_P_PPPTALK),
 	.func		= atalk_rcv,
 };
maintainer
#1 lore raw
Quoted 1 line · On Sun, 12 Dec 2004 22:11:28 +0100 Adrian Bunk <[email protected]> wrote:

The patch below makes some needlessly global code static.

Looks good, applied. Thanks Adrian.