Author: mav
Date: Wed Oct  9 19:19:53 2013
New Revision: 256222
URL: http://svnweb.freebsd.org/changeset/base/256222

Log:
  MFC r253987 (by trasz):
  Remove dead code.

Modified:
  stable/9/sys/cam/ctl/ctl.c
  stable/9/sys/cam/ctl/ctl_frontend_internal.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cam/ctl/ctl.c
==============================================================================
--- stable/9/sys/cam/ctl/ctl.c  Wed Oct  9 19:18:35 2013        (r256221)
+++ stable/9/sys/cam/ctl/ctl.c  Wed Oct  9 19:19:53 2013        (r256222)
@@ -8950,17 +8950,7 @@ ctl_inquiry_evpd_supported(struct ctl_sc
 
        sup_page_size = sizeof(struct scsi_vpd_supported_pages) +
                SCSI_EVPD_NUM_SUPPORTED_PAGES;
-       /*
-        * XXX KDM GFP_???  We probably don't want to wait here,
-        * unless we end up having a process/thread context.
-        */
        ctsio->kern_data_ptr = malloc(sup_page_size, M_CTL, M_WAITOK | M_ZERO);
-       if (ctsio->kern_data_ptr == NULL) {
-               ctsio->io_hdr.status = CTL_SCSI_ERROR;
-               ctsio->scsi_status = SCSI_STATUS_BUSY;
-               ctl_done((union ctl_io *)ctsio);
-               return (CTL_RETVAL_COMPLETE);
-       }
        pages = (struct scsi_vpd_supported_pages *)ctsio->kern_data_ptr;
        ctsio->kern_sg_entries = 0;
 
@@ -9015,14 +9005,7 @@ ctl_inquiry_evpd_serial(struct ctl_scsii
 
        lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
 
-       /* XXX KDM which malloc flags here?? */
        ctsio->kern_data_ptr = malloc(sizeof(*sn_ptr), M_CTL, M_WAITOK | 
M_ZERO);
-       if (ctsio->kern_data_ptr == NULL) {
-               ctsio->io_hdr.status = CTL_SCSI_ERROR;
-               ctsio->scsi_status = SCSI_STATUS_BUSY;
-               ctl_done((union ctl_io *)ctsio);
-               return (CTL_RETVAL_COMPLETE);
-       }
        sn_ptr = (struct scsi_vpd_unit_serial_number *)ctsio->kern_data_ptr;
        ctsio->kern_sg_entries = 0;
 
@@ -9107,14 +9090,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio
                sizeof(struct scsi_vpd_id_descriptor) +
                sizeof(struct scsi_vpd_id_trgt_port_grp_id);
 
-       /* XXX KDM which malloc flags here ?? */
        ctsio->kern_data_ptr = malloc(devid_len, M_CTL, M_WAITOK | M_ZERO);
-       if (ctsio->kern_data_ptr == NULL) {
-               ctsio->io_hdr.status = CTL_SCSI_ERROR;
-               ctsio->scsi_status = SCSI_STATUS_BUSY;
-               ctl_done((union ctl_io *)ctsio);
-               return (CTL_RETVAL_COMPLETE);
-       }
        devid_ptr = (struct scsi_vpd_device_id *)ctsio->kern_data_ptr;
        ctsio->kern_sg_entries = 0;
 
@@ -9337,14 +9313,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio
         * in.  If the user only asks for less, we'll give him
         * that much.
         */
-       /* XXX KDM what malloc flags should we use here?? */
        ctsio->kern_data_ptr = malloc(sizeof(*inq_ptr), M_CTL, M_WAITOK | 
M_ZERO);
-       if (ctsio->kern_data_ptr == NULL) {
-               ctsio->io_hdr.status = CTL_SCSI_ERROR;
-               ctsio->scsi_status = SCSI_STATUS_BUSY;
-               ctl_done((union ctl_io *)ctsio);
-               return (CTL_RETVAL_COMPLETE);
-       }
        inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr;
        ctsio->kern_sg_entries = 0;
        ctsio->kern_data_resid = 0;

Modified: stable/9/sys/cam/ctl/ctl_frontend_internal.c
==============================================================================
--- stable/9/sys/cam/ctl/ctl_frontend_internal.c        Wed Oct  9 19:18:35 
2013        (r256221)
+++ stable/9/sys/cam/ctl/ctl_frontend_internal.c        Wed Oct  9 19:19:53 
2013        (r256222)
@@ -495,9 +495,6 @@ cfi_lun_disable(void *arg, struct ctl_id
        return (0);
 }
 
-/*
- * XXX KDM run this inside a thread, or inside the caller's context?
- */
 static void
 cfi_datamove(union ctl_io *io)
 {
@@ -537,18 +534,8 @@ cfi_datamove(union ctl_io *io)
 
                ext_sglen = ctsio->ext_sg_entries * sizeof(*ext_sglist);
 
-               /*
-                * XXX KDM GFP_KERNEL, don't know what the caller's context
-                * is.  Need to figure that out.
-                */
                ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL_CFI,
                                                           M_WAITOK);
-               if (ext_sglist == NULL) {
-                       ctl_set_internal_failure(ctsio,
-                                                /*sks_valid*/ 0,
-                                                /*retry_count*/ 0);
-                       return;
-               }
                ext_sglist_malloced = 1;
                if (memcpy(ext_sglist, ctsio->ext_data_ptr, ext_sglen) != 0) {
                        ctl_set_internal_failure(ctsio,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to