All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] staging: unisys: fix blank lines virthba
@ 2014-10-22 21:52 Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 02/10] staging: unisys: virthba fix all spaces after cast Erik Arfvidson
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

This patch removes unnecessary blanks lines and adds necessary blank lines in virthba.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index e4130c9..e8868ae2 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -101,7 +101,6 @@ static DEF_SCSI_QCMD(virthba_queue_command)
 #define virthba_queue_command virthba_queue_command_lck
 #endif
 
-
 static int virthba_slave_alloc(struct scsi_device *scsidev);
 static int virthba_slave_configure(struct scsi_device *scsidev);
 static void virthba_slave_destroy(struct scsi_device *scsidev);
@@ -166,6 +165,7 @@ struct virtdisk_info {
 	atomic_t error_count;
 	struct virtdisk_info *next;
 };
+
 /* Each Scsi_Host has a host_data area that contains this struct. */
 struct virthba_info {
 	struct Scsi_Host *scsihost;
@@ -420,7 +420,9 @@ static irqreturn_t
 virthba_ISR(int irq, void *dev_id)
 {
 	struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
+
 	CHANNEL_HEADER __iomem *pChannelHeader;
+
 	SIGNAL_QUEUE_HEADER __iomem *pqhdr;
 	u64 mask;
 	unsigned long long rc1;
@@ -989,7 +991,6 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 		sgl = scsi_sglist(scsicmd);
 
 		for_each_sg(sgl, sg, scsi_sg_count(scsicmd), i) {
-
 			cmdrsp->scsi.gpi_list[i].address = sg_phys(sg);
 			cmdrsp->scsi.gpi_list[i].length = sg->length;
 			if ((i != 0) && (sg->offset != 0))
@@ -1207,7 +1208,6 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 			bufind += sg[i].length;
 		}
 	} else {
-
 		vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 		for ( ; vdisk->next; vdisk = vdisk->next) {
 			if ((scsidev->channel != vdisk->channel)
@@ -1323,7 +1323,6 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 	}
 }
 
-
 /* main function for the thread that waits for scsi commands to arrive
  * in a specified queue
  */
@@ -1657,7 +1656,6 @@ virthba_mod_init(void)
 		POSTCODE_LINUX_3(VHBA_CREATE_FAILURE_PC, error,
 				 POSTCODE_SEVERITY_ERR);
 	} else {
-
 		/* create the debugfs directories and entries */
 		virthba_debugfs_dir = debugfs_create_dir("virthba", NULL);
 		debugfs_create_file("info", S_IRUSR, virthba_debugfs_dir,
@@ -1748,7 +1746,6 @@ virthba_mod_exit(void)
 
 	debugfs_remove_recursive(virthba_debugfs_dir);
 	LOGINF("Leaving virthba_mod_exit\n");
-
 }
 
 /* specify function to be run at module insertion time */
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 02/10] staging: unisys: virthba fix all spaces after cast
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 03/10] staging: unisys: virthba fix all alingment issues Erik Arfvidson
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

