aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:34 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:34 -0400
commite3faa2481e832568d13dfa3a52d17525b322cb8f (patch)
treee79bf8e475f1e9ceda7c96b1c10c1de0b7e5133b /drivers/ide
parent51509eec34debffec3c6f481f7371c9aeb6c63c1 (diff)
ide-floppy: remove needless parens
Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-floppy.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index ace6f26a296a..6a944cb7054f 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -738,7 +738,7 @@ static int idefloppy_get_sfrp_bit(ide_drive_t *drive)
738 return 1; 738 return 1;
739 739
740 floppy->srfp = pc.buf[8 + 2] & 0x40; 740 floppy->srfp = pc.buf[8 + 2] & 0x40;
741 return (0); 741 return 0;
742} 742}
743 743
744/* 744/*
@@ -866,16 +866,17 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, int __user *arg)
866 int __user *argp; 866 int __user *argp;
867 867
868 if (get_user(u_array_size, arg)) 868 if (get_user(u_array_size, arg))
869 return (-EFAULT); 869 return -EFAULT;
870 870
871 if (u_array_size <= 0) 871 if (u_array_size <= 0)
872 return (-EINVAL); 872 return -EINVAL;
873 873
874 idefloppy_create_read_capacity_cmd(&pc); 874 idefloppy_create_read_capacity_cmd(&pc);
875 if (idefloppy_queue_pc_tail(drive, &pc)) { 875 if (idefloppy_queue_pc_tail(drive, &pc)) {
876 printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n"); 876 printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n");
877 return (-EIO); 877 return -EIO;
878 } 878 }
879
879 header_len = pc.buf[3]; 880 header_len = pc.buf[3];
880 desc_cnt = header_len / 8; /* capacity descriptor of 8 bytes */ 881 desc_cnt = header_len / 8; /* capacity descriptor of 8 bytes */
881 882
@@ -897,19 +898,22 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, int __user *arg)
897 length = be16_to_cpup((__be16 *)&pc.buf[desc_start + 6]); 898 length = be16_to_cpup((__be16 *)&pc.buf[desc_start + 6]);
898 899
899 if (put_user(blocks, argp)) 900 if (put_user(blocks, argp))
900 return(-EFAULT); 901 return -EFAULT;
902
901 ++argp; 903 ++argp;
902 904
903 if (put_user(length, argp)) 905 if (put_user(length, argp))
904 return (-EFAULT); 906 return -EFAULT;
907
905 ++argp; 908 ++argp;
906 909
907 ++u_index; 910 ++u_index;
908 } 911 }
909 912
910 if (put_user(u_index, arg)) 913 if (put_user(u_index, arg))
911 return (-EFAULT); 914 return -EFAULT;
912 return (0); 915
916 return 0;
913} 917}
914 918
915/* 919/*
@@ -931,7 +935,7 @@ static int idefloppy_get_format_progress(ide_drive_t *drive, int __user *arg)
931 if (floppy->srfp) { 935 if (floppy->srfp) {
932 idefloppy_create_request_sense_cmd(&pc); 936 idefloppy_create_request_sense_cmd(&pc);
933 if (idefloppy_queue_pc_tail(drive, &pc)) 937 if (idefloppy_queue_pc_tail(drive, &pc))
934 return (-EIO); 938 return -EIO;
935 939
936 if (floppy->sense_key == 2 && 940 if (floppy->sense_key == 2 &&
937 floppy->asc == 4 && 941 floppy->asc == 4 &&
@@ -950,10 +954,11 @@ static int idefloppy_get_format_progress(ide_drive_t *drive, int __user *arg)
950 954
951 progress_indication = ((stat & ATA_DSC) == 0) ? 0 : 0x10000; 955 progress_indication = ((stat & ATA_DSC) == 0) ? 0 : 0x10000;
952 } 956 }
957
953 if (put_user(progress_indication, arg)) 958 if (put_user(progress_indication, arg))
954 return (-EFAULT); 959 return -EFAULT;
955 960
956 return (0); 961 return 0;
957} 962}
958 963
959static sector_t idefloppy_capacity(ide_drive_t *drive) 964static sector_t idefloppy_capacity(ide_drive_t *drive)