[PATCH 57/69] staging: unisys: virthba: Fix open parenthesis alignment checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ken Depro <kenneth.depro@xxxxxxxxxx>

This patch fixes the "alignment should match open parenthesis" checks from the
checkpatch script.

Signed-off-by: Ken Depro <kenneth.depro@xxxxxxxxxx>
Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/virthba/virthba.c | 120 ++++++++++++++++---------------
 1 file changed, 61 insertions(+), 59 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 2a854b9..e99404a 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -109,9 +109,10 @@ static int virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state);
 static void doDiskAddRemove(struct work_struct *work);
 static void virthba_serverdown_complete(struct work_struct *work);
 static ssize_t info_debugfs_read(struct file *file, char __user *buf,
-			size_t len, loff_t *offset);
+				 size_t len, loff_t *offset);
 static ssize_t enable_ints_write(struct file *file,
-			const char __user *buffer, size_t count, loff_t *ppos);
+				 const char __user *buffer, size_t count,
+				 loff_t *ppos);
 
 /*****************************************************/
 /* Globals                                           */
@@ -261,7 +262,7 @@ add_scsipending_entry(struct virthba_info *vhbainfo, char cmdtype, void *new)
 		insert_location = (insert_location + 1) % MAX_PENDING_REQUESTS;
 		if (insert_location == (int)vhbainfo->nextinsert) {
 			pr_err("Queue should be full. insert_location<<%d>>  Unable to find open slot for pending commands.\n",
-			     insert_location);
+			       insert_location);
 			spin_unlock_irqrestore(&vhbainfo->privlock, flags);
 			return -1;
 		}
@@ -299,13 +300,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del)
 
 	if (del >= MAX_PENDING_REQUESTS) {
 		pr_err("Invalid queue position <<%lu>> given to delete. MAX_PENDING_REQUESTS <<%d>>\n",
-		     (unsigned long)del, MAX_PENDING_REQUESTS);
+		       (unsigned long)del, MAX_PENDING_REQUESTS);
 	} else {
 		spin_lock_irqsave(&vhbainfo->privlock, flags);
 
 		if (vhbainfo->pending[del].sent == NULL)
 			pr_err("Deleting already cleared queue entry at <<%lu>>.\n",
-			     (unsigned long)del);
+			       (unsigned long)del);
 
 		sent = vhbainfo->pending[del].sent;
 
@@ -355,8 +356,8 @@ SendDiskAddRemove(struct diskaddremove *dar)
 				    dar->lun);
 		if (error)
 			pr_err("Failed scsi_add_device: host_no=%d[chan=%d:id=%d:lun=%d]\n",
-			     dar->shost->host_no, dar->channel, dar->id,
-			     dar->lun);
+			       dar->shost->host_no, dar->channel, dar->id,
+			       dar->lun);
 	} else
 		pr_err("Failed scsi_device_lookup:[chan=%d:id=%d:lun=%d]\n",
 		       dar->channel, dar->id, dar->lun);
@@ -406,8 +407,8 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
 		QUEUE_DISKADDREMOVE(dar);
 	} else {
 		pr_err("kmalloc failed for dar. host_no=%d[chan=%d:id=%d:lun=%d]\n",
-		     shost->host_no, cmdrsp->disknotify.channel,
-		     cmdrsp->disknotify.id, cmdrsp->disknotify.lun);
+		       shost->host_no, cmdrsp->disknotify.channel,
+		       cmdrsp->disknotify.id, cmdrsp->disknotify.lun);
 	}
 }
 
