-/* Inline functions to check the sanity of a pointer that is passed to us */
-static inline int
-slot_paranoia_check(struct slot *slot, const char *function)
-{
- if(!slot) {
- dbg("%s - slot == NULL", function);
- return -1;
- }
- if(slot->magic != SLOT_MAGIC) {
- dbg("%s - bad magic number for slot", function);
- return -1;
- }
- if(!slot->hotplug_slot) {
- dbg("%s - slot->hotplug_slot == NULL!", function);
- return -1;
- }
- return 0;
-}
-
-static inline struct slot *
-get_slot(struct hotplug_slot *hotplug_slot, const char *function)
-{
- struct slot *slot;
-
- if(!hotplug_slot) {
- dbg("%s - hotplug_slot == NULL", function);
- return NULL;
- }
-
- slot = (struct slot *) hotplug_slot->private;
- if(slot_paranoia_check(slot, function))
- return NULL;
- return slot;
-}
-