All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Panin <pazke@orbita1.ru>
To: linux-kernel@vger.kernel.org
Cc: gregkh@us.ibm.com
Subject: [PATCH] IBM hotplug PCI, many missing __init's
Date: Tue, 7 May 2002 15:47:14 +0400	[thread overview]
Message-ID: <20020507114714.GA620@pazke.ipt> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 295 bytes --]

Hi,

this patch adds many missing __init modifiers to IBM hotplug PCI driver.
Patch against 2.5.14. Compiles, but untested. 
Please consider applying.

Best regards.

-- 
Andrey Panin            | Embedded systems software engineer
pazke@orbita1.ru        | PGP key: wwwkeys.eu.pgp.net

[-- Attachment #1.2: patch-ibmphp --]
[-- Type: text/plain, Size: 7141 bytes --]

diff -urN -X /usr/share/dontdiff linux.vanilla/drivers/hotplug/ibmphp_core.c linux/drivers/hotplug/ibmphp_core.c
--- linux.vanilla/drivers/hotplug/ibmphp_core.c	Tue Apr 23 19:07:11 2002
+++ linux/drivers/hotplug/ibmphp_core.c	Sat May  4 00:43:18 2002
@@ -106,7 +106,7 @@
 	return rc;
 }
 
-static int get_max_slots (void)
+static inline int get_max_slots (void)
 {
 	struct list_head * tmp;
 	int slot_count = 0;
@@ -528,7 +528,7 @@
  * function. It will also power off empty slots that are powered on since BIOS
  * leaves those on, albeit disconnected
  ******************************************************************************/
-static int init_ops (void)
+static int __init init_ops (void)
 {
 	struct slot *slot_cur;
 	int retval;
@@ -755,7 +755,7 @@
 /******************************************************************
  * This function is here because we can no longer use pci_root_ops
  ******************************************************************/
-static struct pci_ops *get_root_pci_ops (void)
+static inline struct pci_ops *get_root_pci_ops (void)
 {
 	struct pci_bus * bus;
 
diff -urN -X /usr/share/dontdiff linux.vanilla/drivers/hotplug/ibmphp_ebda.c linux/drivers/hotplug/ibmphp_ebda.c
--- linux.vanilla/drivers/hotplug/ibmphp_ebda.c	Wed Mar 13 21:43:31 2002
+++ linux/drivers/hotplug/ibmphp_ebda.c	Sat May  4 01:41:55 2002
@@ -65,7 +65,7 @@
 static int ebda_rsrc_rsrc (void);
 static int ebda_rio_table (void);
 
-static struct slot *alloc_ibm_slot (void)
+static struct slot * __init alloc_ibm_slot (void)
 {
 	struct slot *slot;
 
@@ -76,7 +76,7 @@
 	return slot;
 }
 
-static struct ebda_hpc_list *alloc_ebda_hpc_list (void)
+static struct ebda_hpc_list * __init alloc_ebda_hpc_list (void)
 {
 	struct ebda_hpc_list *list;
 
@@ -87,7 +87,7 @@
 	return list;
 }
 
-static struct controller *alloc_ebda_hpc (u32 slot_count, u32 bus_count)
+static struct controller * __init alloc_ebda_hpc(u32 slot_count, u32 bus_count)
 {
 	struct controller *controller;
 	struct ebda_hpc_slot *slots;
@@ -127,7 +127,7 @@
 	kfree (controller);
 }
 
-static struct ebda_rsrc_list *alloc_ebda_rsrc_list (void)
+static struct ebda_rsrc_list * __init alloc_ebda_rsrc_list (void)
 {
 	struct ebda_rsrc_list *list;
 
@@ -138,7 +138,7 @@
 	return list;
 }
 
-static struct ebda_pci_rsrc *alloc_ebda_pci_rsrc (void)
+static struct ebda_pci_rsrc * __init alloc_ebda_pci_rsrc (void)
 {
 	struct ebda_pci_rsrc *resource;
 
@@ -149,7 +149,7 @@
 	return resource;
 }
 
-static void print_bus_info (void)
+static void __init print_bus_info (void)
 {
 	struct bus_info *ptr;
 	struct list_head *ptr1;
@@ -167,7 +167,7 @@
 	}
 }
 
-static void print_ebda_pci_rsrc (void)
+static void __init print_ebda_pci_rsrc (void)
 {
 	struct ebda_pci_rsrc *ptr;
 	struct list_head *ptr1;
@@ -179,7 +179,7 @@
 	}
 }
 
-static void print_ebda_hpc (void)
+static void __init print_ebda_hpc (void)
 {
 	struct controller *hpc_ptr;
 	struct list_head *ptr1;
@@ -223,7 +223,7 @@
 	}
 }
 