@@ -465,7 +466,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 
 	pr_info("entering virthba_probe...\n");
 	pr_info("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
-	       virtpcidev->device_no);
+		virtpcidev->device_no);
 	POSTCODE_LINUX_2(VHBA_PROBE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 	/* call scsi_host_alloc to register a scsi host adapter
 	 * instance - this virthba that has just been created is an
@@ -486,7 +487,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		return -ENODEV;
 
 	pr_debug("scsihost: 0x%p, scsihost->this_id: %d, host_no: %d.\n",
-	       scsihost, scsihost->this_id, scsihost->host_no);
+		 scsihost, scsihost->this_id, scsihost->host_no);
 
 	scsihost->this_id = UIS_MAGIC_VHBA;
 	/* linux treats max-channel differently than max-id & max-lun.
@@ -496,11 +497,11 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	 * the max-channel value.
 	 */
 	pr_info("virtpcidev->scsi.max.max_channel=%u, max_id=%u, max_lun=%u, cmd_per_lun=%u, max_io_size=%u\n",
-	     (unsigned)virtpcidev->scsi.max.max_channel - 1,
-	     (unsigned)virtpcidev->scsi.max.max_id,
-	     (unsigned)virtpcidev->scsi.max.max_lun,
-	     (unsigned)virtpcidev->scsi.max.cmd_per_lun,
-	     (unsigned)virtpcidev->scsi.max.max_io_size);
+		(unsigned)virtpcidev->scsi.max.max_channel - 1,
+		(unsigned)virtpcidev->scsi.max.max_id,
+		(unsigned)virtpcidev->scsi.max.max_lun,
+		(unsigned)virtpcidev->scsi.max.cmd_per_lun,
+		(unsigned)virtpcidev->scsi.max.max_io_size);
 	scsihost->max_channel = (unsigned)virtpcidev->scsi.max.max_channel;
 	scsihost->max_id = (unsigned)virtpcidev->scsi.max.max_id;
 	scsihost->max_lun = (unsigned)virtpcidev->scsi.max.max_lun;
@@ -512,12 +513,12 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	if (scsihost->sg_tablesize > MAX_PHYS_INFO)
 		scsihost->sg_tablesize = MAX_PHYS_INFO;
 	pr_info("scsihost->max_channel=%u, max_id=%u, max_lun=%llu, cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
-	     scsihost->max_channel, scsihost->max_id, scsihost->max_lun,
-	     scsihost->cmd_per_lun, scsihost->max_sectors,
-	     scsihost->sg_tablesize);
+		scsihost->max_channel, scsihost->max_id, scsihost->max_lun,
+		scsihost->cmd_per_lun, scsihost->max_sectors,
+		scsihost->sg_tablesize);
 	pr_info("scsihost->can_queue=%u, scsihost->cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
-	     scsihost->can_queue, scsihost->cmd_per_lun, scsihost->max_sectors,
-	     scsihost->sg_tablesize);
+		scsihost->can_queue, scsihost->cmd_per_lun,
+		scsihost->max_sectors, scsihost->sg_tablesize);
 
 	pr_debug("calling scsi_add_host\n");
 
@@ -553,7 +554,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	spin_lock_init(&virthbainfo->chinfo.insertlock);
 
 	pr_debug("generic_dev: 0x%p, queueinfo: 0x%p.\n",
-	       &virtpcidev->generic_dev, &virtpcidev->queueinfo);
+		 &virtpcidev->generic_dev, &virtpcidev->queueinfo);
 
 	init_waitqueue_head(&virthbainfo->rsp_queue);
 	spin_lock_init(&virthbainfo->privlock);
@@ -577,7 +578,8 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	       &virthbainfo->chinfo.queueinfo->chan->features);
 	/* start thread that will receive scsicmnd responses */
 	pr_debug("starting rsp thread -- queueinfo: 0x%p, threadinfo: 0x%p.\n",
-	       virthbainfo->chinfo.queueinfo, &virthbainfo->chinfo.threadinfo);
+		 virthbainfo->chinfo.queueinfo,
+		 &virthbainfo->chinfo.threadinfo);
 
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
 	pqhdr = (struct signal_queue_header __iomem *)