This patch fixes all spaces after cast for virthba

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 130 +++++++++++++++----------------
 1 file changed, 65 insertions(+), 65 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index e8868ae2..35e17ee 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -261,7 +261,7 @@ add_scsipending_entry(struct virthba_info *vhbainfo, char cmdtype, void *new)
 	insert_location = vhbainfo->nextinsert;
 	while (vhbainfo->pending[insert_location].sent != NULL) {
 		insert_location = (insert_location + 1) % MAX_PENDING_REQUESTS;
-		if (insert_location == (int) vhbainfo->nextinsert) {
+		if (insert_location == (int)vhbainfo->nextinsert) {
 			LOGERR("Queue should be full. insert_location<<%d>>  Unable to find open slot for pending commands.\n",
 			     insert_location);
 			spin_unlock_irqrestore(&vhbainfo->privlock, flags);
@@ -290,7 +290,7 @@ add_scsipending_entry_with_wait(struct virthba_info *vhbainfo, char cmdtype,
 		insert_location = add_scsipending_entry(vhbainfo, cmdtype, new);
 	}
 
-	return (unsigned int) insert_location;
+	return (unsigned int)insert_location;
 }
 
 static void *
@@ -301,13 +301,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del)
 
 	if (del >= MAX_PENDING_REQUESTS) {
 		LOGERR("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)
 			LOGERR("Deleting already cleared queue entry at <<%lu>>.\n",
-			     (unsigned long) del);
+			     (unsigned long)del);
 
 		sent = vhbainfo->pending[del].sent;
 
@@ -419,7 +419,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
 static irqreturn_t
 virthba_ISR(int irq, void *dev_id)
 {
-	struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
+	struct virthba_info *virthbainfo = (struct virthba_info *)dev_id;
 
 	CHANNEL_HEADER __iomem *pChannelHeader;
 
@@ -445,7 +445,7 @@ virthba_ISR(int irq, void *dev_id)
 		return IRQ_NONE;
 	}
 	pqhdr = (SIGNAL_QUEUE_HEADER __iomem *)
-		((char __iomem *) pChannelHeader +
+		((char __iomem *)pChannelHeader +
 		 readq(&pChannelHeader->oChannelSpace)) + IOCHAN_FROM_IOPART;
 	writeq(readq(&pqhdr->NumInterruptsReceived) + 1,
 	       &pqhdr->NumInterruptsReceived);
@@ -504,19 +504,19 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	 * the max-channel value.
 	 */
 	LOGINF("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);
-	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;
-	scsihost->cmd_per_lun = (unsigned) virtpcidev->scsi.max.cmd_per_lun;
+	     (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;
+	scsihost->cmd_per_lun = (unsigned)virtpcidev->scsi.max.cmd_per_lun;
 	scsihost->max_sectors =
-	    (unsigned short) (virtpcidev->scsi.max.max_io_size >> 9);
+	    (unsigned short)(virtpcidev->scsi.max.max_io_size >> 9);
 	scsihost->sg_tablesize =
-	    (unsigned short) (virtpcidev->scsi.max.max_io_size / PAGE_SIZE);
+	    (unsigned short)(virtpcidev->scsi.max.max_io_size / PAGE_SIZE);
 	if (scsihost->sg_tablesize > MAX_PHYS_INFO)
 		scsihost->sg_tablesize = MAX_PHYS_INFO;
 	LOGINF("scsihost->max_channel=%u, max_id=%u, max_lun=%llu, cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
@@ -547,7 +547,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		return -ENODEV;
 	}
 
-	virthbainfo = (struct virthba_info *) scsihost->hostdata;
+	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	memset(virthbainfo, 0, sizeof(struct virthba_info));
 	for (i = 0; i < VIRTHBASOPENMAX; i++) {
 		if (VirtHbasOpen[i].virthbainfo == NULL) {
@@ -649,11 +649,11 @@ virthba_remove(struct virtpci_dev *virtpcidev)
 {
 	struct virthba_info *virthbainfo;
 	struct Scsi_Host *scsihost =
-	    (struct Scsi_Host *) virtpcidev->scsi.scsihost;
+	    (struct Scsi_Host *)virtpcidev->scsi.scsihost;
 
 	LOGINF("virtpcidev busNo<<%d>>devNo<<%d>>", virtpcidev->busNo,
 	       virtpcidev->deviceNo);
-	virthbainfo = (struct virthba_info *) scsihost->hostdata;
+	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	if (virthbainfo->interrupt_vector != -1)
 		free_irq(virthbainfo->interrupt_vector, virthbainfo);
 	LOGINF("Removing virtpcidev: 0x%p, virthbainfo: 0x%p\n", virtpcidev,
@@ -682,7 +682,7 @@ forward_vdiskmgmt_command(VDISK_MGMT_TYPES vdiskcmdtype,
 {
 	struct uiscmdrsp *cmdrsp;
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) scsihost->hostdata;
+	    (struct virthba_info *)scsihost->hostdata;
 	int notifyresult = 0xffff;
 	wait_queue_head_t notifyevent;
 
@@ -709,8 +709,8 @@ forward_vdiskmgmt_command(VDISK_MGMT_TYPES vdiskcmdtype,
 	/* specify the event that has to be triggered when this cmd is
 	 * complete
 	 */
-	cmdrsp->vdiskmgmt.notify = (void *) &notifyevent;
-	cmdrsp->vdiskmgmt.notifyresult = (void *) &notifyresult;
+	cmdrsp->vdiskmgmt.notify = (void *)&notifyevent;
+	cmdrsp->vdiskmgmt.notifyresult = (void *)&notifyresult;
 
 	/* save destination */
 	cmdrsp->vdiskmgmt.vdisktype = vdiskcmdtype;
@@ -718,14 +718,14 @@ forward_vdiskmgmt_command(VDISK_MGMT_TYPES vdiskcmdtype,
 	cmdrsp->vdiskmgmt.vdest.id = vdest->id;
 	cmdrsp->vdiskmgmt.vdest.lun = vdest->lun;
 	cmdrsp->vdiskmgmt.scsicmd =
-	    (void *) (uintptr_t)
+	    (void *)(uintptr_t)
 		add_scsipending_entry_with_wait(virthbainfo, CMD_VDISKMGMT_TYPE,
-						(void *) cmdrsp);
+						(void *)cmdrsp);
 
 	uisqueue_put_cmdrsp_with_lock_client(virthbainfo->chinfo.queueinfo,
 					     cmdrsp, IOCHAN_TO_IOPART,
 					     &virthbainfo->chinfo.insertlock,
-					     DONT_ISSUE_INTERRUPT, (u64) NULL,
+					     DONT_ISSUE_INTERRUPT, (u64)NULL,
 					     OK_TO_WAIT, "vhba");
 	LOGINF("VdiskMgmt waiting on event notifyevent=0x%p\n",
 	       cmdrsp->scsitaskmgmt.notify);
@@ -744,7 +744,7 @@ forward_taskmgmt_command(TASK_MGMT_TYPES tasktype, struct scsi_device *scsidev)
 {
 	struct uiscmdrsp *cmdrsp;
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) scsidev->host->hostdata;
+	    (struct virthba_info *)scsidev->host->hostdata;
 	int notifyresult = 0xffff;
 	wait_queue_head_t notifyevent;
 
@@ -769,8 +769,8 @@ forward_taskmgmt_command(TASK_MGMT_TYPES tasktype, struct scsi_device *scsidev)
 	cmdrsp->cmdtype = CMD_SCSITASKMGMT_TYPE;
 	/* specify the event that has to be triggered when this */
 	/* cmd is complete */
-	cmdrsp->scsitaskmgmt.notify = (void *) &notifyevent;
-	cmdrsp->scsitaskmgmt.notifyresult = (void *) &notifyresult;
+	cmdrsp->scsitaskmgmt.notify = (void *)&notifyevent;
+	cmdrsp->scsitaskmgmt.notifyresult = (void *)&notifyresult;
 
 	/* save destination */
 	cmdrsp->scsitaskmgmt.tasktype = tasktype;
@@ -778,15 +778,15 @@ forward_taskmgmt_command(TASK_MGMT_TYPES tasktype, struct scsi_device *scsidev)
 	cmdrsp->scsitaskmgmt.vdest.id = scsidev->id;
 	cmdrsp->scsitaskmgmt.vdest.lun = scsidev->lun;
 	cmdrsp->scsitaskmgmt.scsicmd =
-	    (void *) (uintptr_t)
+	    (void *)(uintptr_t)
 		add_scsipending_entry_with_wait(virthbainfo,
 						CMD_SCSITASKMGMT_TYPE,
-						(void *) cmdrsp);
+						(void *)cmdrsp);
 
 	uisqueue_put_cmdrsp_with_lock_client(virthbainfo->chinfo.queueinfo,
 					     cmdrsp, IOCHAN_TO_IOPART,
 					     &virthbainfo->chinfo.insertlock,
-					     DONT_ISSUE_INTERRUPT, (u64) NULL,
+					     DONT_ISSUE_INTERRUPT, (u64)NULL,
 					     OK_TO_WAIT, "vhba");
 	LOGINF("TaskMgmt waiting on event notifyevent=0x%p\n",
 	       cmdrsp->scsitaskmgmt.notify);
@@ -807,7 +807,7 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	for (vdisk = &((struct virthba_info *) scsidev->host->hostdata)->head;
+	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
 		if ((scsidev->channel == vdisk->channel)
 		    && (scsidev->id == vdisk->id)
@@ -833,7 +833,7 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	for (vdisk = &((struct virthba_info *) scsidev->host->hostdata)->head;
+	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
 		if ((scsidev->channel == vdisk->channel)
 		    && (scsidev->id == vdisk->id)
@@ -859,7 +859,7 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	for (vdisk = &((struct virthba_info *) scsidev->host->hostdata)->head;
+	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
 		if ((scsidev->channel == vdisk->channel)
 		    && (scsidev->id == vdisk->id)
@@ -917,7 +917,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	struct uiscmdrsp *cmdrsp;
 	unsigned int i;
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) scsihost->hostdata;
+	    (struct virthba_info *)scsihost->hostdata;
 	struct scatterlist *sg = NULL;
 	struct scatterlist *sgl = NULL;
 	int sg_failed = 0;
@@ -942,9 +942,9 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	 * will return the scsicmd pointer for completion
 	 */
 	insert_location =
-	    add_scsipending_entry(virthbainfo, CMD_SCSI_TYPE, (void *) scsicmd);
+	    add_scsipending_entry(virthbainfo, CMD_SCSI_TYPE, (void *)scsicmd);
 	if (insert_location != -1) {
-		cmdrsp->scsi.scsicmd = (void *) (uintptr_t) insert_location;
+		cmdrsp->scsi.scsicmd = (void *)(uintptr_t)insert_location;
 	} else {
 		LOGERR("Queue is full. Returning busy.\n");
 		kfree(cmdrsp);
@@ -969,7 +969,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	if (scsi_sg_count(scsicmd) > MAX_PHYS_INFO) {
 		LOGERR("scsicmd use_sg:%d greater than MAX:%d\n",
 		       scsi_sg_count(scsicmd), MAX_PHYS_INFO);
-		del_scsipending_entry(virthbainfo, (uintptr_t) insert_location);
+		del_scsipending_entry(virthbainfo, (uintptr_t)insert_location);
 		kfree(cmdrsp);
 		return 1;	/* reject the command */
 	}
@@ -1004,7 +1004,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 			for_each_sg(sgl, sg, scsi_sg_count(scsicmd), i) {
 				LOGERR("   Entry(%d): page->[0x%p], phys->[0x%Lx], off(%d), len(%d)\n",
 				     i, sg_page(sg),
-				     (unsigned long long) sg_phys(sg),
+				     (unsigned long long)sg_phys(sg),
 				     sg->offset, sg->length);
 			}
 			LOGERR("Done sg_list dump.\n");
@@ -1023,12 +1023,12 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 						 &virthbainfo->chinfo.
 						 insertlock,
 						 DONT_ISSUE_INTERRUPT,
-						 (u64) NULL, DONT_WAIT, "vhba");
+						 (u64)NULL, DONT_WAIT, "vhba");
 	if (i == 0) {
 		/* queue must be full - and we said don't wait - return busy */
 		LOGERR("uisqueue_put_cmdrsp_with_lock ****FAILED\n");
 		kfree(cmdrsp);
-		del_scsipending_entry(virthbainfo, (uintptr_t) insert_location);
+		del_scsipending_entry(virthbainfo, (uintptr_t)insert_location);
 		return SCSI_MLQUEUE_DEVICE_BUSY;
 	}
 
@@ -1048,9 +1048,9 @@ virthba_slave_alloc(struct scsi_device *scsidev)
 	struct virtdisk_info *vdisk;
 	struct virtdisk_info *tmpvdisk;
 	struct virthba_info *virthbainfo;
-	struct Scsi_Host *scsihost = (struct Scsi_Host *) scsidev->host;
+	struct Scsi_Host *scsihost = (struct Scsi_Host *)scsidev->host;
 
-	virthbainfo = (struct virthba_info *) scsihost->hostdata;
+	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	if (!virthbainfo) {
 		LOGERR("Could not find virthba_info for scsihost\n");
 		return 0;	/* even though we errored, treat as success */
@@ -1090,9 +1090,9 @@ virthba_slave_destroy(struct scsi_device *scsidev)
 	 */
 	struct virtdisk_info *vdisk, *delvdisk;
 	struct virthba_info *virthbainfo;
-	struct Scsi_Host *scsihost = (struct Scsi_Host *) scsidev->host;
+	struct Scsi_Host *scsihost = (struct Scsi_Host *)scsidev->host;
 
-	virthbainfo = (struct virthba_info *) scsihost->hostdata;
+	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	if (!virthbainfo)
 		LOGERR("Could not find virthba_info for scsihost\n");
 	for (vdisk = &virthbainfo->head; vdisk->next; vdisk = vdisk->next) {
@@ -1121,7 +1121,7 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 
 	scsidev = scsicmd->device;
 	memcpy(scsicmd->sense_buffer, cmdrsp->scsi.sensebuf, MAX_SENSE_SIZE);
-	sd = (struct sense_data *) scsicmd->sense_buffer;
+	sd = (struct sense_data *)scsicmd->sense_buffer;
 
 	/* Do not log errors for disk-not-present inquiries */
 	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
@@ -1130,7 +1130,7 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 		return;
 
 	/* Okay see what our error_count is here.... */
-	for (vdisk = &((struct virthba_info *) scsidev->host->hostdata)->head;
+	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
 		if ((scsidev->channel != vdisk->channel)
 		    || (scsidev->id != vdisk->id)
@@ -1201,7 +1201,7 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 			DBGVER("copying OUT OF buf into 0x%p %d\n",
 			     sg_page(sg + i), sg[i].length);
 			thispage_orig = kmap_atomic(sg_page(sg + i));
-			thispage = (void *) ((unsigned long)thispage_orig |
+			thispage = (void *)((unsigned long)thispage_orig |
 					     sg[i].offset);
 			memcpy(thispage, buf + bufind, sg[i].length);
 			kunmap_atomic(thispage_orig);
@@ -1249,8 +1249,8 @@ complete_vdiskmgmt_command(struct uiscmdrsp *cmdrsp)
 {
 	/* copy the result of the taskmgmt and */
 	/* wake up the error handler that is waiting for this */
-	*(int *) cmdrsp->vdiskmgmt.notifyresult = cmdrsp->vdiskmgmt.result;
-	wake_up_all((wait_queue_head_t *) cmdrsp->vdiskmgmt.notify);
+	*(int *)cmdrsp->vdiskmgmt.notifyresult = cmdrsp->vdiskmgmt.result;
+	wake_up_all((wait_queue_head_t *)cmdrsp->vdiskmgmt.notify);
 	LOGINF("set notify result to %d\n", cmdrsp->vdiskmgmt.result);
 }
 
@@ -1259,9 +1259,9 @@ complete_taskmgmt_command(struct uiscmdrsp *cmdrsp)
 {
 	/* copy the result of the taskmgmt and */
 	/* wake up the error handler that is waiting for this */
-	*(int *) cmdrsp->scsitaskmgmt.notifyresult =
+	*(int *)cmdrsp->scsitaskmgmt.notifyresult =
 	    cmdrsp->scsitaskmgmt.result;
-	wake_up_all((wait_queue_head_t *) cmdrsp->scsitaskmgmt.notify);
+	wake_up_all((wait_queue_head_t *)cmdrsp->scsitaskmgmt.notify);
 	LOGINF("set notify result to %d\n", cmdrsp->scsitaskmgmt.result);
 }
 
@@ -1295,14 +1295,14 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 			 * deletion
 			 */
 			scsicmd = del_scsipending_entry(virthbainfo,
-					(uintptr_t) cmdrsp->scsi.scsicmd);
+					(uintptr_t)cmdrsp->scsi.scsicmd);
 			if (!scsicmd)
 				break;
 			/* complete the orig cmd */
 			complete_scsi_command(cmdrsp, scsicmd);
 		} else if (cmdrsp->cmdtype == CMD_SCSITASKMGMT_TYPE) {
 			if (!del_scsipending_entry(virthbainfo,
-				   (uintptr_t) cmdrsp->scsitaskmgmt.scsicmd))
+				   (uintptr_t)cmdrsp->scsitaskmgmt.scsicmd))
 				break;
 			complete_taskmgmt_command(cmdrsp);
 		} else if (cmdrsp->cmdtype == CMD_NOTIFYGUEST_TYPE) {
@@ -1314,7 +1314,7 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 			process_disk_notify(shost, cmdrsp);
 		} else if (cmdrsp->cmdtype == CMD_VDISKMGMT_TYPE) {
 			if (!del_scsipending_entry(virthbainfo,
-				   (uintptr_t) cmdrsp->vdiskmgmt.scsicmd))
+				   (uintptr_t)cmdrsp->vdiskmgmt.scsicmd))
 				break;
 			complete_vdiskmgmt_command(cmdrsp);
 		} else
@@ -1435,7 +1435,7 @@ static ssize_t enable_ints_write(struct file *file,
 	buf[count] = '\0';
 	if (copy_from_user(buf, buffer, count)) {
 		LOGERR("copy_from_user failed. buf<<%.*s>> count<<%lu>>\n",
-		       (int) count, buf, count);
+		       (int)count, buf, count);
 		return -EFAULT;
 	}
 
@@ -1443,7 +1443,7 @@ static ssize_t enable_ints_write(struct file *file,
 
 	if (i != 0) {
 		LOGERR("Failed to scan value for enable_ints, buf<<%.*s>>",
-		       (int) count, buf);
+		       (int)count, buf);
 		return -EFAULT;
 	}
 
@@ -1478,7 +1478,7 @@ static int
 virthba_serverup(struct virtpci_dev *virtpcidev)
 {
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) ((struct Scsi_Host *) virtpcidev->scsi.
+	    (struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
 				     scsihost)->hostdata;
 
 	DBGINF("virtpcidev busNo<<%d>>devNo<<%d>>", virtpcidev->busNo,
@@ -1539,23 +1539,23 @@ virthba_serverdown_complete(struct work_struct *work)
 		pendingdel = &(virthbainfo->pending[i]);
 		switch (pendingdel->cmdtype) {
 		case CMD_SCSI_TYPE:
-			scsicmd = (struct scsi_cmnd *) pendingdel->sent;
+			scsicmd = (struct scsi_cmnd *)pendingdel->sent;
 			scsicmd->result = (DID_RESET << 16);
 			if (scsicmd->scsi_done)
 				scsicmd->scsi_done(scsicmd);
 			break;
 		case CMD_SCSITASKMGMT_TYPE:
-			cmdrsp = (struct uiscmdrsp *) pendingdel->sent;
+			cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
 			DBGINF("cmdrsp=0x%x, notify=0x%x\n", cmdrsp,
 			       cmdrsp->scsitaskmgmt.notify);
-			*(int *) cmdrsp->scsitaskmgmt.notifyresult =
+			*(int *)cmdrsp->scsitaskmgmt.notifyresult =
 			    TASK_MGMT_FAILED;
 			wake_up_all((wait_queue_head_t *)
 				    cmdrsp->scsitaskmgmt.notify);
 			break;
 		case CMD_VDISKMGMT_TYPE:
-			cmdrsp = (struct uiscmdrsp *) pendingdel->sent;
-			*(int *) cmdrsp->vdiskmgmt.notifyresult =
+			cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
+			*(int *)cmdrsp->vdiskmgmt.notifyresult =
 			    VDISK_MGMT_FAILED;
 			wake_up_all((wait_queue_head_t *)
 				    cmdrsp->vdiskmgmt.notify);
@@ -1586,7 +1586,7 @@ static int
 virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 {
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) ((struct Scsi_Host *) virtpcidev->scsi.
+	    (struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
 				     scsihost)->hostdata;
 
 	DBGINF("virthba_serverdown");
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 03/10] staging: unisys: virthba fix all alingment issues
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 02/10] staging: unisys: virthba fix all spaces after cast Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-27 12:10   ` Dan Carpenter
  2014-10-22 21:52 ` [PATCH 04/10] staging: unisys: fix all logical continuation virthba Erik Arfvidson
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

this patch fixes all aligment issues in virthba.c

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 82 ++++++++++++++++----------------
 1 file changed, 42 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 35e17ee..1f19a98 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -110,9 +110,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                                           */
@@ -263,7 +264,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) {
 			LOGERR("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;
 		}
@@ -301,13 +302,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del)
 
 	if (del >= MAX_PENDING_REQUESTS) {
 		LOGERR("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)
 			LOGERR("Deleting already cleared queue entry at <<%lu>>.\n",
-			     (unsigned long)del);
+			       (unsigned long)del);
 
 		sent = vhbainfo->pending[del].sent;
 
@@ -357,8 +358,8 @@ SendDiskAddRemove(struct diskaddremove *dar)
 				    dar->lun);
 		if (error)
 			LOGERR("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
 		LOGERR("Failed scsi_device_lookup:[chan=%d:id=%d:lun=%d]\n",
 		       dar->channel, dar->id, dar->lun);
@@ -408,8 +409,8 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
 		QUEUE_DISKADDREMOVE(dar);
 	} else {
 		LOGERR("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);
 	}
 }
 
@@ -504,11 +505,11 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	 * the max-channel value.
 	 */
 	LOGINF("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;
@@ -520,12 +521,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;
 	LOGINF("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);
 	LOGINF("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);
 
 	DBGINF("calling scsi_add_host\n");
 
@@ -995,17 +996,17 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 			cmdrsp->scsi.gpi_list[i].length = sg->length;
 			if ((i != 0) && (sg->offset != 0))
 				LOGINF("Offset on a sg_entry other than zero =<<%d>>.\n",
-				     sg->offset);
+				       sg->offset);
 		}
 
 		if (sg_failed) {
 			LOGERR("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) {
 				LOGERR("   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);
 			}
 			LOGERR("Done sg_list dump.\n");
 			/* BUG(); ***** For now, let it fail in uissd
@@ -1149,8 +1150,8 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 			if (atomic_read(&vdisk->error_count) ==
 			    VIRTHBA_ERROR_COUNT) {
 				LOGERR("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);
 		}
@@ -1199,7 +1200,7 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 		sg = scsi_sglist(scsicmd);
 		for (i = 0; i < scsi_sg_count(scsicmd); i++) {
 			DBGVER("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);
@@ -1267,7 +1268,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;
@@ -1295,14 +1296,14 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 			 * deletion
 			 */
 			scsicmd = del_scsipending_entry(virthbainfo,
-					(uintptr_t)cmdrsp->scsi.scsicmd);
+				(uintptr_t)cmdrsp->scsi.scsicmd);
 			if (!scsicmd)
 				break;
 			/* complete the orig cmd */
 			complete_scsi_command(cmdrsp, scsicmd);
 		} else if (cmdrsp->cmdtype == CMD_SCSITASKMGMT_TYPE) {
 			if (!del_scsipending_entry(virthbainfo,
-				   (uintptr_t)cmdrsp->scsitaskmgmt.scsicmd))
+				(uintptr_t)cmdrsp->scsitaskmgmt.scsicmd))
 				break;
 			complete_taskmgmt_command(cmdrsp);
 		} else if (cmdrsp->cmdtype == CMD_NOTIFYGUEST_TYPE) {
@@ -1314,7 +1315,7 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 			process_disk_notify(shost, cmdrsp);
 		} else if (cmdrsp->cmdtype == CMD_VDISKMGMT_TYPE) {
 			if (!del_scsipending_entry(virthbainfo,
-				   (uintptr_t)cmdrsp->vdiskmgmt.scsicmd))
+				(uintptr_t)cmdrsp->vdiskmgmt.scsicmd))
 				break;
 			complete_vdiskmgmt_command(cmdrsp);
 		} else
@@ -1347,8 +1348,8 @@ process_incoming_rsps(void *v)
 	mask = ULTRA_CHANNEL_ENABLE_INTS;
 	while (1) {
 		wait_event_interruptible_timeout(virthbainfo->rsp_queue,
-			 (atomic_read(&virthbainfo->interrupt_rcvd) == 1),
-					 usecs_to_jiffies(rsltq_wait_usecs));
+			(atomic_read(&virthbainfo->interrupt_rcvd) == 1),
+			usecs_to_jiffies(rsltq_wait_usecs));
 		atomic_set(&virthbainfo->interrupt_rcvd, 0);
 		/* drain queue */
 		drain_queue(virthbainfo, dc, cmdrsp);
@@ -1368,7 +1369,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;
@@ -1420,7 +1421,8 @@ static ssize_t info_debugfs_read(struct file *file,
 }
 
 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)
 {
 	char buf[4];
 	int i, new_value;
@@ -1563,7 +1565,7 @@ virthba_serverdown_complete(struct work_struct *work)
 		default:
 			if (pendingdel->sent != NULL)
 				LOGERR("Unknown command type: 0x%x.  Only freeing list structure.\n",
-				     pendingdel->cmdtype);
+				       pendingdel->cmdtype);
 		}
 		pendingdel->cmdtype = 0;
 		pendingdel->sent = NULL;
@@ -1659,12 +1661,12 @@ 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);
+				    virthba_debugfs_dir, NULL,
+				    &debugfs_enable_ints_fops);
 		/* Initialize DARWorkQ */
 		INIT_WORK(&DARWorkQ, doDiskAddRemove);
 		spin_lock_init(&DARWorkQLock);
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 04/10] staging: unisys: fix all logical continuation virthba
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 02/10] staging: unisys: virthba fix all spaces after cast Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 03/10] staging: unisys: virthba fix all alingment issues Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 05/10] staging: unisys: added spinlock comments visorchannel_funcs Erik Arfvidson
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

This patch fixes all logical continuations issues in virthba.c

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 42 ++++++++++++++++----------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 1f19a98..02c7ac1 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -433,10 +433,10 @@ virthba_ISR(int irq, void *dev_id)
 	virthbainfo->interrupts_rcvd++;
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
 	if (((readq(&pChannelHeader->Features)
-	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
-	    && ((readq(&pChannelHeader->Features) &
-		 ULTRA_IO_DRIVER_DISABLES_INTS) !=
-		0)) {
+	      &ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) &
+	    ((readq(&pChannelHeader->Features) &
+	      ULTRA_IO_DRIVER_DISABLES_INTS) !=
+	     0)) {
 		virthbainfo->interrupts_disabled++;
 		mask = ~ULTRA_CHANNEL_ENABLE_INTS;
 		rc1 = uisqueue_interlocked_and(virthbainfo->flags_addr, mask);
@@ -810,9 +810,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -836,9 +836,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -862,9 +862,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+			(scsidev->id == vdisk->id) &&
+			(scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -1133,9 +1133,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	/* Okay see what our error_count is here.... */
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel != vdisk->channel)
-		    || (scsidev->id != vdisk->id)
-		    || (scsidev->lun != vdisk->lun))
+		if ((scsidev->channel != vdisk->channel) ||
+		    (scsidev->id != vdisk->id) ||
+		    (scsidev->lun != vdisk->lun))
 			continue;
 
 		if (atomic_read(&vdisk->error_count) < VIRTHBA_ERROR_COUNT) {
@@ -1171,8 +1171,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	if ((cmdrsp->scsi.cmnd[0] == INQUIRY)
-	    && (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
+	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
+	    (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
 		if (cmdrsp->scsi.no_disk_result == 0)
 			return;
 
@@ -1211,9 +1211,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	} else {
 		vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 		for ( ; vdisk->next; vdisk = vdisk->next) {
-			if ((scsidev->channel != vdisk->channel)
-			    || (scsidev->id != vdisk->id)
-			    || (scsidev->lun != vdisk->lun))
+			if ((scsidev->channel != vdisk->channel) ||
+				(scsidev->id != vdisk->id) ||
+				(scsidev->lun != vdisk->lun))
 				continue;
 
 			if (atomic_read(&vdisk->ios_threshold) > 0) {
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 05/10] staging: unisys: added spinlock comments visorchannel_funcs
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
                   ` (2 preceding siblings ...)
  2014-10-22 21:52 ` [PATCH 04/10] staging: unisys: fix all logical continuation virthba Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-27 12:10   ` Dan Carpenter
  2014-10-22 21:52 ` [PATCH 06/10] staging: unisys: remove all unnecessary space after cast visorchannel_funcs Erik Arfvidson
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

This patch adds comment documentation to visorchannel_tag struct

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 01a44c5..48e28e3 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -34,8 +34,8 @@ struct VISORCHANNEL_Tag {
 	uuid_le guid;
 	ulong size;
 	BOOL needs_lock;
-	spinlock_t insert_lock;
-	spinlock_t remove_lock;
+	spinlock_t insert_lock; /* insert lock for visorchannel queue */
+	spinlock_t remove_lock; /* remove lock for visorchannel queue */
 
 	struct {
 		SIGNAL_QUEUE_HEADER req_queue;
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 06/10] staging: unisys: remove all unnecessary space after cast visorchannel_funcs
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
                   ` (3 preceding siblings ...)
  2014-10-22 21:52 ` [PATCH 05/10] staging: unisys: added spinlock comments visorchannel_funcs Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 07/10] staging: unisys: fixed logical continuation visorchannel_funcs Erik Arfvidson
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

This patch removes all unnecessary spaces after cast for visorchannel_funcs

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 .../unisys/visorchannel/visorchannel_funcs.c       | 61 +++++++++++-----------
 1 file changed, 31 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 48e28e3..dbdf1ed 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -89,7 +89,7 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
 	}
 	if (channelBytes == 0)
 		/* we had better be a CLIENT of this channel */
-		channelBytes = (ulong) p->chan_hdr.Size;
+		channelBytes = (ulong)p->chan_hdr.Size;
 	if (uuid_le_cmp(guid, NULL_UUID_LE) == 0)
 		/* we had better be a CLIENT of this channel */
 		guid = p->chan_hdr.Type;
@@ -283,7 +283,7 @@ EXPORT_SYMBOL_GPL(visorchannel_clear);
 void __iomem  *
 visorchannel_get_header(VISORCHANNEL *channel)
 {
-	return (void __iomem *) &(channel->chan_hdr);
+	return (void __iomem *)&channel->chan_hdr;
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_header);
 
@@ -328,7 +328,8 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
 				 sig_hdr, sizeof(SIGNAL_QUEUE_HEADER)) < 0) {
 		ERRDRV("queue=%d SIG_QUEUE_OFFSET=%d",
 		       queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue));
-		ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n", rc);
+		ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n",
+		       rc);
 		goto Away;
 	}
 	rc = TRUE;
@@ -513,7 +514,7 @@ visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue)
 		head = head + sig_hdr.MaxSignalSlots;
 	slots_used = (head - tail);
 	slots_avail = sig_hdr.MaxSignals - slots_used;
-	return (int) slots_avail;
+	return (int)slots_avail;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalqueue_slots_avail);
 
@@ -524,7 +525,7 @@ visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, u32 queue)
 
 	if (!sig_read_header(channel, queue, &sig_hdr))
 		return 0;
-	return (int) sig_hdr.MaxSignals;
+	return (int)sig_hdr.MaxSignals;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalqueue_max_slots);
 
@@ -532,24 +533,24 @@ static void
 sigqueue_debug(SIGNAL_QUEUE_HEADER *q, int which, struct seq_file *seq)
 {
 	seq_printf(seq, "Signal Queue #%d\n", which);
-	seq_printf(seq, "   VersionId          = %lu\n", (ulong) q->VersionId);
-	seq_printf(seq, "   Type               = %lu\n", (ulong) q->Type);
+	seq_printf(seq, "   VersionId          = %lu\n", (ulong)q->VersionId);
+	seq_printf(seq, "   Type               = %lu\n", (ulong)q->Type);
 	seq_printf(seq, "   oSignalBase        = %llu\n",
-		   (long long) q->oSignalBase);
-	seq_printf(seq, "   SignalSize         = %lu\n", (ulong) q->SignalSize);
+		   (long long)q->oSignalBase);
+	seq_printf(seq, "   SignalSize         = %lu\n", (ulong)q->SignalSize);
 	seq_printf(seq, "   MaxSignalSlots     = %lu\n",
-		   (ulong) q->MaxSignalSlots);
-	seq_printf(seq, "   MaxSignals         = %lu\n", (ulong) q->MaxSignals);
+		   (ulong)q->MaxSignalSlots);
+	seq_printf(seq, "   MaxSignals         = %lu\n", (ulong)q->MaxSignals);
 	seq_printf(seq, "   FeatureFlags       = %-16.16Lx\n",
-		   (long long) q->FeatureFlags);
+		   (long long)q->FeatureFlags);
 	seq_printf(seq, "   NumSignalsSent     = %llu\n",
-		   (long long) q->NumSignalsSent);
+		   (long long)q->NumSignalsSent);
 	seq_printf(seq, "   NumSignalsReceived = %llu\n",
-		   (long long) q->NumSignalsReceived);
+		   (long long)q->NumSignalsReceived);
 	seq_printf(seq, "   NumOverflows       = %llu\n",
-		   (long long) q->NumOverflows);
-	seq_printf(seq, "   Head               = %lu\n", (ulong) q->Head);
-	seq_printf(seq, "   Tail               = %lu\n", (ulong) q->Tail);
+		   (long long)q->NumOverflows);
+	seq_printf(seq, "   Head               = %lu\n", (ulong)q->Head);
+	seq_printf(seq, "   Tail               = %lu\n", (ulong)q->Tail);
 }
 
 void
@@ -587,28 +588,28 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
 		} else
 			return;
 	}
-	nbytes = (ulong) (phdr->Size);
+	nbytes = (ulong)(phdr->Size);
 	seq_printf(seq, "--- Begin channel @0x%-16.16Lx for 0x%lx bytes (region=0x%lx bytes) ---\n",
 		   addr + off, nbytes, nbytes_region);
 	seq_printf(seq, "Type            = %pUL\n", &phdr->Type);
 	seq_printf(seq, "ZoneGuid        = %pUL\n", &phdr->ZoneGuid);
 	seq_printf(seq, "Signature       = 0x%-16.16Lx\n",
-		   (long long) phdr->Signature);
-	seq_printf(seq, "LegacyState     = %lu\n", (ulong) phdr->LegacyState);
-	seq_printf(seq, "SrvState        = %lu\n", (ulong) phdr->SrvState);
-	seq_printf(seq, "CliStateBoot    = %lu\n", (ulong) phdr->CliStateBoot);
-	seq_printf(seq, "CliStateOS      = %lu\n", (ulong) phdr->CliStateOS);
-	seq_printf(seq, "HeaderSize      = %lu\n", (ulong) phdr->HeaderSize);
-	seq_printf(seq, "Size            = %llu\n", (long long) phdr->Size);
+		   (long long)phdr->Signature);
+	seq_printf(seq, "LegacyState     = %lu\n", (ulong)phdr->LegacyState);
+	seq_printf(seq, "SrvState        = %lu\n", (ulong)phdr->SrvState);
+	seq_printf(seq, "CliStateBoot    = %lu\n", (ulong)phdr->CliStateBoot);
+	seq_printf(seq, "CliStateOS      = %lu\n", (ulong)phdr->CliStateOS);
+	seq_printf(seq, "HeaderSize      = %lu\n", (ulong)phdr->HeaderSize);
+	seq_printf(seq, "Size            = %llu\n", (long long)phdr->Size);
 	seq_printf(seq, "Features        = 0x%-16.16llx\n",
-		   (long long) phdr->Features);
+		   (long long)phdr->Features);
 	seq_printf(seq, "PartitionHandle = 0x%-16.16llx\n",
-		   (long long) phdr->PartitionHandle);
+		   (long long)phdr->PartitionHandle);
 	seq_printf(seq, "Handle          = 0x%-16.16llx\n",
-		   (long long) phdr->Handle);
-	seq_printf(seq, "VersionId       = %lu\n", (ulong) phdr->VersionId);
+		   (long long)phdr->Handle);
+	seq_printf(seq, "VersionId       = %lu\n", (ulong)phdr->VersionId);
 	seq_printf(seq, "oChannelSpace   = %llu\n",
-		   (long long) phdr->oChannelSpace);
+		   (long long)phdr->oChannelSpace);
 	if ((phdr->oChannelSpace == 0) || (errcode < 0))
 		;
 	else
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 07/10] staging: unisys: fixed logical continuation visorchannel_funcs
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
                   ` (4 preceding siblings ...)
  2014-10-22 21:52 ` [PATCH 06/10] staging: unisys: remove all unnecessary space after cast visorchannel_funcs Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 08/10] staging: unisys: fixed aligment in visorchannel_funcs Erik Arfvidson
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

this patch fixes a logical continuation check in visorchannel

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index dbdf1ed..cf1a4d5 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -382,8 +382,8 @@ safe_sig_queue_validate(pSIGNAL_QUEUE_HEADER psafe_sqh,
 			pSIGNAL_QUEUE_HEADER punsafe_sqh,
 			u32 *phead, u32 *ptail)
 {
-	if ((*phead >= psafe_sqh->MaxSignalSlots)
-	    || (*ptail >= psafe_sqh->MaxSignalSlots)) {
+	if ((*phead >= psafe_sqh->MaxSignalSlots) ||
+	    (*ptail >= psafe_sqh->MaxSignalSlots)) {
 		/* Choose 0 or max, maybe based on current tail value */
 		*phead = 0;
 		*ptail = 0;
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 08/10] staging: unisys: fixed aligment in visorchannel_funcs
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
                   ` (5 preceding siblings ...)
  2014-10-22 21:52 ` [PATCH 07/10] staging: unisys: fixed logical continuation visorchannel_funcs Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 09/10] staging: unisys: remove unnecessary blank line " Erik Arfvidson
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

this patch fixes aligment for visorchanne_funcs

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index cf1a4d5..b04d113 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -393,7 +393,7 @@ safe_sig_queue_validate(pSIGNAL_QUEUE_HEADER psafe_sqh,
 		punsafe_sqh->Tail = *ptail;
 
 		ERRDRV("safe_sig_queue_validate: head = 0x%x, tail = 0x%x, MaxSlots = 0x%x",
-		     *phead, *ptail, psafe_sqh->MaxSignalSlots);
+		       *phead, *ptail, psafe_sqh->MaxSignalSlots);
 		return 0;
 	}
 	return 1;
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 09/10] staging: unisys: remove unnecessary blank line in visorchannel_funcs
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
                   ` (6 preceding siblings ...)
  2014-10-22 21:52 ` [PATCH 08/10] staging: unisys: fixed aligment in visorchannel_funcs Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-22 21:52 ` [PATCH 10/10] staging: unisys: fixed braces check " Erik Arfvidson
  2014-10-25  3:46 ` [PATCH 01/10] staging: unisys: fix blank lines virthba Greg KH
  9 siblings, 0 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

this patch removes unnecessary blank line in visorchannel_funcs

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index b04d113..7cd5e5b 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -498,7 +498,6 @@ Away:
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalinsert);
 
-
 int
 visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue)
 {
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 10/10] staging: unisys: fixed braces check in visorchannel_funcs
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
                   ` (7 preceding siblings ...)
  2014-10-22 21:52 ` [PATCH 09/10] staging: unisys: remove unnecessary blank line " Erik Arfvidson
@ 2014-10-22 21:52 ` Erik Arfvidson
  2014-10-25  3:46 ` [PATCH 01/10] staging: unisys: fix blank lines virthba Greg KH
  9 siblings, 0 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-22 21:52 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

this patch adds braces to an else statement to remove check in
checkpatch.pl for visorchannel_funcs.c

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 7cd5e5b..d8d224c 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -584,8 +584,9 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
 		if (off == 0) {
 			phdr = &channel->chan_hdr;
 			seq_puts(seq, "(following data may be stale)\n");
-		} else
+		} else {
 			return;
+		}
 	}
 	nbytes = (ulong)(phdr->Size);
 	seq_printf(seq, "--- Begin channel @0x%-16.16Lx for 0x%lx bytes (region=0x%lx bytes) ---\n",
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 01/10] staging: unisys: fix blank lines virthba
  2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
                   ` (8 preceding siblings ...)
  2014-10-22 21:52 ` [PATCH 10/10] staging: unisys: fixed braces check " Erik Arfvidson
@ 2014-10-25  3:46 ` Greg KH
  9 siblings, 0 replies; 18+ messages in thread
From: Greg KH @ 2014-10-25  3:46 UTC (permalink / raw)
  To: Erik Arfvidson; +Cc: driverdev-devel, benjamin.romer, sparmaintainer

On Wed, Oct 22, 2014 at 05:52:21PM -0400, Erik Arfvidson wrote:
> This patch removes unnecessary blanks lines and adds necessary blank lines in virthba.
> 
> Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
> ---
>  drivers/staging/unisys/virthba/virthba.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
> index e4130c9..e8868ae2 100644
> --- a/drivers/staging/unisys/virthba/virthba.c
> +++ b/drivers/staging/unisys/virthba/virthba.c
> @@ -101,7 +101,6 @@ static DEF_SCSI_QCMD(virthba_queue_command)
>  #define virthba_queue_command virthba_queue_command_lck
>  #endif
>  
> -
>  static int virthba_slave_alloc(struct scsi_device *scsidev);
>  static int virthba_slave_configure(struct scsi_device *scsidev);
>  static void virthba_slave_destroy(struct scsi_device *scsidev);
> @@ -166,6 +165,7 @@ struct virtdisk_info {
>  	atomic_t error_count;
>  	struct virtdisk_info *next;
>  };
> +
>  /* Each Scsi_Host has a host_data area that contains this struct. */
>  struct virthba_info {
>  	struct Scsi_Host *scsihost;
> @@ -420,7 +420,9 @@ static irqreturn_t
>  virthba_ISR(int irq, void *dev_id)
>  {
>  	struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
> +
>  	CHANNEL_HEADER __iomem *pChannelHeader;
> +
>  	SIGNAL_QUEUE_HEADER __iomem *pqhdr;

Same extra line problem here as well.

Please fix both of those up and resend both series.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 05/10] staging: unisys: added spinlock comments visorchannel_funcs
  2014-10-22 21:52 ` [PATCH 05/10] staging: unisys: added spinlock comments visorchannel_funcs Erik Arfvidson
@ 2014-10-27 12:10   ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2014-10-27 12:10 UTC (permalink / raw)
  To: Erik Arfvidson
  Cc: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

On Wed, Oct 22, 2014 at 05:52:25PM -0400, Erik Arfvidson wrote:
> This patch adds comment documentation to visorchannel_tag struct
> 
> Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
> ---
>  drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
> index 01a44c5..48e28e3 100644
> --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
> +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
> @@ -34,8 +34,8 @@ struct VISORCHANNEL_Tag {
>  	uuid_le guid;
>  	ulong size;
>  	BOOL needs_lock;
> -	spinlock_t insert_lock;
> -	spinlock_t remove_lock;
> +	spinlock_t insert_lock; /* insert lock for visorchannel queue */
> +	spinlock_t remove_lock; /* remove lock for visorchannel queue */

The locking here is sort of weird and these comments aren't enough to
help me understand.

When is needs_lock true/false?  How can it possibly work with separate
remove/insert locks?  Doessn't that mean removing and inserting at the
same time is racy?

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 03/10] staging: unisys: virthba fix all alingment issues
  2014-10-22 21:52 ` [PATCH 03/10] staging: unisys: virthba fix all alingment issues Erik Arfvidson
@ 2014-10-27 12:10   ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2014-10-27 12:10 UTC (permalink / raw)
  To: Erik Arfvidson
  Cc: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

On Wed, Oct 22, 2014 at 05:52:23PM -0400, Erik Arfvidson wrote:
> @@ -301,13 +302,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del)
>  
>  	if (del >= MAX_PENDING_REQUESTS) {
>  		LOGERR("Invalid queue position <<%lu>> given to delete. MAX_PENDING_REQUESTS <<%d>>\n",
> -		     (unsigned long)del, MAX_PENDING_REQUESTS);
> +		       (unsigned long)del, MAX_PENDING_REQUESTS);

Not related to this patch but these casts aren't needed.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 04/10] staging: unisys: fix all logical continuation virthba
  2014-10-29 16:24 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
@ 2014-10-29 16:25 ` Erik Arfvidson
  0 siblings, 0 replies; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-29 16:25 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

This patch fixes all logical continuations issues in virthba.c

v2: fixed spacing around bitwise operator suggested by dan carpenter
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 44 ++++++++++++++++----------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index f30ef08..ee379b7 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -430,11 +430,11 @@ virthba_ISR(int irq, void *dev_id)
 		return IRQ_NONE;
 	virthbainfo->interrupts_rcvd++;
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
-	if (((readq(&pChannelHeader->features)
-	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
-	    && ((readq(&pChannelHeader->features) &
-		 ULTRA_IO_DRIVER_DISABLES_INTS) !=
-		0)) {
+	if (((readq(&pChannelHeader->features) &
+	      ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) &&
+	    ((readq(&pChannelHeader->features) &
+	      ULTRA_IO_DRIVER_DISABLES_INTS) !=
+	     0)) {
 		virthbainfo->interrupts_disabled++;
 		mask = ~ULTRA_CHANNEL_ENABLE_INTS;
 		rc1 = uisqueue_interlocked_and(virthbainfo->flags_addr, mask);
@@ -809,9 +809,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -835,9 +835,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -861,9 +861,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -1132,9 +1132,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	/* Okay see what our error_count is here.... */
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel != vdisk->channel)
-		    || (scsidev->id != vdisk->id)
-		    || (scsidev->lun != vdisk->lun))
+		if ((scsidev->channel != vdisk->channel) ||
+		    (scsidev->id != vdisk->id) ||
+		    (scsidev->lun != vdisk->lun))
 			continue;
 
 		if (atomic_read(&vdisk->error_count) < VIRTHBA_ERROR_COUNT) {
@@ -1170,8 +1170,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	if ((cmdrsp->scsi.cmnd[0] == INQUIRY)
-	    && (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
+	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
+	    (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
 		if (cmdrsp->scsi.no_disk_result == 0)
 			return;
 
@@ -1210,9 +1210,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	} else {
 		vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 		for ( ; vdisk->next; vdisk = vdisk->next) {
-			if ((scsidev->channel != vdisk->channel)
-			    || (scsidev->id != vdisk->id)
-			    || (scsidev->lun != vdisk->lun))
+			if ((scsidev->channel != vdisk->channel) ||
+			    (scsidev->id != vdisk->id) ||
+			    (scsidev->lun != vdisk->lun))
 				continue;
 
 			if (atomic_read(&vdisk->ios_threshold) > 0) {
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 04/10] staging: unisys: fix all logical continuation virthba
  2014-10-28 22:42 ` [PATCH 04/10] staging: unisys: fix all logical continuation virthba Erik Arfvidson
@ 2014-10-29  0:11   ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2014-10-29  0:11 UTC (permalink / raw)
  To: Erik Arfvidson
  Cc: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

On Tue, Oct 28, 2014 at 06:42:40PM -0400, Erik Arfvidson wrote:
> This patch fixes all logical continuations issues in virthba.c
> 
> v2: fixed spacing around bitwise operator suggested by dan carpenter

I said was ok with this stuff to be fixed in a later patch.  It slows
you down to redo everything and it's not like a missing space character
will ruin it forever.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 04/10] staging: unisys: fix all logical continuation virthba
  2014-10-28 22:42 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
@ 2014-10-28 22:42 ` Erik Arfvidson
  2014-10-29  0:11   ` Dan Carpenter
  0 siblings, 1 reply; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-28 22:42 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

This patch fixes all logical continuations issues in virthba.c

v2: fixed spacing around bitwise operator suggested by dan carpenter
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 44 ++++++++++++++++----------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index f30ef08..ee379b7 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -430,11 +430,11 @@ virthba_ISR(int irq, void *dev_id)
 		return IRQ_NONE;
 	virthbainfo->interrupts_rcvd++;
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
-	if (((readq(&pChannelHeader->features)
-	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
-	    && ((readq(&pChannelHeader->features) &
-		 ULTRA_IO_DRIVER_DISABLES_INTS) !=
-		0)) {
+	if (((readq(&pChannelHeader->features) &
+	      ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) &&
+	    ((readq(&pChannelHeader->features) &
+	      ULTRA_IO_DRIVER_DISABLES_INTS) !=
+	     0)) {
 		virthbainfo->interrupts_disabled++;
 		mask = ~ULTRA_CHANNEL_ENABLE_INTS;
 		rc1 = uisqueue_interlocked_and(virthbainfo->flags_addr, mask);
@@ -809,9 +809,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -835,9 +835,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -861,9 +861,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -1132,9 +1132,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	/* Okay see what our error_count is here.... */
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel != vdisk->channel)
-		    || (scsidev->id != vdisk->id)
-		    || (scsidev->lun != vdisk->lun))
+		if ((scsidev->channel != vdisk->channel) ||
+		    (scsidev->id != vdisk->id) ||
+		    (scsidev->lun != vdisk->lun))
 			continue;
 
 		if (atomic_read(&vdisk->error_count) < VIRTHBA_ERROR_COUNT) {
@@ -1170,8 +1170,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	if ((cmdrsp->scsi.cmnd[0] == INQUIRY)
-	    && (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
+	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
+	    (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
 		if (cmdrsp->scsi.no_disk_result == 0)
 			return;
 
@@ -1210,9 +1210,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	} else {
 		vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 		for ( ; vdisk->next; vdisk = vdisk->next) {
-			if ((scsidev->channel != vdisk->channel)
-			    || (scsidev->id != vdisk->id)
-			    || (scsidev->lun != vdisk->lun))
+			if ((scsidev->channel != vdisk->channel) ||
+			    (scsidev->id != vdisk->id) ||
+			    (scsidev->lun != vdisk->lun))
 				continue;
 
 			if (atomic_read(&vdisk->ios_threshold) > 0) {
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 04/10] staging: unisys: fix all logical continuation virthba
  2014-10-27 21:14 ` [PATCH 04/10] staging: unisys: fix all logical continuation virthba Erik Arfvidson
@ 2014-10-28  6:46   ` Dan Carpenter
  0 siblings, 0 replies; 18+ messages in thread
From: Dan Carpenter @ 2014-10-28  6:46 UTC (permalink / raw)
  To: Erik Arfvidson
  Cc: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer

On Mon, Oct 27, 2014 at 05:14:02PM -0400, Erik Arfvidson wrote:
> This patch fixes all logical continuations issues in virthba.c
> 
> Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
> ---
>  drivers/staging/unisys/virthba/virthba.c | 42 ++++++++++++++++----------------
>  1 file changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
> index 6c0ee48..73a7307 100644
> --- a/drivers/staging/unisys/virthba/virthba.c
> +++ b/drivers/staging/unisys/virthba/virthba.c
> @@ -431,10 +431,10 @@ virthba_ISR(int irq, void *dev_id)
>  	virthbainfo->interrupts_rcvd++;
>  	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
>  	if (((readq(&pChannelHeader->Features)
> -	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
> -	    && ((readq(&pChannelHeader->Features) &
> -		 ULTRA_IO_DRIVER_DISABLES_INTS) !=
> -		0)) {
> +	      &ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) &

This isn't right.

"&foo" means address.
"& foo" means bitwise AND.

"!= 0" doesn't add anything here.  When you have "if (strcmp(a, b) != 0)"
that's idiomatic and the != means "a != b".  When you are talking about
the number zero then not equal to zero can be appropriate.  But in this
case it's just a double negative that makes the code slightly not easier
to understand.

The "ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS" is clown shoes
name.  It's silly long.

Also the last & should be a logical &&.

You can fix this stuff up in a later patch since it doesn't have to do
with whitespace.

TODO-list: 2014-10-28: unisys: various style issues

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 04/10] staging: unisys: fix all logical continuation virthba
  2014-10-27 21:13 Erik Arfvidson
@ 2014-10-27 21:14 ` Erik Arfvidson
  2014-10-28  6:46   ` Dan Carpenter
  0 siblings, 1 reply; 18+ messages in thread
From: Erik Arfvidson @ 2014-10-27 21:14 UTC (permalink / raw)
  To: gregkh, sparmaintainer, driverdev-devel, jkc, benjamin.romer
  Cc: Erik Arfvidson

This patch fixes all logical continuations issues in virthba.c

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 42 ++++++++++++++++----------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 6c0ee48..73a7307 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -431,10 +431,10 @@ virthba_ISR(int irq, void *dev_id)
 	virthbainfo->interrupts_rcvd++;
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
 	if (((readq(&pChannelHeader->Features)
-	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
-	    && ((readq(&pChannelHeader->Features) &
-		 ULTRA_IO_DRIVER_DISABLES_INTS) !=
-		0)) {
+	      &ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) &
+	    ((readq(&pChannelHeader->Features) &
+	      ULTRA_IO_DRIVER_DISABLES_INTS) !=
+	     0)) {
 		virthbainfo->interrupts_disabled++;
 		mask = ~ULTRA_CHANNEL_ENABLE_INTS;
 		rc1 = uisqueue_interlocked_and(virthbainfo->flags_addr, mask);
@@ -808,9 +808,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -834,9 +834,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -860,9 +860,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -1131,9 +1131,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	/* Okay see what our error_count is here.... */
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel != vdisk->channel)
-		    || (scsidev->id != vdisk->id)
-		    || (scsidev->lun != vdisk->lun))
+		if ((scsidev->channel != vdisk->channel) ||
+		    (scsidev->id != vdisk->id) ||
+		    (scsidev->lun != vdisk->lun))
 			continue;
 
 		if (atomic_read(&vdisk->error_count) < VIRTHBA_ERROR_COUNT) {
@@ -1169,8 +1169,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	if ((cmdrsp->scsi.cmnd[0] == INQUIRY)
-	    && (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
+	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
+	    (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
 		if (cmdrsp->scsi.no_disk_result == 0)
 			return;
 
@@ -1209,9 +1209,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	} else {
 		vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 		for ( ; vdisk->next; vdisk = vdisk->next) {
-			if ((scsidev->channel != vdisk->channel)
-			    || (scsidev->id != vdisk->id)
-			    || (scsidev->lun != vdisk->lun))
+			if ((scsidev->channel != vdisk->channel) ||
+				(scsidev->id != vdisk->id) ||
+				(scsidev->lun != vdisk->lun))
 				continue;
 
 			if (atomic_read(&vdisk->ios_threshold) > 0) {
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-10-29 16:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-22 21:52 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
2014-10-22 21:52 ` [PATCH 02/10] staging: unisys: virthba fix all spaces after cast Erik Arfvidson
2014-10-22 21:52 ` [PATCH 03/10] staging: unisys: virthba fix all alingment issues Erik Arfvidson
2014-10-27 12:10   ` Dan Carpenter
2014-10-22 21:52 ` [PATCH 04/10] staging: unisys: fix all logical continuation virthba Erik Arfvidson
2014-10-22 21:52 ` [PATCH 05/10] staging: unisys: added spinlock comments visorchannel_funcs Erik Arfvidson
2014-10-27 12:10   ` Dan Carpenter
2014-10-22 21:52 ` [PATCH 06/10] staging: unisys: remove all unnecessary space after cast visorchannel_funcs Erik Arfvidson
2014-10-22 21:52 ` [PATCH 07/10] staging: unisys: fixed logical continuation visorchannel_funcs Erik Arfvidson
2014-10-22 21:52 ` [PATCH 08/10] staging: unisys: fixed aligment in visorchannel_funcs Erik Arfvidson
2014-10-22 21:52 ` [PATCH 09/10] staging: unisys: remove unnecessary blank line " Erik Arfvidson
2014-10-22 21:52 ` [PATCH 10/10] staging: unisys: fixed braces check " Erik Arfvidson
2014-10-25  3:46 ` [PATCH 01/10] staging: unisys: fix blank lines virthba Greg KH
2014-10-27 21:13 Erik Arfvidson
2014-10-27 21:14 ` [PATCH 04/10] staging: unisys: fix all logical continuation virthba Erik Arfvidson
2014-10-28  6:46   ` Dan Carpenter
2014-10-28 22:42 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
2014-10-28 22:42 ` [PATCH 04/10] staging: unisys: fix all logical continuation virthba Erik Arfvidson
2014-10-29  0:11   ` Dan Carpenter
2014-10-29 16:24 [PATCH 01/10] staging: unisys: fix blank lines virthba Erik Arfvidson
2014-10-29 16:25 ` [PATCH 04/10] staging: unisys: fix all logical continuation virthba Erik Arfvidson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.