aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-06-25 08:49:05 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:01:21 -0400
commite2019b58fac87b93c04d9efc08324a28fd23d601 (patch)
tree8618e5f4e1fba059fd274de67d2480a53656396c /drivers/block
parentd14c4ab58c77c9a03b716c28f230ef944b08dc34 (diff)
[PATCH] CCISS: remove parens around return values
Typical Linux style is "return -EINVAL", not "return(-EINVAL)". Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Jeff Garzik <jeff@garzik.org> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 349654598d2e..44cf001db271 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -677,7 +677,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
677 pciinfo.board_id = host->board_id; 677 pciinfo.board_id = host->board_id;
678 if (copy_to_user(argp, &pciinfo, sizeof( cciss_pci_info_struct ))) 678 if (copy_to_user(argp, &pciinfo, sizeof( cciss_pci_info_struct )))
679 return -EFAULT; 679 return -EFAULT;
680 return(0); 680 return 0;
681 } 681 }
682 case CCISS_GETINTINFO: 682 case CCISS_GETINTINFO:
683 { 683 {
@@ -687,7 +687,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
687 intinfo.count = readl(&host->cfgtable->HostWrite.CoalIntCount); 687 intinfo.count = readl(&host->cfgtable->HostWrite.CoalIntCount);
688 if (copy_to_user(argp, &intinfo, sizeof( cciss_coalint_struct ))) 688 if (copy_to_user(argp, &intinfo, sizeof( cciss_coalint_struct )))
689 return -EFAULT; 689 return -EFAULT;
690 return(0); 690 return 0;
691 } 691 }
692 case CCISS_SETINTINFO: 692 case CCISS_SETINTINFO:
693 { 693 {
@@ -703,7 +703,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
703 703
704 { 704 {
705// printk("cciss_ioctl: delay and count cannot be 0\n"); 705// printk("cciss_ioctl: delay and count cannot be 0\n");
706 return( -EINVAL); 706 return -EINVAL;
707 } 707 }
708 spin_lock_irqsave(CCISS_LOCK(ctlr), flags); 708 spin_lock_irqsave(CCISS_LOCK(ctlr), flags);
709 /* Update the field, and then ring the doorbell */ 709 /* Update the field, and then ring the doorbell */
@@ -723,7 +723,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
723 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); 723 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
724 if (i >= MAX_IOCTL_CONFIG_WAIT) 724 if (i >= MAX_IOCTL_CONFIG_WAIT)
725 return -EAGAIN; 725 return -EAGAIN;
726 return(0); 726 return 0;
727 } 727 }
728 case CCISS_GETNODENAME: 728 case CCISS_GETNODENAME:
729 { 729 {
@@ -735,7 +735,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
735 NodeName[i] = readb(&host->cfgtable->ServerName[i]); 735 NodeName[i] = readb(&host->cfgtable->ServerName[i]);
736 if (copy_to_user(argp, NodeName, sizeof( NodeName_type))) 736 if (copy_to_user(argp, NodeName, sizeof( NodeName_type)))
737 return -EFAULT; 737 return -EFAULT;
738 return(0); 738 return 0;
739 } 739 }
740 case CCISS_SETNODENAME: 740 case CCISS_SETNODENAME:
741 { 741 {
@@ -767,7 +767,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
767 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); 767 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
768 if (i >= MAX_IOCTL_CONFIG_WAIT) 768 if (i >= MAX_IOCTL_CONFIG_WAIT)
769 return -EAGAIN; 769 return -EAGAIN;
770 return(0); 770 return 0;
771 } 771 }
772 772
773 case CCISS_GETHEARTBEAT: 773 case CCISS_GETHEARTBEAT:
@@ -778,7 +778,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
778 heartbeat = readl(&host->cfgtable->HeartBeat); 778 heartbeat = readl(&host->cfgtable->HeartBeat);
779 if (copy_to_user(argp, &heartbeat, sizeof( Heartbeat_type))) 779 if (copy_to_user(argp, &heartbeat, sizeof( Heartbeat_type)))
780 return -EFAULT; 780 return -EFAULT;
781 return(0); 781 return 0;
782 } 782 }
783 case CCISS_GETBUSTYPES: 783 case CCISS_GETBUSTYPES:
784 { 784 {
@@ -788,7 +788,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
788 BusTypes = readl(&host->cfgtable->BusTypes); 788 BusTypes = readl(&host->cfgtable->BusTypes);
789 if (copy_to_user(argp, &BusTypes, sizeof( BusTypes_type) )) 789 if (copy_to_user(argp, &BusTypes, sizeof( BusTypes_type) ))
790 return -EFAULT; 790 return -EFAULT;
791 return(0); 791 return 0;
792 } 792 }
793 case CCISS_GETFIRMVER: 793 case CCISS_GETFIRMVER:
794 { 794 {
@@ -799,7 +799,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
799 799
800 if (copy_to_user(argp, firmware, sizeof( FirmwareVer_type))) 800 if (copy_to_user(argp, firmware, sizeof( FirmwareVer_type)))
801 return -EFAULT; 801 return -EFAULT;
802 return(0); 802 return 0;
803 } 803 }
804 case CCISS_GETDRIVVER: 804 case CCISS_GETDRIVVER:
805 { 805 {
@@ -809,7 +809,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
809 809
810 if (copy_to_user(argp, &DriverVer, sizeof( DriverVer_type) )) 810 if (copy_to_user(argp, &DriverVer, sizeof( DriverVer_type) ))
811 return -EFAULT; 811 return -EFAULT;
812 return(0); 812 return 0;
813 } 813 }
814 814
815 case CCISS_REVALIDVOLS: 815 case CCISS_REVALIDVOLS:
@@ -826,7 +826,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
826 if (copy_to_user(argp, &luninfo, 826 if (copy_to_user(argp, &luninfo,
827 sizeof(LogvolInfo_struct))) 827 sizeof(LogvolInfo_struct)))
828 return -EFAULT; 828 return -EFAULT;
829 return(0); 829 return 0;
830 } 830 }
831 case CCISS_DEREGDISK: 831 case CCISS_DEREGDISK:
832 return rebuild_lun_table(host, disk); 832 return rebuild_lun_table(host, disk);
@@ -934,7 +934,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
934 { 934 {
935 kfree(buff); 935 kfree(buff);
936 cmd_free(host, c, 0); 936 cmd_free(host, c, 0);
937 return( -EFAULT); 937 return -EFAULT;
938 } 938 }
939 939
940 if (iocommand.Request.Type.Direction == XFER_READ) 940 if (iocommand.Request.Type.Direction == XFER_READ)
@@ -949,7 +949,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
949 } 949 }
950 kfree(buff); 950 kfree(buff);
951 cmd_free(host, c, 0); 951 cmd_free(host, c, 0);
952 return(0); 952 return 0;
953 } 953 }
954 case CCISS_BIG_PASSTHRU: { 954 case CCISS_BIG_PASSTHRU: {
955 BIG_IOCTL_Command_struct *ioc; 955 BIG_IOCTL_Command_struct *ioc;
@@ -1101,7 +1101,7 @@ cleanup1:
1101 } 1101 }
1102 kfree(buff_size); 1102 kfree(buff_size);
1103 kfree(ioc); 1103 kfree(ioc);
1104 return(status); 1104 return status;
1105 } 1105 }
1106 default: 1106 default:
1107 return -ENOTTY; 1107 return -ENOTTY;
@@ -1546,7 +1546,7 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
1546 1546
1547 drv->LunID = 0; 1547 drv->LunID = 0;
1548 } 1548 }
1549 return(0); 1549 return 0;
1550} 1550}
1551 1551
1552static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff, 1552static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff,
@@ -1639,7 +1639,7 @@ static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff,
1639 default: 1639 default:
1640 printk(KERN_WARNING 1640 printk(KERN_WARNING
1641 "cciss%d: Unknown Command 0x%c\n", ctlr, cmd); 1641 "cciss%d: Unknown Command 0x%c\n", ctlr, cmd);
1642 return(IO_ERROR); 1642 return IO_ERROR;
1643 } 1643 }
1644 } else if (cmd_type == TYPE_MSG) { 1644 } else if (cmd_type == TYPE_MSG) {
1645 switch (cmd) { 1645 switch (cmd) {
@@ -1807,7 +1807,7 @@ case CMD_HARDWARE_ERR:
1807 pci_unmap_single( h->pdev, (dma_addr_t) buff_dma_handle.val, 1807 pci_unmap_single( h->pdev, (dma_addr_t) buff_dma_handle.val,
1808 c->SG[0].Len, PCI_DMA_BIDIRECTIONAL); 1808 c->SG[0].Len, PCI_DMA_BIDIRECTIONAL);
1809 cmd_free(h, c, 0); 1809 cmd_free(h, c, 0);
1810 return(return_status); 1810 return return_status;
1811 1811
1812} 1812}
1813static void cciss_geometry_inquiry(int ctlr, int logvol, 1813static void cciss_geometry_inquiry(int ctlr, int logvol,
@@ -1942,7 +1942,7 @@ static unsigned long pollcomplete(int ctlr)
1942 if (done == FIFO_EMPTY) 1942 if (done == FIFO_EMPTY)
1943 schedule_timeout_uninterruptible(1); 1943 schedule_timeout_uninterruptible(1);
1944 else 1944 else
1945 return (done); 1945 return done;
1946 } 1946 }
1947 /* Invalid address to tell caller we ran out of time */ 1947 /* Invalid address to tell caller we ran out of time */
1948 return 1; 1948 return 1;
@@ -2019,7 +2019,7 @@ static int sendcmd(
2019 2019
2020 if ((c = cmd_alloc(info_p, 1)) == NULL) { 2020 if ((c = cmd_alloc(info_p, 1)) == NULL) {
2021 printk(KERN_WARNING "cciss: unable to get memory"); 2021 printk(KERN_WARNING "cciss: unable to get memory");
2022 return(IO_ERROR); 2022 return IO_ERROR;
2023 } 2023 }
2024 status = fill_cmd(c, cmd, ctlr, buff, size, use_unit_num, 2024 status = fill_cmd(c, cmd, ctlr, buff, size, use_unit_num,
2025 log_unit, page_code, scsi3addr, cmd_type); 2025 log_unit, page_code, scsi3addr, cmd_type);
@@ -2154,7 +2154,7 @@ cleanup1:
2154 do_cciss_intr(0, info_p, NULL); 2154 do_cciss_intr(0, info_p, NULL);
2155#endif 2155#endif
2156 cmd_free(info_p, c, 1); 2156 cmd_free(info_p, c, 1);
2157 return (status); 2157 return status;
2158} 2158}
2159/* 2159/*
2160 * Map (physical) PCI mem into (virtual) kernel space 2160 * Map (physical) PCI mem into (virtual) kernel space
@@ -3088,7 +3088,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3088 3088
3089 i = alloc_cciss_hba(); 3089 i = alloc_cciss_hba();
3090 if(i < 0) 3090 if(i < 0)
3091 return (-1); 3091 return -1;
3092 3092
3093 hba[i]->busy_initializing = 1; 3093 hba[i]->busy_initializing = 1;
3094 3094
@@ -3230,7 +3230,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3230 add_disk(disk); 3230 add_disk(disk);
3231 } 3231 }
3232 3232
3233 return(1); 3233 return 1;
3234 3234
3235clean4: 3235clean4:
3236#ifdef CONFIG_CISS_SCSI_TAPE 3236#ifdef CONFIG_CISS_SCSI_TAPE
@@ -3252,7 +3252,7 @@ clean2:
3252clean1: 3252clean1:
3253 hba[i]->busy_initializing = 0; 3253 hba[i]->busy_initializing = 0;
3254 free_hba(i); 3254 free_hba(i);
3255 return(-1); 3255 return -1;
3256} 3256}
3257 3257
3258static void __devexit cciss_remove_one (struct pci_dev *pdev) 3258static void __devexit cciss_remove_one (struct pci_dev *pdev)