WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 3/6] netfront: use section tags on init and removal

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 3/6] netfront: use section tags on init and removal
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Wed, 17 May 2006 14:29:23 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 17 May 2006 14:35:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060517142648.439befd9@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSDL
References: <20060517142648.439befd9@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User shemminger@xxxxxxxxxxxxxxxxxxxxx
# Node ID 44ad0558e50c91ad66a155c017d6df0cb36e007d
# Parent  a471b0faf794558e8cc0cd595b293f45924a561c
The initialization and removal functions should be tagged with
proper section attributes to save space.

Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxx>

diff -r a471b0faf794 -r 44ad0558e50c 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed May 17 
20:43:22 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed May 17 
20:44:25 2006
@@ -152,7 +152,7 @@
 }
 
 #ifdef DEBUG
-static char *be_state_name[] = {
+static const char *be_state_name[] = {
        [BEST_CLOSED]       = "closed",
        [BEST_DISCONNECTED] = "disconnected",
        [BEST_CONNECTED]    = "connected",
@@ -204,8 +204,8 @@
  * inform the backend of the appropriate details for those.  Switch to
  * Connected state.
  */
-static int netfront_probe(struct xenbus_device *dev,
-                         const struct xenbus_device_id *id)
+static int __devinit netfront_probe(struct xenbus_device *dev,
+                                   const struct xenbus_device_id *id)
 {
        int err;
        struct net_device *netdev;
@@ -1112,8 +1112,8 @@
  * @param val return parameter for created device
  * @return 0 on success, error code otherwise
  */
-static int create_netdev(int handle, struct xenbus_device *dev,
-                        struct net_device **val)
+static int __devinit create_netdev(int handle, struct xenbus_device *dev,
+                                  struct net_device **val)
 {
        int i, err = 0;
        struct net_device *netdev = NULL;
@@ -1250,7 +1250,7 @@
 }
 
 
-static int netfront_remove(struct xenbus_device *dev)
+static int __devexit netfront_remove(struct xenbus_device *dev)
 {
        struct netfront_info *info = dev->data;
 
@@ -1330,7 +1330,7 @@
        .owner = THIS_MODULE,
        .ids = netfront_ids,
        .probe = netfront_probe,
-       .remove = netfront_remove,
+       .remove = __devexit_p(netfront_remove),
        .resume = netfront_resume,
        .otherend_changed = backend_changed,
 };
@@ -1361,7 +1361,7 @@
 module_init(netif_init);
 
 
-static void netif_exit(void)
+static void __exit netif_exit(void)
 {
        unregister_inetaddr_notifier(&notifier_inetdev);
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel