Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 723ec4d0 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/cleanup' into next

* pci/cleanup:
  PCI: Remove "extern" from function declarations
  PCI: Warn about failures instead of "must_check" functions
  PCI: Remove __must_check from definitions
  PCI: Remove unused variables
  PCI: Move cpci_hotplug_init() proto to header file
  PCI: Make local functions/structs static
  PCI: Fix missing prototype for pcie_port_acpi_setup()

Conflicts:
	drivers/pci/hotplug/acpiphp.h
	include/linux/pci.h
parents a3b6bbd5 f39d5b72
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -202,6 +202,9 @@ void pci_bus_add_devices(const struct pci_bus *bus)
		if (dev->is_added)
			continue;
		retval = pci_bus_add_device(dev);
		if (retval)
			dev_err(&dev->dev, "Error adding device (%d)\n",
				retval);
	}

	list_for_each_entry(dev, &bus->devices, bus_list) {
+11 −11
Original line number Diff line number Diff line
@@ -170,21 +170,21 @@ struct acpiphp_attention_info
/* function prototypes */

/* acpiphp_core.c */
extern int acpiphp_register_attention(struct acpiphp_attention_info*info);
extern int acpiphp_unregister_attention(struct acpiphp_attention_info *info);
extern int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot);
extern void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
int acpiphp_register_attention(struct acpiphp_attention_info*info);
int acpiphp_unregister_attention(struct acpiphp_attention_info *info);
int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot);
void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);

/* acpiphp_glue.c */
typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);

extern int acpiphp_enable_slot (struct acpiphp_slot *slot);
extern int acpiphp_disable_slot (struct acpiphp_slot *slot);
extern int acpiphp_eject_slot (struct acpiphp_slot *slot);
extern u8 acpiphp_get_power_status (struct acpiphp_slot *slot);
extern u8 acpiphp_get_attention_status (struct acpiphp_slot *slot);
extern u8 acpiphp_get_latch_status (struct acpiphp_slot *slot);
extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot);
int acpiphp_enable_slot(struct acpiphp_slot *slot);
int acpiphp_disable_slot(struct acpiphp_slot *slot);
int acpiphp_eject_slot(struct acpiphp_slot *slot);
u8 acpiphp_get_power_status(struct acpiphp_slot *slot);
u8 acpiphp_get_attention_status(struct acpiphp_slot *slot);
u8 acpiphp_get_latch_status(struct acpiphp_slot *slot);
u8 acpiphp_get_adapter_status(struct acpiphp_slot *slot);

/* variables */
extern bool acpiphp_debug;
+26 −18
Original line number Diff line number Diff line
@@ -75,28 +75,36 @@ static inline const char *slot_name(struct slot *slot)
	return hotplug_slot_name(slot->hotplug_slot);
}

extern int cpci_hp_register_controller(struct cpci_hp_controller *controller);
extern int cpci_hp_unregister_controller(struct cpci_hp_controller *controller);
extern int cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last);
extern int cpci_hp_unregister_bus(struct pci_bus *bus);
extern int cpci_hp_start(void);
extern int cpci_hp_stop(void);
int cpci_hp_register_controller(struct cpci_hp_controller *controller);
int cpci_hp_unregister_controller(struct cpci_hp_controller *controller);
int cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last);
int cpci_hp_unregister_bus(struct pci_bus *bus);
int cpci_hp_start(void);
int cpci_hp_stop(void);

/*
 * Internal function prototypes, these functions should not be used by
 * board/chassis drivers.
 */
extern u8 cpci_get_attention_status(struct slot *slot);
extern u8 cpci_get_latch_status(struct slot *slot);
extern u8 cpci_get_adapter_status(struct slot *slot);
extern u16 cpci_get_hs_csr(struct slot * slot);
extern int cpci_set_attention_status(struct slot *slot, int status);
extern int cpci_check_and_clear_ins(struct slot * slot);
extern int cpci_check_ext(struct slot * slot);
extern int cpci_clear_ext(struct slot * slot);
extern int cpci_led_on(struct slot * slot);
extern int cpci_led_off(struct slot * slot);
extern int cpci_configure_slot(struct slot *slot);
extern int cpci_unconfigure_slot(struct slot *slot);
u8 cpci_get_attention_status(struct slot *slot);
u8 cpci_get_latch_status(struct slot *slot);
u8 cpci_get_adapter_status(struct slot *slot);
u16 cpci_get_hs_csr(struct slot * slot);
int cpci_set_attention_status(struct slot *slot, int status);
int cpci_check_and_clear_ins(struct slot * slot);
int cpci_check_ext(struct slot * slot);
int cpci_clear_ext(struct slot * slot);
int cpci_led_on(struct slot * slot);
int cpci_led_off(struct slot * slot);
int cpci_configure_slot(struct slot *slot);
int cpci_unconfigure_slot(struct slot *slot);

#ifdef CONFIG_HOTPLUG_PCI_CPCI
int cpci_hotplug_init(int debug);
void cpci_hotplug_exit(void);
#else
static inline int cpci_hotplug_init(int debug) { return 0; }
static inline void cpci_hotplug_exit(void) { }
#endif

#endif	/* _CPCI_HOTPLUG_H */
+32 −38
Original line number Diff line number Diff line
@@ -404,50 +404,44 @@ struct resource_lists {


/* debugfs functions for the hotplug controller info */
extern void cpqhp_initialize_debugfs(void);
extern void cpqhp_shutdown_debugfs(void);
extern void cpqhp_create_debugfs_files(struct controller *ctrl);
extern void cpqhp_remove_debugfs_files(struct controller *ctrl);
void cpqhp_initialize_debugfs(void);
void cpqhp_shutdown_debugfs(void);
void cpqhp_create_debugfs_files(struct controller *ctrl);
void cpqhp_remove_debugfs_files(struct controller *ctrl);

/* controller functions */
extern void cpqhp_pushbutton_thread(unsigned long event_pointer);
extern irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data);
extern int cpqhp_find_available_resources(struct controller *ctrl,
void cpqhp_pushbutton_thread(unsigned long event_pointer);
irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data);
int cpqhp_find_available_resources(struct controller *ctrl,
				   void __iomem *rom_start);
extern int cpqhp_event_start_thread(void);
extern void cpqhp_event_stop_thread(void);
extern struct pci_func *cpqhp_slot_create(unsigned char busnumber);
extern struct pci_func *cpqhp_slot_find(unsigned char bus, unsigned char device,
int cpqhp_event_start_thread(void);
void cpqhp_event_stop_thread(void);
struct pci_func *cpqhp_slot_create(unsigned char busnumber);
struct pci_func *cpqhp_slot_find(unsigned char bus, unsigned char device,
				 unsigned char index);
extern int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func);
extern int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func);
extern int cpqhp_hardware_test(struct controller *ctrl, int test_num);
int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func);
int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func);
int cpqhp_hardware_test(struct controller *ctrl, int test_num);

/* resource functions */
extern int	cpqhp_resource_sort_and_combine	(struct pci_resource **head);
int	cpqhp_resource_sort_and_combine	(struct pci_resource **head);

/* pci functions */
extern int cpqhp_set_irq(u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num);
extern int cpqhp_get_bus_dev(struct controller *ctrl, u8 *bus_num, u8 *dev_num,
int cpqhp_set_irq(u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num);
int cpqhp_get_bus_dev(struct controller *ctrl, u8 *bus_num, u8 *dev_num,
		      u8 slot);
extern int cpqhp_save_config(struct controller *ctrl, int busnumber,
			     int is_hot_plug);
extern int cpqhp_save_base_addr_length(struct controller *ctrl,
				       struct pci_func *func);
extern int cpqhp_save_used_resources(struct controller *ctrl,
				     struct pci_func *func);
extern int cpqhp_configure_board(struct controller *ctrl,
				 struct pci_func *func);
extern int cpqhp_save_slot_config(struct controller *ctrl,
				  struct pci_func *new_slot);
extern int cpqhp_valid_replace(struct controller *ctrl, struct pci_func *func);
extern void cpqhp_destroy_board_resources(struct pci_func *func);
extern int cpqhp_return_board_resources	(struct pci_func *func,
int cpqhp_save_config(struct controller *ctrl, int busnumber, int is_hot_plug);
int cpqhp_save_base_addr_length(struct controller *ctrl, struct pci_func *func);
int cpqhp_save_used_resources(struct controller *ctrl, struct pci_func *func);
int cpqhp_configure_board(struct controller *ctrl, struct pci_func *func);
int cpqhp_save_slot_config(struct controller *ctrl, struct pci_func *new_slot);
int cpqhp_valid_replace(struct controller *ctrl, struct pci_func *func);
void cpqhp_destroy_board_resources(struct pci_func *func);
int cpqhp_return_board_resources(struct pci_func *func,
				 struct resource_lists *resources);
extern void cpqhp_destroy_resource_list(struct resource_lists *resources);
extern int cpqhp_configure_device(struct controller *ctrl,
				  struct pci_func *func);
extern int cpqhp_unconfigure_device(struct pci_func *func);
void cpqhp_destroy_resource_list(struct resource_lists *resources);
int cpqhp_configure_device(struct controller *ctrl, struct pci_func *func);
int cpqhp_unconfigure_device(struct pci_func *func);

/* Global variables */
extern int cpqhp_debug;
+6 −6
Original line number Diff line number Diff line
@@ -47,9 +47,9 @@ static inline int compaq_nvram_store (void __iomem *rom_start)

#else

extern void compaq_nvram_init	(void __iomem *rom_start);
extern int compaq_nvram_load	(void __iomem *rom_start, struct controller *ctrl);
extern int compaq_nvram_store	(void __iomem *rom_start);
void compaq_nvram_init(void __iomem *rom_start);
int compaq_nvram_load(void __iomem *rom_start, struct controller *ctrl);
int compaq_nvram_store(void __iomem *rom_start);

#endif

Loading