Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Four small fixes.

Three are in drivers for fairly obvious bugs. The fourth is a set of
regressions introduced by the compat_ioctl changes because some of the
compat updates wrongly replaced .ioctl instead of .compat_ioctl"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places
scsi: zfcp: fix wrong data and display format of SFP+ temperature
scsi: sd_sbc: Fix sd_zbc_report_zones()
scsi: libfc: free response frame from GPN_ID

Changed files
+14 -7
drivers
block
paride
cdrom
ide
s390
scsi
+1 -1
drivers/block/paride/pcd.c
··· 276 276 .release = pcd_block_release, 277 277 .ioctl = pcd_block_ioctl, 278 278 #ifdef CONFIG_COMPAT 279 - .ioctl = blkdev_compat_ptr_ioctl, 279 + .compat_ioctl = blkdev_compat_ptr_ioctl, 280 280 #endif 281 281 .check_events = pcd_block_check_events, 282 282 };
+1 -1
drivers/cdrom/gdrom.c
··· 519 519 .check_events = gdrom_bdops_check_events, 520 520 .ioctl = gdrom_bdops_ioctl, 521 521 #ifdef CONFIG_COMPAT 522 - .ioctl = blkdev_compat_ptr_ioctl, 522 + .compat_ioctl = blkdev_compat_ptr_ioctl, 523 523 #endif 524 524 }; 525 525
+1 -1
drivers/ide/ide-gd.c
··· 361 361 .release = ide_gd_release, 362 362 .ioctl = ide_gd_ioctl, 363 363 #ifdef CONFIG_COMPAT 364 - .ioctl = ide_gd_compat_ioctl, 364 + .compat_ioctl = ide_gd_compat_ioctl, 365 365 #endif 366 366 .getgeo = ide_gd_getgeo, 367 367 .check_events = ide_gd_check_events,
+1 -1
drivers/s390/scsi/zfcp_fsf.h
··· 410 410 u8 cb_util; 411 411 u8 a_util; 412 412 u8 res2; 413 - u16 temperature; 413 + s16 temperature; 414 414 u16 vcc; 415 415 u16 tx_bias; 416 416 u16 tx_power;
+1 -1
drivers/s390/scsi/zfcp_sysfs.c
··· 800 800 static ZFCP_DEV_ATTR(adapter_diag_sfp, _name, 0400, \ 801 801 zfcp_sysfs_adapter_diag_sfp_##_name##_show, NULL) 802 802 803 - ZFCP_DEFINE_DIAG_SFP_ATTR(temperature, temperature, 5, "%hu"); 803 + ZFCP_DEFINE_DIAG_SFP_ATTR(temperature, temperature, 6, "%hd"); 804 804 ZFCP_DEFINE_DIAG_SFP_ATTR(vcc, vcc, 5, "%hu"); 805 805 ZFCP_DEFINE_DIAG_SFP_ATTR(tx_bias, tx_bias, 5, "%hu"); 806 806 ZFCP_DEFINE_DIAG_SFP_ATTR(tx_power, tx_power, 5, "%hu");
+2
drivers/scsi/libfc/fc_disc.c
··· 628 628 } 629 629 out: 630 630 kref_put(&rdata->kref, fc_rport_destroy); 631 + if (!IS_ERR(fp)) 632 + fc_frame_free(fp); 631 633 } 632 634 633 635 /**
+6 -1
drivers/scsi/sd_zbc.c
··· 161 161 unsigned int nr_zones, report_zones_cb cb, void *data) 162 162 { 163 163 struct scsi_disk *sdkp = scsi_disk(disk); 164 + sector_t capacity = logical_to_sectors(sdkp->device, sdkp->capacity); 164 165 unsigned int nr, i; 165 166 unsigned char *buf; 166 167 size_t offset, buflen = 0; ··· 172 171 /* Not a zoned device */ 173 172 return -EOPNOTSUPP; 174 173 174 + if (!capacity) 175 + /* Device gone or invalid */ 176 + return -ENODEV; 177 + 175 178 buf = sd_zbc_alloc_report_buffer(sdkp, nr_zones, &buflen); 176 179 if (!buf) 177 180 return -ENOMEM; 178 181 179 - while (zone_idx < nr_zones && sector < get_capacity(disk)) { 182 + while (zone_idx < nr_zones && sector < capacity) { 180 183 ret = sd_zbc_do_report_zones(sdkp, buf, buflen, 181 184 sectors_to_logical(sdkp->device, sector), true); 182 185 if (ret)
+1 -1
drivers/scsi/sr.c
··· 688 688 .release = sr_block_release, 689 689 .ioctl = sr_block_ioctl, 690 690 #ifdef CONFIG_COMPAT 691 - .ioctl = sr_block_compat_ioctl, 691 + .compat_ioctl = sr_block_compat_ioctl, 692 692 #endif 693 693 .check_events = sr_block_check_events, 694 694 .revalidate_disk = sr_block_revalidate_disk,