b/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -140,19 +140,17 @@ typedef union {
volatile uint8_t __iomem *maddr;
} bus_space_handle_t;
-typedef struct bus_dma_segment
-{
+typedef struct bus_dma_segment {
dma_addr_t ds_addr;
bus_size_t ds_len;
} bus_dma_segment_t;
-struct ahc_linux_dma_tag
-{
+struct ahc_linux_dma_tag {
bus_size_t alignment;
bus_size_t boundary;
bus_size_t maxsize;
};
-typedef struct ahc_linux_dma_tag* bus_dma_tag_t;
+typedef struct ahc_linux_dma_tag *bus_dma_tag_t;
typedef dma_addr_t bus_dmamap_t;
@@ -367,11 +365,11 @@ void ahc_delay(long);
/***************************** Low Level I/O
**********************************/
-uint8_t ahc_inb(struct ahc_softc * ahc, long port);
-void ahc_outb(struct ahc_softc * ahc, long port, uint8_t val);
-void ahc_outsb(struct ahc_softc * ahc, long port,
+uint8_t ahc_inb(struct ahc_softc *ahc, long port);
+void ahc_outb(struct ahc_softc *ahc, long port, uint8_t val);
+void ahc_outsb(struct ahc_softc *ahc, long port,
uint8_t *, int count);
-void ahc_insb(struct ahc_softc * ahc, long port,
+void ahc_insb(struct ahc_softc *ahc, long port,
uint8_t *, int count);
ERROR: "foo * bar" should be "foo *bar" ERROR: return is not a function, parentheses are not required ERROR: open brace '{' following function definitions go on the next line Signed-off-by: Ran Sun <sunran001@208suo.com> --- drivers/scsi/aic7xxx/aic7xxx_osm.h | 47 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 24 deletions(-) /**************************** Initialization **********************************/ @@ -434,8 +432,7 @@ ahc_unlock(struct ahc_softc *ahc, unsigned long *flags) /* config registers for header type 0 devices */ #define PCIR_MAPS 0x10 -typedef enum -{ +typedef enum { AHC_POWER_STATE_D0, AHC_POWER_STATE_D1, AHC_POWER_STATE_D2, @@ -450,10 +447,12 @@ int aic7770_map_registers(struct ahc_softc *ahc, u_int port); int aic7770_map_int(struct ahc_softc *ahc, u_int irq); #else -static inline int ahc_linux_eisa_init(void) { +static inline int ahc_linux_eisa_init(void) +{ return -ENODEV; } -static inline void ahc_linux_eisa_exit(void) { +static inline void ahc_linux_eisa_exit(void) +{ } #endif @@ -475,21 +474,21 @@ static inline int ahc_get_pci_function(ahc_dev_softc_t); static inline int ahc_get_pci_function(ahc_dev_softc_t pci) { - return (PCI_FUNC(pci->devfn)); + return PCI_FUNC(pci->devfn); } static inline int ahc_get_pci_slot(ahc_dev_softc_t); static inline int ahc_get_pci_slot(ahc_dev_softc_t pci) { - return (PCI_SLOT(pci->devfn)); + return PCI_SLOT(pci->devfn); } static inline int ahc_get_pci_bus(ahc_dev_softc_t); static inline int ahc_get_pci_bus(ahc_dev_softc_t pci) { - return (pci->bus->number); + return pci->bus->number; } #else static inline int ahc_linux_pci_init(void) { @@ -524,7 +523,7 @@ void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) static inline void ahc_set_transaction_status(struct scb *scb, uint32_t status) { - ahc_cmd_set_transaction_status(scb->io_ctx,status); + ahc_cmd_set_transaction_status(scb->io_ctx, status); } static inline @@ -549,7 +548,7 @@ uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd) static inline uint32_t ahc_get_transaction_status(struct scb *scb) { - return (ahc_cmd_get_transaction_status(scb->io_ctx)); + return ahc_cmd_get_transaction_status(scb->io_ctx); } static inline @@ -561,7 +560,7 @@ uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd) static inline uint32_t ahc_get_scsi_status(struct scb *scb) { - return (ahc_cmd_get_scsi_status(scb->io_ctx)); + return ahc_cmd_get_scsi_status(scb->io_ctx); } static inline @@ -576,13 +575,13 @@ void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type) static inline u_long ahc_get_transfer_length(struct scb *scb) { - return (scb->platform_data->xfer_len); + return scb->platform_data->xfer_len; } static inline int ahc_get_transfer_dir(struct scb *scb) { - return (scb->io_ctx->sc_data_direction); + return scb->io_ctx->sc_data_direction; } static inline @@ -606,7 +605,7 @@ u_long ahc_get_residual(struct scb *scb) static inline u_long ahc_get_sense_residual(struct scb *scb) { - return (scb->platform_data->sense_resid); + return scb->platform_data->sense_resid; } static inline @@ -617,13 +616,13 @@ int ahc_perform_autosense(struct scb *scb) * On other platforms this is set on a * per-transaction basis. */ - return (1); + return 1; } static inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb) { - return (sizeof(struct scsi_sense_data)); + return sizeof(struct scsi_sense_data); } static inline void