@@ -597,13 +599,13 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		return -ENODEV;
 	}
 	pr_info("sendInterruptHandle=0x%16llX",
-	       virthbainfo->intr.send_irq_handle);
+		virthbainfo->intr.send_irq_handle);
 	pr_info("recvInterruptHandle=0x%16llX",
-	       virthbainfo->intr.recv_irq_handle);
+		virthbainfo->intr.recv_irq_handle);
 	pr_info("recvInterruptVector=0x%8X",
-	       virthbainfo->intr.recv_irq_vector);
+		virthbainfo->intr.recv_irq_vector);
 	pr_info("recvInterruptShared=0x%2X",
-	       virthbainfo->intr.recv_irq_shared);
+		virthbainfo->intr.recv_irq_shared);
 	pr_info("scsihost.hostt->name=%s", scsihost->hostt->name);
 	virthbainfo->interrupt_vector =
 	    virthbainfo->intr.recv_irq_handle & INTERRUPT_VECTOR_MASK;
@@ -644,15 +646,15 @@ virthba_remove(struct virtpci_dev *virtpcidev)
 	    (struct Scsi_Host *)virtpcidev->scsi.scsihost;
 
 	pr_info("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
-	       virtpcidev->device_no);
+		virtpcidev->device_no);
 	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	if (virthbainfo->interrupt_vector != -1)
 		free_irq(virthbainfo->interrupt_vector, virthbainfo);
 	pr_info("Removing virtpcidev: 0x%p, virthbainfo: 0x%p\n", virtpcidev,
-	       virthbainfo);
+		virthbainfo);
 
 	pr_debug("removing scsihost: 0x%p, scsihost->this_id: %d\n", scsihost,
-	       scsihost->this_id);
+		 scsihost->this_id);
 	scsi_remove_host(scsihost);
 
 	pr_debug("stopping thread.\n");
@@ -679,7 +681,7 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 	wait_queue_head_t notifyevent;
 
 	pr_info("vDiskMgmt:%d %d:%d:%d\n", vdiskcmdtype,
-	       vdest->channel, vdest->id, vdest->lun);
+		vdest->channel, vdest->id, vdest->lun);
 
 	if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
 		pr_debug("Server is down/changing state. Returning Failure.\n");
@@ -718,7 +720,7 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 					     DONT_ISSUE_INTERRUPT, (u64)NULL,
 					     OK_TO_WAIT, "vhba");
 	pr_info("VdiskMgmt waiting on event notifyevent=0x%p\n",
-	       cmdrsp->scsitaskmgmt.notify);
+		cmdrsp->scsitaskmgmt.notify);
 	wait_event(notifyevent, notifyresult != 0xffff);
 	pr_info("VdiskMgmt complete; result:%d\n", cmdrsp->vdiskmgmt.result);
 	kfree(cmdrsp);
@@ -740,7 +742,7 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 	wait_queue_head_t notifyevent;
 
 	pr_info("TaskMgmt:%d %d:%d:%llu\n", tasktype,
-	       scsidev->channel, scsidev->id, scsidev->lun);
+		scsidev->channel, scsidev->id, scsidev->lun);
 
 	if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
 		pr_debug("Server is down/changing state. Returning Failure.\n");
@@ -778,7 +780,7 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 					     DONT_ISSUE_INTERRUPT, (u64)NULL,
 					     OK_TO_WAIT, "vhba");
 	pr_info("TaskMgmt waiting on event notifyevent=0x%p\n",
-	       cmdrsp->scsitaskmgmt.notify);
+		cmdrsp->scsitaskmgmt.notify);
 	wait_event(notifyevent, notifyresult != 0xffff);
 	pr_info("TaskMgmt complete; result:%d\n", cmdrsp->scsitaskmgmt.result);
 	kfree(cmdrsp);
@@ -972,7 +974,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 			BUG_ON(scsi_sg_count(scsicmd) == 0);
 		}
 		pr_debug("No sg; buffer:0x%p bufflen:%d\n",
-		       scsi_sglist(scsicmd), scsi_bufflen(scsicmd));
+			 scsi_sglist(scsicmd), scsi_bufflen(scsicmd));
 	} else {
 		/* buffer is scatterlist - copy it out */
 		sgl = scsi_sglist(scsicmd);
@@ -983,17 +985,17 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 			cmdrsp->scsi.gpi_list[i].length = sg->length;
 			if ((i != 0) && (sg->offset != 0))
 				pr_info("Offset on a sg_entry other than zero =<<%d>>.\n",
-				     sg->offset);
+					sg->offset);
 		}
 
 		if (sg_failed) {
 			pr_err("Start sg_list dump (entries %d, bufflen %d)...\n",
-			     scsi_sg_count(scsicmd), cmdrsp->scsi.bufflen);
+			       scsi_sg_count(scsicmd), cmdrsp->scsi.bufflen);
 			for_each_sg(sgl, sg, scsi_sg_count(scsicmd), i) {
 				pr_err("   Entry(%d): page->[0x%p], phys->[0x%Lx], off(%d), len(%d)\n",
-				     i, sg_page(sg),
-				     (unsigned long long)sg_phys(sg),
-				     sg->offset, sg->length);
+				       i, sg_page(sg),
+				       (unsigned long long)sg_phys(sg),
+				       sg->offset, sg->length);
 			}
 			pr_err("Done sg_list dump.\n");
 			/* BUG(); ***** For now, let it fail in uissd
@@ -1135,8 +1137,8 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 			if (atomic_read(&vdisk->error_count) ==
 			    VIRTHBA_ERROR_COUNT) {
 				pr_err("Throtling SCSICMD errors disk <%d:%d:%d:%llu>\n",
-				     scsidev->host->host_no, scsidev->id,
-				     scsidev->channel, scsidev->lun);
+				       scsidev->host->host_no, scsidev->id,
+				       scsidev->channel, scsidev->lun);
 			}
 			atomic_set(&vdisk->ios_threshold, IOS_ERROR_THRESHOLD);
 		}
@@ -1185,7 +1187,7 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 		sg = scsi_sglist(scsicmd);
 		for (i = 0; i < scsi_sg_count(scsicmd); i++) {
 			pr_debug("copying OUT OF buf into 0x%p %d\n",
-			     sg_page(sg + i), sg[i].length);
+				 sg_page(sg + i), sg[i].length);
 			thispage_orig = kmap_atomic(sg_page(sg + i));
 			thispage = (void *)((unsigned long)thispage_orig |
 					     sg[i].offset);
@@ -1255,7 +1257,7 @@ complete_taskmgmt_command(struct uiscmdrsp *cmdrsp)
 
 static void
 drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
-		struct uiscmdrsp *cmdrsp)
+	    struct uiscmdrsp *cmdrsp)
 {
 	unsigned long flags;
 	int qrslt = 0;
@@ -1265,7 +1267,7 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 	while (1) {
 		spin_lock_irqsave(&virthbainfo->chinfo.insertlock, flags);
 		if (!spar_channel_client_acquire_os(dc->queueinfo->chan,
-						     "vhba")) {
+						    "vhba")) {
 			spin_unlock_irqrestore(&virthbainfo->chinfo.insertlock,
 					       flags);
 			virthbainfo->acquire_failed_cnt++;
@@ -1334,7 +1336,7 @@ process_incoming_rsps(void *v)
 	while (1) {
 		wait_event_interruptible_timeout(virthbainfo->rsp_queue,
 			 (atomic_read(&virthbainfo->interrupt_rcvd) == 1),
-					 usecs_to_jiffies(rsltq_wait_usecs));
+				      usecs_to_jiffies(rsltq_wait_usecs));
 		atomic_set(&virthbainfo->interrupt_rcvd, 0);
 		/* drain queue */
 		drain_queue(virthbainfo, dc, cmdrsp);
