diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-17 01:46:26 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-17 01:47:06 -0400 |
commit | a806170e29c5468b1d641a22518243bdf1b8d58b (patch) | |
tree | 0b1661f287d6e2b711bbd7600120a250a4f57549 /drivers/s390/block/dasd_alias.c | |
parent | 5a62b192196af9a798e2f2f4c6a1324e7edf2f4b (diff) |
[S390] Fix a lot of sparse warnings.
Most noteable part of this commit is the new local header file entry.h
which contains all the function declarations of functions that get only
called from asm code or are arch internal. That way we can avoid extern
declarations in C files.
This is more or less the same that was done for sparc64.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_alias.c')
-rw-r--r-- | drivers/s390/block/dasd_alias.c | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c index 3a40bee9d358..2d8df0b30538 100644 --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c | |||
@@ -745,6 +745,19 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu) | |||
745 | spin_unlock_irqrestore(&lcu->lock, flags); | 745 | spin_unlock_irqrestore(&lcu->lock, flags); |
746 | } | 746 | } |
747 | 747 | ||
748 | static void __stop_device_on_lcu(struct dasd_device *device, | ||
749 | struct dasd_device *pos) | ||
750 | { | ||
751 | /* If pos == device then device is already locked! */ | ||
752 | if (pos == device) { | ||
753 | pos->stopped |= DASD_STOPPED_SU; | ||
754 | return; | ||
755 | } | ||
756 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
757 | pos->stopped |= DASD_STOPPED_SU; | ||
758 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
759 | } | ||
760 | |||
748 | /* | 761 | /* |
749 | * This function is called in interrupt context, so the | 762 | * This function is called in interrupt context, so the |
750 | * cdev lock for device is already locked! | 763 | * cdev lock for device is already locked! |
@@ -755,35 +768,15 @@ static void _stop_all_devices_on_lcu(struct alias_lcu *lcu, | |||
755 | struct alias_pav_group *pavgroup; | 768 | struct alias_pav_group *pavgroup; |
756 | struct dasd_device *pos; | 769 | struct dasd_device *pos; |
757 | 770 | ||
758 | list_for_each_entry(pos, &lcu->active_devices, alias_list) { | 771 | list_for_each_entry(pos, &lcu->active_devices, alias_list) |
759 | if (pos != device) | 772 | __stop_device_on_lcu(device, pos); |
760 | spin_lock(get_ccwdev_lock(pos->cdev)); | 773 | list_for_each_entry(pos, &lcu->inactive_devices, alias_list) |
761 | pos->stopped |= DASD_STOPPED_SU; | 774 | __stop_device_on_lcu(device, pos); |
762 | if (pos != device) | ||
763 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
764 | } | ||
765 | list_for_each_entry(pos, &lcu->inactive_devices, alias_list) { | ||
766 | if (pos != device) | ||
767 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
768 | pos->stopped |= DASD_STOPPED_SU; | ||
769 | if (pos != device) | ||
770 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
771 | } | ||
772 | list_for_each_entry(pavgroup, &lcu->grouplist, group) { | 775 | list_for_each_entry(pavgroup, &lcu->grouplist, group) { |
773 | list_for_each_entry(pos, &pavgroup->baselist, alias_list) { | 776 | list_for_each_entry(pos, &pavgroup->baselist, alias_list) |
774 | if (pos != device) | 777 | __stop_device_on_lcu(device, pos); |
775 | spin_lock(get_ccwdev_lock(pos->cdev)); | 778 | list_for_each_entry(pos, &pavgroup->aliaslist, alias_list) |
776 | pos->stopped |= DASD_STOPPED_SU; | 779 | __stop_device_on_lcu(device, pos); |
777 | if (pos != device) | ||
778 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
779 | } | ||
780 | list_for_each_entry(pos, &pavgroup->aliaslist, alias_list) { | ||
781 | if (pos != device) | ||
782 | spin_lock(get_ccwdev_lock(pos->cdev)); | ||
783 | pos->stopped |= DASD_STOPPED_SU; | ||
784 | if (pos != device) | ||
785 | spin_unlock(get_ccwdev_lock(pos->cdev)); | ||
786 | } | ||
787 | } | 780 | } |
788 | } | 781 | } |
789 | 782 | ||