]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/s390/scsi/zfcp_scsi.c
[SCSI] zfcp: whitespace cleanup
[mirror_ubuntu-bionic-kernel.git] / drivers / s390 / scsi / zfcp_scsi.c
index 0acf6db0a08d7ff3a60d13dc4cccec0e189ae0da..abae2027f7e598c9b6c6249f6064889af140afa1 100644 (file)
@@ -1,22 +1,22 @@
-/* 
+/*
  * This file is part of the zfcp device driver for
  * FCP adapters for IBM System z9 and zSeries.
  *
  * (C) Copyright IBM Corp. 2002, 2006
- * 
- * This program is free software; you can redistribute it and/or modify 
- * it under the terms of the GNU General Public License as published by 
- * the Free Software Foundation; either version 2, or (at your option) 
- * any later version. 
- * 
- * This program is distributed in the hope that it will be useful, 
- * but WITHOUT ANY WARRANTY; without even the implied warranty of 
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
- * GNU General Public License for more details. 
- * 
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 #define ZFCP_LOG_AREA                  ZFCP_LOG_AREA_SCSI
@@ -101,7 +101,7 @@ zfcp_get_fcp_dl_ptr(struct fcp_cmnd_iu * fcp_cmd)
                ((unsigned char *) fcp_cmd +
                 sizeof (struct fcp_cmnd_iu) + additional_length);
        /*
-        * fcp_dl_addr = start address of fcp_cmnd structure + 
+        * fcp_dl_addr = start address of fcp_cmnd structure +
         * size of fixed part + size of dynamically sized add_dcp_cdb field
         * SEE FCP-2 documentation
         */
@@ -189,13 +189,12 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
                unit->device = NULL;
                zfcp_erp_unit_failed(unit);
                zfcp_unit_put(unit);
-       } else {
+       } else
                ZFCP_LOG_NORMAL("bug: no unit associated with SCSI device at "
                                "address %p\n", sdpnt);
-       }
 }
 
-/* 
+/*
  * called from scsi midlayer to allow finetuning of a device.
  */
 static int
@@ -361,12 +360,11 @@ zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, unsigned int id,
        list_for_each_entry(port, &adapter->port_list_head, list) {
                if (!port->rport || (id != port->rport->scsi_target_id))
                        continue;
-               list_for_each_entry(unit, &port->unit_list_head, list) {
+               list_for_each_entry(unit, &port->unit_list_head, list)
                        if (lun == unit->scsi_lun) {
                                retval = unit;
                                goto out;
                        }
-               }
        }
  out:
        return retval;
@@ -374,7 +372,7 @@ zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, unsigned int id,
 
 /**
  * zfcp_scsi_eh_abort_handler - abort the specified SCSI command
- * @scpnt: pointer to scsi_cmnd to be aborted 
+ * @scpnt: pointer to scsi_cmnd to be aborted
  * Return: SUCCESS - command has been aborted and cleaned up in internal
  *          bookkeeping, SCSI stack won't be called for aborted command
  *         FAILED - otherwise
@@ -733,7 +731,7 @@ zfcp_get_fc_host_stats(struct Scsi_Host *shost)
        if (!data)
                return NULL;
 
-       ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
+       ret = zfcp_fsf_exchange_port_data_sync(adapter, data);
        if (ret) {
                kfree(data);
                return NULL; /* XXX return zeroed fc_stats? */
@@ -763,8 +761,10 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost)
        if (!data)
                return;
 
-       ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
-       if (ret == 0) {
+       ret = zfcp_fsf_exchange_port_data_sync(adapter, data);
+       if (ret) {
+               kfree(data);
+       } else {
                adapter->stats_reset = jiffies/HZ;
                old_data = adapter->stats_reset_data;
                adapter->stats_reset_data = data; /* finally freed in
@@ -800,6 +800,7 @@ struct fc_function_template zfcp_transport_functions = {
        .show_host_port_type = 1,
        .show_host_speed = 1,
        .show_host_port_id = 1,
+       .disable_target_scan = 1,
 };
 
 /**