@@ -1354,7 +1356,7 @@ process_incoming_rsps(void *v)
 /*****************************************************/
 
 static ssize_t info_debugfs_read(struct file *file,
-			char __user *buf, size_t len, loff_t *offset)
+				 char __user *buf, size_t len, loff_t *offset)
 {
 	ssize_t bytes_read = 0;
 	int str_pos = 0;
@@ -1405,8 +1407,8 @@ static ssize_t info_debugfs_read(struct file *file,
 	return bytes_read;
 }
 
-static ssize_t enable_ints_write(struct file *file,
-			const char __user *buffer, size_t count, loff_t *ppos)
+static ssize_t enable_ints_write(struct file *file, const char __user *buffer,
+				 size_t count, loff_t *ppos)
 {
 	char buf[4];
 	int i, new_value;
@@ -1468,7 +1470,7 @@ virthba_serverup(struct virtpci_dev *virtpcidev)
 				     scsihost)->hostdata;
 
 	pr_debug("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
-	       virtpcidev->device_no);
+		 virtpcidev->device_no);
 
 	if (!virthbainfo->serverdown) {
 		pr_debug("Server up message received while server is already up.\n");
@@ -1533,7 +1535,7 @@ virthba_serverdown_complete(struct work_struct *work)
 		case CMD_SCSITASKMGMT_TYPE:
 			cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
 			pr_debug("cmdrsp=0x%p, notify=0x%p\n", cmdrsp,
-			       cmdrsp->scsitaskmgmt.notify);
+				 cmdrsp->scsitaskmgmt.notify);
 			*(int *)cmdrsp->scsitaskmgmt.notifyresult =
 			    TASK_MGMT_FAILED;
 			wake_up_all((wait_queue_head_t *)
@@ -1549,7 +1551,7 @@ virthba_serverdown_complete(struct work_struct *work)
 		default:
 			if (pendingdel->sent != NULL)
 				pr_err("Unknown command type: 0x%x.  Only freeing list structure.\n",
-				     pendingdel->cmdtype);
+				       pendingdel->cmdtype);
 		}
 		pendingdel->cmdtype = 0;
 		pendingdel->sent = NULL;
@@ -1559,7 +1561,7 @@ virthba_serverdown_complete(struct work_struct *work)
 	virtpcidev = virthbainfo->virtpcidev;
 
 	pr_debug("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
-	       virtpcidev->device_no);
+		 virtpcidev->device_no);
 	virthbainfo->serverdown = true;
 	virthbainfo->serverchangingstate = false;
 	/* Return the ServerDown response to Command */
@@ -1577,7 +1579,7 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 
 	pr_debug("virthba_serverdown");
 	pr_debug("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
-	       virtpcidev->device_no);
+		 virtpcidev->device_no);
 
 	if (!virthbainfo->serverdown && !virthbainfo->serverchangingstate) {
 		virthbainfo->serverchangingstate = true;
@@ -1646,13 +1648,13 @@ virthba_mod_init(void)
 		/* create the debugfs directories and entries */
 		virthba_debugfs_dir = debugfs_create_dir("virthba", NULL);
 		debugfs_create_file("info", S_IRUSR, virthba_debugfs_dir,
-				NULL, &debugfs_info_fops);
+				    NULL, &debugfs_info_fops);
 		debugfs_create_u32("rqwait_usecs", S_IRUSR | S_IWUSR,
-				virthba_debugfs_dir, &rsltq_wait_usecs);
+				   virthba_debugfs_dir, &rsltq_wait_usecs);
 		debugfs_create_file("enable_ints", S_IWUSR,
-				virthba_debugfs_dir, NULL,
-				&debugfs_enable_ints_fops);
-		/* Initialize DARWorkQ */
+				    virthba_debugfs_dir, NULL,
+				    &debugfs_enable_ints_fops);
+		/* Initialize dar_work_queue */
 		INIT_WORK(&DARWorkQ, doDiskAddRemove);
 		spin_lock_init(&DARWorkQLock);
 
-- 
2.1.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux