History

scsi: ata: Use unsigned int for cmd's type in ioctls in scsi_host_template

Clang warns several times in the scsi subsystem (trimmed for brevity): drivers/scsi/hpsa.c:6209:7: warning: overflow converting case value to switch condition type (2147762695 to 18446744071562347015) [-Wswitch] case CCISS_GETBUSTYPES: ^ drivers/scsi/hpsa.c:6208:7: warning: overflow converting case value to switch condition type (2147762694 to 18446744071562347014) [-Wswitch] case CCISS_GETHEARTBEAT: ^ The root cause is that the _IOC macro can generate really large numbers, which don't fit into type 'int', which is used for the cmd parameter in the ioctls in scsi_host_template. My research into how GCC and Clang are handling this at a low level didn't prove fruitful. However, looking at the rest of the kernel tree, all ioctls use an 'unsigned int' for the cmd parameter, which will fit all of the _IOC values in the scsi/ata subsystems. Make that change because none of the ioctls expect a negative value for any command, it brings the ioctls inline with the reset of the kernel, and it removes ambiguity, which is never good when dealing with compilers.

Nathan Chancellor committed 7 years ago

Commit 6f4e6261 parent 42fb05519 files · +54 −44Browse files

Unified · Split

19 files
  1. drivers/ata/libata-scsi.c +3 −2
  2. drivers/scsi/aacraid/aachba.c +1 −1
  3. drivers/scsi/aacraid/aacraid.h +2 −2
  4. drivers/scsi/aacraid/commctrl.c +1 −1
  5. drivers/scsi/aacraid/linit.c +4 −2
  6. drivers/scsi/cxlflash/common.h +2 −1
  7. drivers/scsi/cxlflash/main.c +1 −1
  8. drivers/scsi/cxlflash/superpipe.c +5 −7
  9. drivers/scsi/esas2r/esas2r.h +2 −2
  10. drivers/scsi/esas2r/esas2r_ioctl.c +7 −9
  11. drivers/scsi/esas2r/esas2r_main.c +1 −1
  12. drivers/scsi/hpsa.c +9 −6
  13. drivers/scsi/ipr.c +2 −1
  14. drivers/scsi/libsas/sas_scsi_host.c +1 −1
  15. drivers/scsi/scsi_debug.c +2 −1
  16. drivers/scsi/smartpqi/smartpqi_init.c +2 −1
  17. include/linux/libata.h +3 −2
  18. include/scsi/libsas.h +2 −1
  19. include/scsi/scsi_host.h +4 −2
drivers/ata/libata-scsi.c+3−2
@@ -778,7 +778,7 @@ static int ata_ioc32(struct ata_port *ap) · 777 unmodified lines
778}778}
779 779
780int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,780int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
781 int cmd, void __user *arg)781 unsigned int cmd, void __user *arg)
782{782{
783 unsigned long val;783 unsigned long val;
784 int rc = -EINVAL;784 int rc = -EINVAL;
@@ -829,7 +829,8 @@ int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev, · 44 unmodified lines
829}829}
830EXPORT_SYMBOL_GPL(ata_sas_scsi_ioctl);830EXPORT_SYMBOL_GPL(ata_sas_scsi_ioctl);
831 831
832int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)832int ata_scsi_ioctl(struct scsi_device *scsidev, unsigned int cmd,
833 void __user *arg)
833{834{
834 return ata_sas_scsi_ioctl(ata_shost_to_port(scsidev->host),835 return ata_sas_scsi_ioctl(ata_shost_to_port(scsidev->host),
835 scsidev, cmd, arg);836 scsidev, cmd, arg);
drivers/scsi/aacraid/aachba.c+1−1
@@ -3455,7 +3455,7 @@ static int delete_disk(struct aac_dev *dev, void __user *arg) · 3454 unmodified lines
3455 }3455 }
3456}3456}
3457 3457
3458int aac_dev_ioctl(struct aac_dev *dev, int cmd, void __user *arg)3458int aac_dev_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg)
3459{3459{
3460 switch (cmd) {3460 switch (cmd) {
3461 case FSACTL_QUERY_DISK:3461 case FSACTL_QUERY_DISK:
drivers/scsi/aacraid/aacraid.h+2−2
@@ -2706,12 +2706,12 @@ void aac_set_intx_mode(struct aac_dev *dev); · 2705 unmodified lines
2706int aac_get_config_status(struct aac_dev *dev, int commit_flag);2706int aac_get_config_status(struct aac_dev *dev, int commit_flag);
2707int aac_get_containers(struct aac_dev *dev);2707int aac_get_containers(struct aac_dev *dev);
2708int aac_scsi_cmd(struct scsi_cmnd *cmd);2708int aac_scsi_cmd(struct scsi_cmnd *cmd);
2709int aac_dev_ioctl(struct aac_dev *dev, int cmd, void __user *arg);2709int aac_dev_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg);
2710#ifndef shost_to_class2710#ifndef shost_to_class
2711#define shost_to_class(shost) &shost->shost_dev2711#define shost_to_class(shost) &shost->shost_dev
2712#endif2712#endif
2713ssize_t aac_get_serial_number(struct device *dev, char *buf);2713ssize_t aac_get_serial_number(struct device *dev, char *buf);
2714int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg);2714int aac_do_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg);
2715int aac_rx_init(struct aac_dev *dev);2715int aac_rx_init(struct aac_dev *dev);
2716int aac_rkt_init(struct aac_dev *dev);2716int aac_rkt_init(struct aac_dev *dev);
2717int aac_nark_init(struct aac_dev *dev);2717int aac_nark_init(struct aac_dev *dev);
drivers/scsi/aacraid/commctrl.c+1−1
@@ -1060,7 +1060,7 @@ static int aac_send_reset_adapter(struct aac_dev *dev, void __user *arg) · 1059 unmodified lines
1060 return retval;1060 return retval;
1061}1061}
1062 1062
1063int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg)1063int aac_do_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg)
1064{1064{
1065 int status;1065 int status;
1066 1066
drivers/scsi/aacraid/linit.c+4−2
@@ -616,7 +616,8 @@ static struct device_attribute *aac_dev_attrs[] = { · 615 unmodified lines
616 NULL,616 NULL,
617};617};
618 618
619static int aac_ioctl(struct scsi_device *sdev, int cmd, void __user * arg)619static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd,
620 void __user *arg)
620{621{
621 struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;622 struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
622 if (!capable(CAP_SYS_RAWIO))623 if (!capable(CAP_SYS_RAWIO))
@@ -1205,7 +1206,8 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long · 582 unmodified lines
1205 return ret;1206 return ret;
1206}1207}
1207 1208
1208static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)1209static int aac_compat_ioctl(struct scsi_device *sdev, unsigned int cmd,
1210 void __user *arg)
1209{1211{
1210 struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;1212 struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
1211 if (!capable(CAP_SYS_RAWIO))1213 if (!capable(CAP_SYS_RAWIO))
drivers/scsi/cxlflash/common.h+2−1
@@ -334,7 +334,8 @@ int cxlflash_afu_sync(struct afu *afu, ctx_hndl_t c, res_hndl_t r, u8 mode); · 333 unmodified lines
334void cxlflash_list_init(void);334void cxlflash_list_init(void);
335void cxlflash_term_global_luns(void);335void cxlflash_term_global_luns(void);
336void cxlflash_free_errpage(void);336void cxlflash_free_errpage(void);
337int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg);337int cxlflash_ioctl(struct scsi_device *sdev, unsigned int cmd,
338 void __user *arg);
338void cxlflash_stop_term_user_contexts(struct cxlflash_cfg *cfg);339void cxlflash_stop_term_user_contexts(struct cxlflash_cfg *cfg);
339int cxlflash_mark_contexts_error(struct cxlflash_cfg *cfg);340int cxlflash_mark_contexts_error(struct cxlflash_cfg *cfg);
340void cxlflash_term_local_luns(struct cxlflash_cfg *cfg);341void cxlflash_term_local_luns(struct cxlflash_cfg *cfg);
drivers/scsi/cxlflash/main.c+1−1
@@ -3282,7 +3282,7 @@ static int cxlflash_chr_open(struct inode *inode, struct file *file) · 3281 unmodified lines
3282 *3282 *
3283 * Return: A string identifying the decoded host ioctl.3283 * Return: A string identifying the decoded host ioctl.
3284 */3284 */
3285static char *decode_hioctl(int cmd)3285static char *decode_hioctl(unsigned int cmd)
3286{3286{
3287 switch (cmd) {3287 switch (cmd) {
3288 case HT_CXLFLASH_LUN_PROVISION:3288 case HT_CXLFLASH_LUN_PROVISION:
drivers/scsi/cxlflash/superpipe.c+5−7
@@ -1924,7 +1924,7 @@ out: · 1923 unmodified lines
1924 *1924 *
1925 * Return: A string identifying the decoded ioctl.1925 * Return: A string identifying the decoded ioctl.
1926 */1926 */
1927static char *decode_ioctl(int cmd)1927static char *decode_ioctl(unsigned int cmd)
1928{1928{
1929 switch (cmd) {1929 switch (cmd) {
1930 case DK_CXLFLASH_ATTACH:1930 case DK_CXLFLASH_ATTACH:
@@ -2051,7 +2051,7 @@ err1: · 120 unmodified lines
2051 *2051 *
2052 * Return: 0 on success, -errno on failure2052 * Return: 0 on success, -errno on failure
2053 */2053 */
2054static int ioctl_common(struct scsi_device *sdev, int cmd)2054static int ioctl_common(struct scsi_device *sdev, unsigned int cmd)
2055{2055{
2056 struct cxlflash_cfg *cfg = shost_priv(sdev->host);2056 struct cxlflash_cfg *cfg = shost_priv(sdev->host);
2057 struct device *dev = &cfg->dev->dev;2057 struct device *dev = &cfg->dev->dev;
@@ -2096,7 +2096,7 @@ out: · 38 unmodified lines
2096 *2096 *
2097 * Return: 0 on success, -errno on failure2097 * Return: 0 on success, -errno on failure
2098 */2098 */
2099int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)2099int cxlflash_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user *arg)
2100{2100{
2101 typedef int (*sioctl) (struct scsi_device *, void *);2101 typedef int (*sioctl) (struct scsi_device *, void *);
2102 2102
@@ -2179,8 +2179,7 @@ int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) · 76 unmodified lines
2179 }2179 }
2180 2180
2181 if (unlikely(copy_from_user(&buf, arg, size))) {2181 if (unlikely(copy_from_user(&buf, arg, size))) {
2182 dev_err(dev, "%s: copy_from_user() fail "2182 dev_err(dev, "%s: copy_from_user() fail size=%lu cmd=%u (%s) arg=%p\n",
2183 "size=%lu cmd=%d (%s) arg=%p\n",
2184 __func__, size, cmd, decode_ioctl(cmd), arg);2183 __func__, size, cmd, decode_ioctl(cmd), arg);
2185 rc = -EFAULT;2184 rc = -EFAULT;
2186 goto cxlflash_ioctl_exit;2185 goto cxlflash_ioctl_exit;
@@ -2203,8 +2202,7 @@ int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) · 16 unmodified lines
2203 rc = do_ioctl(sdev, (void *)&buf);2202 rc = do_ioctl(sdev, (void *)&buf);
2204 if (likely(!rc))2203 if (likely(!rc))
2205 if (unlikely(copy_to_user(arg, &buf, size))) {2204 if (unlikely(copy_to_user(arg, &buf, size))) {
2206 dev_err(dev, "%s: copy_to_user() fail "2205 dev_err(dev, "%s: copy_to_user() fail size=%lu cmd=%u (%s) arg=%p\n",
2207 "size=%lu cmd=%d (%s) arg=%p\n",
2208 __func__, size, cmd, decode_ioctl(cmd), arg);2206 __func__, size, cmd, decode_ioctl(cmd), arg);
2209 rc = -EFAULT;2207 rc = -EFAULT;
2210 }2208 }
drivers/scsi/esas2r/esas2r.h+2−2
@@ -965,8 +965,8 @@ struct esas2r_adapter { · 964 unmodified lines
965const char *esas2r_info(struct Scsi_Host *);965const char *esas2r_info(struct Scsi_Host *);
966int esas2r_write_params(struct esas2r_adapter *a, struct esas2r_request *rq,966int esas2r_write_params(struct esas2r_adapter *a, struct esas2r_request *rq,
967 struct esas2r_sas_nvram *data);967 struct esas2r_sas_nvram *data);
968int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg);968int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg);
969int esas2r_ioctl(struct scsi_device *dev, int cmd, void __user *arg);969int esas2r_ioctl(struct scsi_device *dev, unsigned int cmd, void __user *arg);
970u8 handle_hba_ioctl(struct esas2r_adapter *a,970u8 handle_hba_ioctl(struct esas2r_adapter *a,
971 struct atto_ioctl *ioctl_hba);971 struct atto_ioctl *ioctl_hba);
972int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd);972int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd);
drivers/scsi/esas2r/esas2r_ioctl.c+7−9
@@ -1274,7 +1274,7 @@ int esas2r_write_params(struct esas2r_adapter *a, struct esas2r_request *rq, · 1273 unmodified lines
1274 1274
1275 1275
1276/* This function only cares about ATTO-specific ioctls (atto_express_ioctl) */1276/* This function only cares about ATTO-specific ioctls (atto_express_ioctl) */
1277int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg)1277int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg)
1278{1278{
1279 struct atto_express_ioctl *ioctl = NULL;1279 struct atto_express_ioctl *ioctl = NULL;
1280 struct esas2r_adapter *a;1280 struct esas2r_adapter *a;
@@ -1292,9 +1292,8 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg) · 11 unmodified lines
1292 ioctl = memdup_user(arg, sizeof(struct atto_express_ioctl));1292 ioctl = memdup_user(arg, sizeof(struct atto_express_ioctl));
1293 if (IS_ERR(ioctl)) {1293 if (IS_ERR(ioctl)) {
1294 esas2r_log(ESAS2R_LOG_WARN,1294 esas2r_log(ESAS2R_LOG_WARN,
1295 "ioctl_handler access_ok failed for cmd %d, "1295 "ioctl_handler access_ok failed for cmd %u, address %p",
1296 "address %p", cmd,1296 cmd, arg);
1297 arg);
1298 return PTR_ERR(ioctl);1297 return PTR_ERR(ioctl);
1299 }1298 }
1300 1299
@@ -1493,7 +1492,7 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg) · 192 unmodified lines
1493ioctl_done:1492ioctl_done:
1494 1493
1495 if (err < 0) {1494 if (err < 0) {
1496 esas2r_log(ESAS2R_LOG_WARN, "err %d on ioctl cmd %d", err,1495 esas2r_log(ESAS2R_LOG_WARN, "err %d on ioctl cmd %u", err,
1497 cmd);1496 cmd);
1498 1497
1499 switch (err) {1498 switch (err) {
@@ -1518,9 +1517,8 @@ ioctl_done: · 18 unmodified lines
1518 err = __copy_to_user(arg, ioctl, sizeof(struct atto_express_ioctl));1517 err = __copy_to_user(arg, ioctl, sizeof(struct atto_express_ioctl));
1519 if (err != 0) {1518 if (err != 0) {
1520 esas2r_log(ESAS2R_LOG_WARN,1519 esas2r_log(ESAS2R_LOG_WARN,
1521 "ioctl_handler copy_to_user didn't copy "1520 "ioctl_handler copy_to_user didn't copy everything (err %d, cmd %u)",
1522 "everything (err %d, cmd %d)", err,1521 err, cmd);
1523 cmd);
1524 kfree(ioctl);1522 kfree(ioctl);
1525 1523
1526 return -EFAULT;1524 return -EFAULT;
@@ -1531,7 +1529,7 @@ ioctl_done: · 4 unmodified lines
1531 return 0;1529 return 0;
1532}1530}
1533 1531
1534int esas2r_ioctl(struct scsi_device *sd, int cmd, void __user *arg)1532int esas2r_ioctl(struct scsi_device *sd, unsigned int cmd, void __user *arg)
1535{1533{
1536 return esas2r_ioctl_handler(sd->host->hostdata, cmd, arg);1534 return esas2r_ioctl_handler(sd->host->hostdata, cmd, arg);
1537}1535}
drivers/scsi/esas2r/esas2r_main.c+1−1
@@ -623,7 +623,7 @@ static int esas2r_proc_major; · 622 unmodified lines
623long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)623long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
624{624{
625 return esas2r_ioctl_handler(esas2r_proc_host->hostdata,625 return esas2r_ioctl_handler(esas2r_proc_host->hostdata,
626 (int)cmd, (void __user *)arg);626 cmd, (void __user *)arg);
627}627}
628 628
629static void __exit esas2r_exit(void)629static void __exit esas2r_exit(void)
drivers/scsi/hpsa.c+9−6
@@ -251,10 +251,11 @@ static int number_of_controllers; · 250 unmodified lines
251 251
252static irqreturn_t do_hpsa_intr_intx(int irq, void *dev_id);252static irqreturn_t do_hpsa_intr_intx(int irq, void *dev_id);
253static irqreturn_t do_hpsa_intr_msi(int irq, void *dev_id);253static irqreturn_t do_hpsa_intr_msi(int irq, void *dev_id);
254static int hpsa_ioctl(struct scsi_device *dev, int cmd, void __user *arg);254static int hpsa_ioctl(struct scsi_device *dev, unsigned int cmd,
255 void __user *arg);
255 256
256#ifdef CONFIG_COMPAT257#ifdef CONFIG_COMPAT
257static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd,258static int hpsa_compat_ioctl(struct scsi_device *dev, unsigned int cmd,
258 void __user *arg);259 void __user *arg);
259#endif260#endif
260 261
@@ -6127,7 +6128,7 @@ static void cmd_free(struct ctlr_info *h, struct CommandList *c) · 5866 unmodified lines
6127 6128
6128#ifdef CONFIG_COMPAT6129#ifdef CONFIG_COMPAT
6129 6130
6130static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd,6131static int hpsa_ioctl32_passthru(struct scsi_device *dev, unsigned int cmd,
6131 void __user *arg)6132 void __user *arg)
6132{6133{
6133 IOCTL32_Command_struct __user *arg32 =6134 IOCTL32_Command_struct __user *arg32 =
@@ -6164,7 +6165,7 @@ static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd, · 30 unmodified lines
6164}6165}
6165 6166
6166static int hpsa_ioctl32_big_passthru(struct scsi_device *dev,6167static int hpsa_ioctl32_big_passthru(struct scsi_device *dev,
6167 int cmd, void __user *arg)6168 unsigned int cmd, void __user *arg)
6168{6169{
6169 BIG_IOCTL32_Command_struct __user *arg32 =6170 BIG_IOCTL32_Command_struct __user *arg32 =
6170 (BIG_IOCTL32_Command_struct __user *) arg;6171 (BIG_IOCTL32_Command_struct __user *) arg;
@@ -6201,7 +6202,8 @@ static int hpsa_ioctl32_big_passthru(struct scsi_device *dev, · 30 unmodified lines
6201 return err;6202 return err;
6202}6203}
6203 6204
6204static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd, void __user *arg)6205static int hpsa_compat_ioctl(struct scsi_device *dev, unsigned int cmd,
6206 void __user *arg)
6205{6207{
6206 switch (cmd) {6208 switch (cmd) {
6207 case CCISS_GETPCIINFO:6209 case CCISS_GETPCIINFO:
@@ -6521,7 +6523,8 @@ static void check_ioctl_unit_attention(struct ctlr_info *h, · 313 unmodified lines
6521/*6523/*
6522 * ioctl6524 * ioctl
6523 */6525 */
6524static int hpsa_ioctl(struct scsi_device *dev, int cmd, void __user *arg)6526static int hpsa_ioctl(struct scsi_device *dev, unsigned int cmd,
6527 void __user *arg)
6525{6528{
6526 struct ctlr_info *h;6529 struct ctlr_info *h;
6527 void __user *argp = (void __user *)arg;6530 void __user *argp = (void __user *)arg;
drivers/scsi/ipr.c+2−1
@@ -6696,7 +6696,8 @@ err_nodev: · 6695 unmodified lines
6696 * Return value:6696 * Return value:
6697 * 0 on success / other on failure6697 * 0 on success / other on failure
6698 **/6698 **/
6699static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)6699static int ipr_ioctl(struct scsi_device *sdev, unsigned int cmd,
6700 void __user *arg)
6700{6701{
6701 struct ipr_resource_entry *res;6702 struct ipr_resource_entry *res;
6702 6703
drivers/scsi/libsas/sas_scsi_host.c+1−1
@@ -799,7 +799,7 @@ out: · 798 unmodified lines
799 shost->host_failed, tries);799 shost->host_failed, tries);
800}800}
801 801
802int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)802int sas_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user *arg)
803{803{
804 struct domain_device *dev = sdev_to_domain_dev(sdev);804 struct domain_device *dev = sdev_to_domain_dev(sdev);
805 805
drivers/scsi/scsi_debug.c+2−1
@@ -832,7 +832,8 @@ static void mk_sense_invalid_opcode(struct scsi_cmnd *scp) · 831 unmodified lines
832 mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_OPCODE, 0);832 mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_OPCODE, 0);
833}833}
834 834
835static int scsi_debug_ioctl(struct scsi_device *dev, int cmd, void __user *arg)835static int scsi_debug_ioctl(struct scsi_device *dev, unsigned int cmd,
836 void __user *arg)
836{837{
837 if (sdebug_verbose) {838 if (sdebug_verbose) {
838 if (0x1261 == cmd)839 if (0x1261 == cmd)
drivers/scsi/smartpqi/smartpqi_init.c+2−1
@@ -6043,7 +6043,8 @@ out: · 6042 unmodified lines
6043 return rc;6043 return rc;
6044}6044}
6045 6045
6046static int pqi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)6046static int pqi_ioctl(struct scsi_device *sdev, unsigned int cmd,
6047 void __user *arg)
6047{6048{
6048 int rc;6049 int rc;
6049 struct pqi_ctrl_info *ctrl_info;6050 struct pqi_ctrl_info *ctrl_info;
include/linux/libata.h+3−2
@@ -1122,10 +1122,11 @@ extern int ata_host_activate(struct ata_host *host, int irq, · 1121 unmodified lines
1122extern void ata_host_detach(struct ata_host *host);1122extern void ata_host_detach(struct ata_host *host);
1123extern void ata_host_init(struct ata_host *, struct device *, struct ata_port_operations *);1123extern void ata_host_init(struct ata_host *, struct device *, struct ata_port_operations *);
1124extern int ata_scsi_detect(struct scsi_host_template *sht);1124extern int ata_scsi_detect(struct scsi_host_template *sht);
1125extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);1125extern int ata_scsi_ioctl(struct scsi_device *dev, unsigned int cmd,
1126 void __user *arg);
1126extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);1127extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);
1127extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,1128extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
1128 int cmd, void __user *arg);1129 unsigned int cmd, void __user *arg);
1129extern void ata_sas_port_destroy(struct ata_port *);1130extern void ata_sas_port_destroy(struct ata_port *);
1130extern struct ata_port *ata_sas_port_alloc(struct ata_host *,1131extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
1131 struct ata_port_info *, struct Scsi_Host *);1132 struct ata_port_info *, struct Scsi_Host *);
include/scsi/libsas.h+2−1
@@ -707,7 +707,8 @@ int sas_eh_target_reset_handler(struct scsi_cmnd *cmd); · 706 unmodified lines
707 707
708extern void sas_target_destroy(struct scsi_target *);708extern void sas_target_destroy(struct scsi_target *);
709extern int sas_slave_alloc(struct scsi_device *);709extern int sas_slave_alloc(struct scsi_device *);
710extern int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg);710extern int sas_ioctl(struct scsi_device *sdev, unsigned int cmd,
711 void __user *arg);
711extern int sas_drain_work(struct sas_ha_struct *ha);712extern int sas_drain_work(struct sas_ha_struct *ha);
712 713
713extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,714extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,
include/scsi/scsi_host.h+4−2
@@ -60,7 +60,8 @@ struct scsi_host_template { · 59 unmodified lines
60 *60 *
61 * Status: OPTIONAL61 * Status: OPTIONAL
62 */62 */
63 int (* ioctl)(struct scsi_device *dev, int cmd, void __user *arg);63 int (*ioctl)(struct scsi_device *dev, unsigned int cmd,
64 void __user *arg);
64 65
65 66
66#ifdef CONFIG_COMPAT67#ifdef CONFIG_COMPAT
@@ -70,7 +71,8 @@ struct scsi_host_template { · 3 unmodified lines
70 *71 *
71 * Status: OPTIONAL72 * Status: OPTIONAL
72 */73 */
73 int (* compat_ioctl)(struct scsi_device *dev, int cmd, void __user *arg);74 int (*compat_ioctl)(struct scsi_device *dev, unsigned int cmd,
75 void __user *arg);
74#endif76#endif
75 77
76 /*78 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t