cleanup after deinlining patch 1/2
Subsystems (2)
PATCH 1/1 cleanup after deinlining patch 1/2
Hi Andrew,
This patch addresses concerns raised by CCed people regarding my previous patch which you added to mm yesterday.
Quoted 3 lines · Justin T. Gibbs
I stopped being the maintainer of these driver (for Linux at least) almost 2 years ago. So don't bother waiting for my approval to make changes here.
In light of this I did the following:
* moved inlines into aic79xx_core.c and aic7xxx_core.c
* fixed bug in ahd_delay (made it a trivial wrapper around udelay)
* fixed bug in aic7xxx_pci.c (wrong order of parameters in ahc_pci_write_config calls)
* marked a few functions static
* spelling fix in error message
Patch which does s/__inline/inline/g will follow in a few minutes.
--
vda
drivers/scsi/aic7xxx/aic79xx.h +0 -1
@@ -1400,7 +1400,6 @@ int ahd_read_flexport(struct ahd_softint ahd_wait_flexport (struct ahd_softc *ahd);/*************************** Interrupt Services *******************************/ -void ahd_pci_intr (struct ahd_softc *ahd);void ahd_clear_intstat (struct ahd_softc *ahd);void ahd_flush_qoutfifo (struct ahd_softc *ahd);void ahd_run_qoutfifo (struct ahd_softc *ahd);
drivers/scsi/aic7xxx/aic79xx_core.c +597 -5
620 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_inline.c +0 -460
460 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_inline.h +5 -61
90 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_osm.h +4 -8
@@ -222,13 +222,6 @@ typedef struct timer_list ahd_timer_t;#endif #include "aic79xx.h" -/***************************** Timer Facilities *******************************/ -#define ahd_timer_init init_timer -#define ahd_timer_stop del_timer_sync -typedef void ahd_linux_callback_t (u_long ); -void ahd_timer_reset (ahd_timer_t *timer,int usec, -ahd_callback_t *func,void *arg); -/***************************** SMP support ************************************/ #include <linux/spinlock.h>
@@ -386,7 +379,10 @@ struct ahd_platform_data {#define malloc (size, type, flags) kmalloc(size, flags)#define free (ptr, type) kfree(ptr) -void ahd_delay (long ); +static inline void ahd_delay (int usec) +{ +udelay (usec); +}/***************************** Low Level I/O **********************************/ uint8_t ahd_inb (struct ahd_softc * ahd,long port);
drivers/scsi/aic7xxx/aic79xx_osm_o.c +0 -114
114 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_pci.c +3 -1
@@ -51,6 +51,8 @@#include "aic79xx_pci.h" +static void ahd_pci_intr (struct ahd_softc *ahd); +static __inlineuint64_t ahd_compose_id (u_int device,u_int vendor,u_int subdevice,u_int subvendor) {
@@ -757,7 +759,7 @@ static const char *pci_status_strings[] "%s: Address or Write Phase Parity Error Detected in %s.\n" }; -void +static void ahd_pci_intr (struct ahd_softc *ahd) {uint8_t pci_status[8 ];
drivers/scsi/aic7xxx/aic7xxx_core.c +358 -3
367 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_inline.c +0 -311
311 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_inline.h +0 -3
@@ -249,8 +249,6 @@ struct scb*void ahc_free_scb (struct ahc_softc *ahc,struct scb *scb);struct scb *ahc_lookup_scb (struct ahc_softc *ahc,u_int tag); -void ahc_swap_with_next_hscb (struct ahc_softc *ahc, -struct scb *scb);void ahc_queue_scb (struct ahc_softc *ahc,struct scb *scb);static __inlinestruct scsi_sense_data * ahc_get_sense_buf(struct ahc_softc *ahc,
@@ -315,7 +313,6 @@ ahc_get_sense_bufaddr(struct ahc_softc */************************** Interrupt Processing ******************************/ static __inlinevoid ahc_sync_qoutfifo (struct ahc_softc *ahc,int op);static __inlinevoid ahc_sync_tqinfifo (struct ahc_softc *ahc,int op); -u_int ahc_check_cmdcmpltqueues (struct ahc_softc *ahc);int ahc_intr (struct ahc_softc *ahc); static __inline void
drivers/scsi/aic7xxx/aic7xxx_osm.h +4 -1
@@ -387,7 +387,10 @@ struct ahc_platform_data {#define malloc (size, type, flags) kmalloc(size, flags)#define free (ptr, type) kfree(ptr) -void ahc_delay (long ); +static inline void ahc_delay (int usec) +{ +udelay (usec); +}/***************************** Low Level I/O **********************************/ uint8_t ahc_inb (struct ahc_softc * ahc,long port);
drivers/scsi/aic7xxx/aic7xxx_osm_o.c +0 -75
75 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_pci.c +6 -6
@@ -2036,12 +2036,12 @@ ahc_pci_resume(struct ahc_softc *ahc)* that the OS doesn't know about and rely on our chip * reset handler to handle the rest. */ -ahc_pci_write_config (ahc->dev_softc,DEVCONFIG ,/*bytes*/ 4 , - ahc->bus_softc.pci_softc.devconfig); -ahc_pci_write_config (ahc->dev_softc,PCIR_COMMAND ,/*bytes*/ 1 , - ahc->bus_softc.pci_softc.command); -ahc_pci_write_config (ahc->dev_softc,CSIZE_LATTIME ,/*bytes*/ 1 , - ahc->bus_softc.pci_softc.csize_lattime); +ahc_pci_write_config (ahc->dev_softc,DEVCONFIG , + ahc->bus_softc.pci_softc.devconfig,/*bytes*/ 4 ); +ahc_pci_write_config (ahc->dev_softc,PCIR_COMMAND , + ahc->bus_softc.pci_softc.command,/*bytes*/ 1 ); +ahc_pci_write_config (ahc->dev_softc,CSIZE_LATTIME , + ahc->bus_softc.pci_softc.csize_lattime,/*bytes*/ 1 );if ((ahc->flags &AHC_HAS_TERM_LOGIC ) !=0 ) {struct seeprom_descriptor sd;u_int sxfrctl1;
Quoted 1 line · Denis Vlasenko
Patch which does s/__inline/inline/g will follow in a few minutes.
Here is it.
--
vda
drivers/scsi/aic7xxx/aic79xx.h +2 -2
@@ -1344,8 +1344,8 @@ void ahd_reset_cmds_pending(struct ahdu_int ahd_find_busy_tcl (struct ahd_softc *ahd,u_int tcl);void ahd_busy_tcl (struct ahd_softc *ahd,u_int tcl,u_int busyid); -static __inlinevoid ahd_unbusy_tcl (struct ahd_softc *ahd,u_int tcl); -static __inlinevoid +static inline void ahd_unbusy_tcl (struct ahd_softc *ahd,u_int tcl); +static inline void ahd_unbusy_tcl (struct ahd_softc *ahd,u_int tcl) {ahd_busy_tcl (ahd, tcl,SCB_LIST_NULL );
drivers/scsi/aic7xxx/aic79xx_core.c +4 -4
@@ -834,11 +834,11 @@ static int ahd_handle_target_cmd(struct#endif /******************************** Private Inlines *****************************/ -static __inlinevoid ahd_assert_atn (struct ahd_softc *ahd); -static __inlineint ahd_currently_packetized (struct ahd_softc *ahd); +static inline void ahd_assert_atn (struct ahd_softc *ahd); +static inline int ahd_currently_packetized (struct ahd_softc *ahd);static int ahd_set_active_fifo (struct ahd_softc *ahd); -static __inlinevoid +static inline void ahd_assert_atn (struct ahd_softc *ahd) {ahd_outb (ahd,SCSISIGO ,ATNO );
@@ -850,7 +850,7 @@ ahd_assert_atn(struct ahd_softc *ahd)* are currently in a packetized transfer. We could * just as easily be sending or receiving a message. */ -static __inlineint +static inline int ahd_currently_packetized (struct ahd_softc *ahd) {ahd_mode_state saved_modes;
drivers/scsi/aic7xxx/aic79xx_inline.h +68 -68
385 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_osm.c +2 -2
@@ -389,9 +389,9 @@ static int ahd_linux_unit;/****************************** Inlines ***************************************/ -static __inlinevoid ahd_linux_unmap_scb (struct ahd_softc *,struct scb *); +static inline void ahd_linux_unmap_scb (struct ahd_softc *,struct scb *); -static __inlinevoid +static inline void ahd_linux_unmap_scb (struct ahd_softc *ahd,struct scb *scb) {struct scsi_cmnd *cmd;
drivers/scsi/aic7xxx/aic79xx_osm.h +55 -55
275 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_pci.c +1 -1
@@ -53,7 +53,7 @@static void ahd_pci_intr (struct ahd_softc *ahd); -static __inlineuint64_t +static inline uint64_t ahd_compose_id (u_int device,u_int vendor,u_int subdevice,u_int subvendor) {uint64_t id;
drivers/scsi/aic7xxx/aic7xxx_inline.h +38 -38
229 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_osm.c +2 -2
@@ -391,13 +391,13 @@ static int ahc_linux_unit;/********************************* Inlines ************************************/ -static __inlinevoid ahc_linux_unmap_scb (struct ahc_softc *,struct scb *); +static inline void ahc_linux_unmap_scb (struct ahc_softc *,struct scb *);static int ahc_linux_map_seg (struct ahc_softc *ahc,struct scb *scb,struct ahc_dma_seg *sg,dma_addr_t addr,bus_size_t len); -static __inlinevoid +static inline void ahc_linux_unmap_scb (struct ahc_softc *ahc,struct scb *scb) {struct scsi_cmnd *cmd;
drivers/scsi/aic7xxx/aic7xxx_osm.h +56 -56
284 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_pci.c +1 -1
@@ -54,7 +54,7 @@#include "aic7xxx_pci.h" -static __inlineuint64_t +static inline uint64_t ahc_compose_id (u_int device,u_int vendor,u_int subdevice,u_int subvendor) {uint64_t id;
drivers/scsi/aic7xxx/aiclib.h +2 -2
@@ -133,7 +133,7 @@ struct scsi_sense_data#define SCSI_STATUS_TASK_ABORTED 0x40/************************* Large Disk Handling ********************************/ -static __inlineint +static inline int aic_sector_div (sector_t capacity,int heads,int sectors) {/* ugly, ugly sector_div calling convention.. */
@@ -141,7 +141,7 @@ aic_sector_div(sector_t capacity, int hereturn (int )capacity; } -static __inlineuint32_t +static inline uint32_t scsi_4btoul (uint8_t *bytes) {uint32_t rv;
Quoted 6 lines · Denis Vlasenko
* moved inlines into
aic79xx_core.candaic7xxx_core.c
* fixed bug inahd_delay(made it a trivial wrapper around udelay)
* fixed bug inaic7xxx_pci.c(wrong order of parameters inahc_pci_write_configcalls)
* marked a few functions static
* spelling fix in error message
Won't apply t your tree because I failed to notice that you already included those two small fixes.
Rediffed patch (which hopefully will apply) is attached. Sorry.
Quoted 1 line
Patch which does s/__inline/inline/g will follow in a few minutes.
This one (which I already sent) should apply.
--
vda
drivers/scsi/aic7xxx/aic79xx.h +0 -1
@@ -1400,7 +1400,6 @@ int ahd_read_flexport(struct ahd_softint ahd_wait_flexport (struct ahd_softc *ahd);/*************************** Interrupt Services *******************************/ -void ahd_pci_intr (struct ahd_softc *ahd);void ahd_clear_intstat (struct ahd_softc *ahd);void ahd_flush_qoutfifo (struct ahd_softc *ahd);void ahd_run_qoutfifo (struct ahd_softc *ahd);
drivers/scsi/aic7xxx/aic79xx_core.c +597 -5
620 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_inline.c +0 -460
460 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_inline.h +5 -61
90 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_osm.h +4 -8
@@ -222,13 +222,6 @@ typedef struct timer_list ahd_timer_t;#endif #include "aic79xx.h" -/***************************** Timer Facilities *******************************/ -#define ahd_timer_init init_timer -#define ahd_timer_stop del_timer_sync -typedef void ahd_linux_callback_t (u_long ); -void ahd_timer_reset (ahd_timer_t *timer,int usec, -ahd_callback_t *func,void *arg); -/***************************** SMP support ************************************/ #include <linux/spinlock.h>
@@ -386,7 +379,10 @@ struct ahd_platform_data {#define malloc (size, type, flags) kmalloc(size, flags)#define free (ptr, type) kfree(ptr) -void ahd_delay (long ); +static inline void ahd_delay (int usec) +{ +udelay (usec); +}/***************************** Low Level I/O **********************************/ uint8_t ahd_inb (struct ahd_softc * ahd,long port);
drivers/scsi/aic7xxx/aic79xx_osm_o.c +0 -116
116 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_pci.c +3 -1
@@ -51,6 +51,8 @@#include "aic79xx_pci.h" +static void ahd_pci_intr (struct ahd_softc *ahd); +static __inlineuint64_t ahd_compose_id (u_int device,u_int vendor,u_int subdevice,u_int subvendor) {
@@ -757,7 +759,7 @@ static const char *pci_status_strings[] "%s: Address or Write Phase Parity Error Detected in %s.\n" }; -void +static void ahd_pci_intr (struct ahd_softc *ahd) {uint8_t pci_status[8 ];
drivers/scsi/aic7xxx/aic7xxx_core.c +358 -3
367 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_inline.c +0 -311
311 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_inline.h +0 -3
@@ -249,8 +249,6 @@ struct scb*void ahc_free_scb (struct ahc_softc *ahc,struct scb *scb);struct scb *ahc_lookup_scb (struct ahc_softc *ahc,u_int tag); -void ahc_swap_with_next_hscb (struct ahc_softc *ahc, -struct scb *scb);void ahc_queue_scb (struct ahc_softc *ahc,struct scb *scb);static __inlinestruct scsi_sense_data * ahc_get_sense_buf(struct ahc_softc *ahc,
@@ -315,7 +313,6 @@ ahc_get_sense_bufaddr(struct ahc_softc */************************** Interrupt Processing ******************************/ static __inlinevoid ahc_sync_qoutfifo (struct ahc_softc *ahc,int op);static __inlinevoid ahc_sync_tqinfifo (struct ahc_softc *ahc,int op); -u_int ahc_check_cmdcmpltqueues (struct ahc_softc *ahc);int ahc_intr (struct ahc_softc *ahc); static __inline void
drivers/scsi/aic7xxx/aic7xxx_osm.h +4 -1
@@ -387,7 +387,10 @@ struct ahc_platform_data {#define malloc (size, type, flags) kmalloc(size, flags)#define free (ptr, type) kfree(ptr) -void ahc_delay (long ); +static inline void ahc_delay (int usec) +{ +udelay (usec); +}/***************************** Low Level I/O **********************************/ uint8_t ahc_inb (struct ahc_softc * ahc,long port);
drivers/scsi/aic7xxx/aic7xxx_osm_o.c +0 -77
77 lines not on this page · raw message
Quoted 9 lines · Denis Vlasenko
Quoted 6 lines · Denis Vlasenko
* moved inlines into
aic79xx_core.candaic7xxx_core.c
* fixed bug inahd_delay(made it a trivial wrapper around udelay)
* fixed bug inaic7xxx_pci.c(wrong order of parameters inahc_pci_write_configcalls)
* marked a few functions static
* spelling fix in error message
Quoted 8 lines
Won't apply t your tree because I failed to notice that you already included those two small fixes.
Rediffed patch (which hopefully will apply) is attached. Sorry.
Quoted 1 line
Patch which does s/__inline/inline/g will follow in a few minutes.
This one (which I already sent) should apply.
I dropped everything except for aic7xxx-ahc_pci_write_config-fix.patch.
So please resend all patches from scratch. Preferably with accurate Subject:s and with standalone changelogs, thanks.
Quoted 4 lines · Andrew Morton
I dropped everything except for aic7xxx-ahc_pci_write_config-fix.patch.
So please resend all patches from scratch. Preferably with accurate Subject:s and with standalone changelogs, thanks.
Done, see my other mails.
--
vda