aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorhba
diff options
context:
space:
mode:
authorSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>2017-06-30 15:43:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-16 08:40:59 +0200
commit781facd05eb9641bf49a0e0342c13102404a9fed (patch)
treed538d857f4bf7ef71cccad8a17741713e9be4e54 /drivers/staging/unisys/visorhba
parentstaging: unisys: visornic: visornic_main.c: fixed comment formatting issues (diff)
downloadlinux-dev-781facd05eb9641bf49a0e0342c13102404a9fed.tar.xz
linux-dev-781facd05eb9641bf49a0e0342c13102404a9fed.zip
staging: unisys: visorhba: visorhba_main.c: fixed comment formatting issues
Removed comments from the right side of the lines. Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorhba')
-rw-r--r--drivers/staging/unisys/visorhba/visorhba_main.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index a6e7a6bbc428..1ab4b8568ee6 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -48,7 +48,8 @@ MODULE_ALIAS("visorbus:" VISOR_VHBA_CHANNEL_UUID_STR);
struct visordisk_info {
u32 valid;
- u32 channel, id, lun; /* Disk Path */
+ /* Disk Path */
+ u32 channel, id, lun;
atomic_t ios_threshold;
atomic_t error_count;
struct visordisk_info *next;
@@ -56,8 +57,10 @@ struct visordisk_info {
struct scsipending {
struct uiscmdrsp cmdrsp;
- void *sent; /* The Data being tracked */
- char cmdtype; /* Type of pointer that is being stored */
+ /* The Data being tracked */
+ void *sent;
+ /* Type of pointer that is being stored */
+ char cmdtype;
};
/* Each scsi_host has a host_data area that contains this struct. */
@@ -71,7 +74,8 @@ struct visorhba_devdata {
struct scsipending pending[MAX_PENDING_REQUESTS];
/* Start search for next pending free slot here */
unsigned int nextinsert;
- spinlock_t privlock; /* lock to protect data in devdata */
+ /* lock to protect data in devdata */
+ spinlock_t privlock;
bool serverdown;
bool serverchangingstate;
unsigned long long acquire_failed_cnt;
@@ -136,8 +140,9 @@ static struct task_struct *visor_thread_start
*/
static void visor_thread_stop(struct task_struct *task)
{
+ /* no thread running */
if (!task)
- return; /* no thread running */
+ return;
kthread_stop(task);
}
@@ -176,7 +181,8 @@ static int add_scsipending_entry(struct visorhba_devdata *devdata,
entry->cmdtype = cmdtype;
if (new)
entry->sent = new;
- else /* wants to send cmdrsp */
+ /* wants to send cmdrsp */
+ else
entry->sent = &entry->cmdrsp;
devdata->nextinsert = (insert_location + 1) % MAX_PENDING_REQUESTS;
spin_unlock_irqrestore(&devdata->privlock, flags);
@@ -249,9 +255,11 @@ static unsigned int simple_idr_get(struct idr *idrtable, void *p,
id = idr_alloc(idrtable, p, 1, INT_MAX, GFP_NOWAIT);
spin_unlock_irqrestore(lock, flags);
idr_preload_end();
+ /* failure */
if (id < 0)
- return 0; /* failure */
- return (unsigned int)(id); /* idr_alloc() guarantees > 0 */
+ return 0;
+ /* idr_alloc() guarantees > 0 */
+ return (unsigned int)(id);
}
/*
@@ -573,12 +581,14 @@ static int visorhba_slave_alloc(struct scsi_device *scsidev)
struct visorhba_devdata *devdata;
struct Scsi_Host *scsihost = (struct Scsi_Host *)scsidev->host;
+ /* even though we errored, treat as success */
devdata = (struct visorhba_devdata *)scsihost->hostdata;
if (!devdata)
- return 0; /* even though we errored, treat as success */
+ return 0;
+ /* already allocated return success */
for_each_vdisk_match(vdisk, devdata, scsidev)
- return 0; /* already allocated return success */
+ return 0;
tmpvdisk = kzalloc(sizeof(*tmpvdisk), GFP_ATOMIC);
if (!tmpvdisk)
@@ -930,10 +940,11 @@ drain_queue(struct uiscmdrsp *cmdrsp, struct visorhba_devdata *devdata)
struct scsi_cmnd *scsicmd;
while (1) {
+ /* queue empty */
if (visorchannel_signalremove(devdata->dev->visorchannel,
IOCHAN_FROM_IOPART,
cmdrsp))
- break; /* queue empty */
+ break;
if (cmdrsp->cmdtype == CMD_SCSI_TYPE) {
/* scsicmd location is returned by the