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/cio | |
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/cio')
-rw-r--r-- | drivers/s390/cio/cio.c | 18 | ||||
-rw-r--r-- | drivers/s390/cio/cio.h | 1 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 1 | ||||
-rw-r--r-- | drivers/s390/cio/device.h | 1 |
4 files changed, 13 insertions, 8 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 41db3cc653f5..23ffcc4768a7 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -670,10 +670,14 @@ do_IRQ (struct pt_regs *regs) | |||
670 | continue; | 670 | continue; |
671 | } | 671 | } |
672 | sch = (struct subchannel *)(unsigned long)tpi_info->intparm; | 672 | sch = (struct subchannel *)(unsigned long)tpi_info->intparm; |
673 | if (sch) | 673 | if (!sch) { |
674 | spin_lock(sch->lock); | 674 | /* Clear pending interrupt condition. */ |
675 | tsch(tpi_info->schid, irb); | ||
676 | continue; | ||
677 | } | ||
678 | spin_lock(sch->lock); | ||
675 | /* Store interrupt response block to lowcore. */ | 679 | /* Store interrupt response block to lowcore. */ |
676 | if (tsch (tpi_info->schid, irb) == 0 && sch) { | 680 | if (tsch(tpi_info->schid, irb) == 0) { |
677 | /* Keep subchannel information word up to date. */ | 681 | /* Keep subchannel information word up to date. */ |
678 | memcpy (&sch->schib.scsw, &irb->scsw, | 682 | memcpy (&sch->schib.scsw, &irb->scsw, |
679 | sizeof (irb->scsw)); | 683 | sizeof (irb->scsw)); |
@@ -681,8 +685,7 @@ do_IRQ (struct pt_regs *regs) | |||
681 | if (sch->driver && sch->driver->irq) | 685 | if (sch->driver && sch->driver->irq) |
682 | sch->driver->irq(sch); | 686 | sch->driver->irq(sch); |
683 | } | 687 | } |
684 | if (sch) | 688 | spin_unlock(sch->lock); |
685 | spin_unlock(sch->lock); | ||
686 | /* | 689 | /* |
687 | * Are more interrupts pending? | 690 | * Are more interrupts pending? |
688 | * If so, the tpi instruction will update the lowcore | 691 | * If so, the tpi instruction will update the lowcore |
@@ -708,8 +711,9 @@ void *cio_get_console_priv(void) | |||
708 | /* | 711 | /* |
709 | * busy wait for the next interrupt on the console | 712 | * busy wait for the next interrupt on the console |
710 | */ | 713 | */ |
711 | void | 714 | void wait_cons_dev(void) |
712 | wait_cons_dev (void) | 715 | __releases(console_subchannel.lock) |
716 | __acquires(console_subchannel.lock) | ||
713 | { | 717 | { |
714 | unsigned long cr6 __attribute__ ((aligned (8))); | 718 | unsigned long cr6 __attribute__ ((aligned (8))); |
715 | unsigned long save_cr6 __attribute__ ((aligned (8))); | 719 | unsigned long save_cr6 __attribute__ ((aligned (8))); |
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h index 52afa4c784de..08f2235c5a6f 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h | |||
@@ -100,6 +100,7 @@ extern int cio_modify (struct subchannel *); | |||
100 | 100 | ||
101 | int cio_create_sch_lock(struct subchannel *); | 101 | int cio_create_sch_lock(struct subchannel *); |
102 | void do_adapter_IO(void); | 102 | void do_adapter_IO(void); |
103 | void do_IRQ(struct pt_regs *); | ||
103 | 104 | ||
104 | /* Use with care. */ | 105 | /* Use with care. */ |
105 | #ifdef CONFIG_CCW_CONSOLE | 106 | #ifdef CONFIG_CCW_CONSOLE |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index fec004f62bcf..e0c7adb8958e 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -577,7 +577,6 @@ static DEVICE_ATTR(devtype, 0444, devtype_show, NULL); | |||
577 | static DEVICE_ATTR(cutype, 0444, cutype_show, NULL); | 577 | static DEVICE_ATTR(cutype, 0444, cutype_show, NULL); |
578 | static DEVICE_ATTR(modalias, 0444, modalias_show, NULL); | 578 | static DEVICE_ATTR(modalias, 0444, modalias_show, NULL); |
579 | static DEVICE_ATTR(online, 0644, online_show, online_store); | 579 | static DEVICE_ATTR(online, 0644, online_show, online_store); |
580 | extern struct device_attribute dev_attr_cmb_enable; | ||
581 | static DEVICE_ATTR(availability, 0444, available_show, NULL); | 580 | static DEVICE_ATTR(availability, 0444, available_show, NULL); |
582 | 581 | ||
583 | static struct attribute * subch_attrs[] = { | 582 | static struct attribute * subch_attrs[] = { |
diff --git a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h index d40a2ffaa000..cb08092be39f 100644 --- a/drivers/s390/cio/device.h +++ b/drivers/s390/cio/device.h | |||
@@ -127,4 +127,5 @@ extern struct bus_type ccw_bus_type; | |||
127 | void retry_set_schib(struct ccw_device *cdev); | 127 | void retry_set_schib(struct ccw_device *cdev); |
128 | void cmf_retry_copy_block(struct ccw_device *); | 128 | void cmf_retry_copy_block(struct ccw_device *); |
129 | int cmf_reenable(struct ccw_device *); | 129 | int cmf_reenable(struct ccw_device *); |
130 | extern struct device_attribute dev_attr_cmb_enable; | ||
130 | #endif | 131 | #endif |