-int ibmphp_access_ebda (void)
+int __init ibmphp_access_ebda (void)
 {
 	u8 format, num_ctlrs, rio_complete, hs_complete;
 	u16 ebda_seg, num_entries, next_offset, offset, blk_id, sub_addr, rc, re, rc_id, re_id, base;
@@ -382,7 +382,7 @@
  * each hpc from physical address to a list of hot plug controllers based on
  * hpc descriptors.
  */
-static int ebda_rsrc_controller (void)
+static int __init ebda_rsrc_controller (void)
 {
 	u16 addr, addr_slot, addr_bus;
 	u8 ctlr_id, temp, bus_index;
@@ -626,7 +626,7 @@
  * map info (bus, devfun, start addr, end addr..) of i/o, memory,
  * pfm from the physical addr to a list of resource.
  */
-static int ebda_rsrc_rsrc (void)
+static int __init ebda_rsrc_rsrc (void)
 {
 	u16 addr;
 	short rsrc;
@@ -694,7 +694,7 @@
 /*
  * map info of scalability details and rio details from physical address
  */
-static int ebda_rio_table(void)
+static int __init ebda_rio_table(void)
 {
 	u16 offset;
 	u8 i;
diff -urN -X /usr/share/dontdiff linux.vanilla/drivers/hotplug/ibmphp_hpc.c linux/drivers/hotplug/ibmphp_hpc.c
--- linux.vanilla/drivers/hotplug/ibmphp_hpc.c	Wed Mar 13 21:43:31 2002
+++ linux/drivers/hotplug/ibmphp_hpc.c	Sat May  4 00:35:30 2002
@@ -1056,7 +1056,7 @@
 *
 * Action:  start polling thread
 *---------------------------------------------------------------------*/
-int ibmphp_hpc_start_poll_thread (void)
+int __init ibmphp_hpc_start_poll_thread (void)
 {
 	int rc = 0;
 
@@ -1077,7 +1077,7 @@
 *
 * Action:  stop polling thread and cleanup
 *---------------------------------------------------------------------*/
-void ibmphp_hpc_stop_poll_thread (void)
+void __exit ibmphp_hpc_stop_poll_thread (void)
 {
 	debug ("ibmphp_hpc_stop_poll_thread - Entry\n");
 
diff -urN -X /usr/share/dontdiff linux.vanilla/drivers/hotplug/ibmphp_res.c linux/drivers/hotplug/ibmphp_res.c
--- linux.vanilla/drivers/hotplug/ibmphp_res.c	Wed Mar 13 21:43:31 2002
+++ linux/drivers/hotplug/ibmphp_res.c	Sun May  5 02:58:33 2002
@@ -45,7 +45,7 @@
 
 static LIST_HEAD(gbuses);
 
-static struct bus_node * alloc_error_bus (struct ebda_pci_rsrc * curr)
+static struct bus_node * __init alloc_error_bus (struct ebda_pci_rsrc * curr)
 {
 	struct bus_node * newbus;
 
@@ -61,7 +61,7 @@
 	return newbus;
 }
 
-static struct resource_node * alloc_resources (struct ebda_pci_rsrc * curr)
+static struct __init resource_node * alloc_resources (struct ebda_pci_rsrc * curr)
 {
 	struct resource_node *rs = kmalloc (sizeof (struct resource_node), GFP_KERNEL);
 	if (!rs) {
@@ -77,7 +77,7 @@
 	return rs;
 }
 
-static int alloc_bus_range (struct bus_node **new_bus, struct range_node **new_range, struct ebda_pci_rsrc *curr, int flag, u8 first_bus)
+static int __init alloc_bus_range (struct bus_node **new_bus, struct range_node **new_range, struct ebda_pci_rsrc *curr, int flag, u8 first_bus)
 {
 	struct bus_node * newbus;
 	struct range_node *newrange;
@@ -184,7 +184,7 @@
  * Input: ptr to the head of the resource list from EBDA
  * Output: 0, -1 or error codes
  ***************************************************************************/
-int ibmphp_rsrc_init (void)
+int __init ibmphp_rsrc_init (void)
 {
 	struct ebda_pci_rsrc *curr;
 	struct range_node *newrange = NULL;
@@ -1650,7 +1650,7 @@
  * a new Mem node
  * This routine is called right after initialization
  *******************************************************************************/
-static int once_over (void)
+static int __init once_over (void)
 {
 	struct resource_node *pfmem_cur;
 	struct resource_node *pfmem_prev;
@@ -1871,7 +1871,7 @@
  *	 behind them All these are TO DO.
  *	 Also need to add more error checkings... (from fnc returns etc)
  */
-static int update_bridge_ranges (struct bus_node **bus)
+static int __init update_bridge_ranges (struct bus_node **bus)
 {
 	u8 sec_busno, device, function, busno, hdr_type, start_io_address, end_io_address;
 	u16 vendor_id, upper_io_start, upper_io_end, start_mem_address, end_mem_address;

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

             reply	other threads:[~2002-05-07 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-07 11:47 Andrey Panin [this message]
2002-05-07 23:58 ` [PATCH] IBM hotplug PCI, many missing __init's Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020507114714.GA620@pazke.ipt \
    --to=pazke@orbita1.ru \
    --cc=gregkh@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.