DriverDev-Devel Archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/42] staging: unisys: More updates to the code
@ 2017-07-17 20:16 David Kershner
  2017-07-17 20:16 ` [PATCH 01/42] staging: unisys: visorbus: visorbus_main.c: use __func__ over hardcoded name David Kershner
                   ` (42 more replies)
  0 siblings, 43 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

This series fixes some more style issues with the code found
during our internal review.

Alex Curtin (5):
  staging: unisys: visorbus: controlvmchannel.h: removed VISOR_CONTROLVM_CHANNEL_SIGNATURE
  staging: unisys: visorbus: vbuschannel.h: removed VISOR_VBUS_CHANNEL_SIGNATURE
  staging: unisys: include: iochannel.h: removed VISOR_VHBA_CHANNEL_SIGNATURE
  staging: unisys: include: iochannel.h: removed VISOR_VNIC_CHANNEL_SIGNATURE
  staging: unisys: include: iochannel.h: removed VISOR_VSWITCH_CHANNEL_SIGNATURE

Charles Daniels (6):
  staging: unisys: include: Remove COVER macro from channel.h
  staging: unisys: visorbus: fix multi-line function definition
  staging: unisys: visorbus: visorchannel.c: fix multi-line function definition
  staging: unisys: visorhba: fix multi-line function definition
  staging: unisys: visorinput: fix multi-line function definition
  staging: unisys: visornic: fix multi-line function definition

David Binder (6):
  staging: unisys: visorbus: visorchipset.c: Adjust code layout
  staging: unisys: visorbus: visorbus_main.c: Adjust code layout
  staging: unisys: visorhba: visorhba_main.c: Adjust whitespace usage
  staging: unisys: visorinput: visorinput.c: Adjust whitespace usage
  staging: unisys: visornic: visornic_main.c: Adjust whitespace usage
  staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks

David Kershner (1):
  staging: unisys: visorbus: Remove unused define for visorchipset.

Erik Arfvidson (5):
  staging: unisys: visorbus: controlvmchannel.h: fix spacing
  staging: unisys: include: channel.h: remove unused pound defines
  staging: unisys: visorbus: rename fix_vbus_dev_info
  staging: unisys: visorbus: remove target_hostname comment
  staging: unisys: visorchipset: remove local_addr in handle_command

Mark Foresta (5):
  staging: unisys: visorbus: Update comment style vbuschannel.h
  staging: unisys: visorbus: fixed comment in visorbus_private.h
  staging: unisys: visorbus: removed blank line in viorbus_main.c
  staging: unisys: visorbus: Removed unused define from visorbus_main.c
  staging: unisys: visorbus: cleaned up include block of visorchipset.c

Sameer Wadgaonkar (9):
  staging: unisys: visorbus: convert VMCALL_CONTROLVM_ADDR enum to #define
  staging: unisys: visorbus: visorbus_main.c: remove extra checks for dev->visorchannel
  staging: unisys: visorbus: visorbus_main.c: put function name and return value on same line.
  staging: unisys: visorbus: visorbus_main.c: remove check from typename_show
  staging: unisys: visorbus: add checks for probe, remove, pause and resume in visorbus_register_visor_driver
  staging: unisys: remove unused define VISOR_VSWITCH_CHANNEL_VERSIONID
  staging: unisys: include: Remove unused CHANNEL_OK defines.
  staging: unisys: moved visor_check_channel from include/channel.h to visorbus/visorbus_main.c
  staging: unisys: visornic: update the struct viosrnic_devdata to have kernel-doc like comments

Zachary Dremann (2):
  staging: unisys: visorbus: visorbus_main.c: use __func__ over hardcoded name
  staging: unisys: visorbus: Fix memory leak

Zohaib (3):
  staging: unisys: visorbus: Beginning of the file /* on its own line
  staging: unisys: include: iochannel.h: Removed unused DEFINE
  staging: unisys: visorbus: Adding a new line between function definition

 drivers/staging/unisys/include/channel.h           |  63 +---
 drivers/staging/unisys/include/iochannel.h         |  21 +-
 drivers/staging/unisys/include/visorbus.h          |   4 +-
 drivers/staging/unisys/visorbus/controlvmchannel.h |  17 +-
 drivers/staging/unisys/visorbus/vbuschannel.h      |   5 +-
 drivers/staging/unisys/visorbus/visorbus_main.c    | 267 +++++++-------
 drivers/staging/unisys/visorbus/visorbus_private.h |   7 +-
 drivers/staging/unisys/visorbus/visorchannel.c     | 101 ++---
 drivers/staging/unisys/visorbus/visorchipset.c     | 243 ++++---------
 drivers/staging/unisys/visorbus/vmcallinterface.h  |   7 +-
 drivers/staging/unisys/visorhba/visorhba_main.c    |  48 +--
 drivers/staging/unisys/visorinput/visorinput.c     |  64 +--
 drivers/staging/unisys/visornic/visornic_main.c    | 201 +++++------
 13 files changed, 437 insertions(+), 611 deletions(-)

base-commit: 874bcba65f9a3a2a304b5f520529c046887c3cdc
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 01/42] staging: unisys: visorbus: visorbus_main.c: use __func__ over hardcoded name
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 02/42] staging: unisys: visorbus: visorchipset.c: Adjust code layout David Kershner
                   ` (41 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Zachary Dremann

From: Zachary Dremann <dremann@gmail.com>

As reported by checkpatch.pl, replace hard-coded usage of the current
function's name in format string with usage of __func__.

Signed-off-by: Zachary Dremann <dremann@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index f884b59..2c79673 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -1039,7 +1039,7 @@ visorbus_create_instance(struct visor_device *dev)
 err_debugfs_dir:
 	debugfs_remove_recursive(dev->debugfs_dir);
 	kfree(hdr_info);
-	dev_err(&dev->device, "visorbus_create_instance failed: %d\n", err);
+	dev_err(&dev->device, "%s failed: %d\n", __func__, err);
 	return err;
 }
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 02/42] staging: unisys: visorbus: visorchipset.c: Adjust code layout
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
  2017-07-17 20:16 ` [PATCH 01/42] staging: unisys: visorbus: visorbus_main.c: use __func__ over hardcoded name David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 03/42] staging: unisys: visorbus: visorbus_main.c: " David Kershner
                   ` (40 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

From: David Binder <david.binder@unisys.com>

Adjusts the ordering of function statements, as well as modifies whitespace
usage, in order to create a more uniform coding style.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 30 +++++--------------
 1 file changed, 9 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 7d37a00..1106eb5 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -124,7 +124,6 @@ static ssize_t toolaction_store(struct device *dev,
 				 offsetof(struct visor_controlvm_channel,
 					  tool_action),
 				 &tool_action, sizeof(u8));
-
 	if (err)
 		return err;
 	return count;
@@ -143,7 +142,6 @@ static ssize_t boottotool_show(struct device *dev,
 					 efi_visor_ind),
 				&efi_visor_indication,
 				sizeof(struct efi_visor_indication));
-
 	if (err)
 		return err;
 	return sprintf(buf, "%u\n", efi_visor_indication.boot_to_tool);
@@ -165,7 +163,6 @@ static ssize_t boottotool_store(struct device *dev,
 					  efi_visor_ind),
 				 &(efi_visor_indication),
 				 sizeof(struct efi_visor_indication));
-
 	if (err)
 		return err;
 	return count;
@@ -302,11 +299,12 @@ parser_string_get(struct parser_context *ctx)
 	int i;
 
 	pscan = ctx->curr;
+	if (!pscan)
+		return NULL;
 	nscan = ctx->bytes_remaining;
 	if (nscan == 0)
 		return NULL;
-	if (!pscan)
-		return NULL;
+
 	for (i = 0, value_length = -1; i < nscan; i++)
 		if (pscan[i] == '\0') {
 			value_length = i;
@@ -315,6 +313,7 @@ parser_string_get(struct parser_context *ctx)
 	/* '\0' was not included in the length */
 	if (value_length < 0)
 		value_length = nscan;
+
 	value = kmalloc(value_length + 1, GFP_KERNEL);
 	if (!value)
 		return NULL;
@@ -619,11 +618,11 @@ visorbus_create(struct controlvm_message *inmsg)
 					   cmd->create_bus.channel_bytes,
 					   GFP_KERNEL,
 					   cmd->create_bus.bus_data_type_uuid);
-
 	if (!visorchannel) {
 		err = -ENOMEM;
 		goto err_free_pending_msg;
 	}
+
 	bus_info->visorchannel = visorchannel;
 
 	/* Response will be handled by visorchipset_bus_create */
@@ -758,7 +757,6 @@ visorbus_device_create(struct controlvm_message *inmsg)
 		err = -ENODEV;
 		goto err_respond;
 	}
-
 	if (bus_info->state.created == 0) {
 		dev_err(&chipset_dev->acpi_device->dev,
 			"bus not created, id: %d\n", bus_no);
@@ -792,7 +790,6 @@ visorbus_device_create(struct controlvm_message *inmsg)
 					     cmd->create_device.channel_bytes,
 					     GFP_KERNEL,
 					     cmd->create_device.data_type_uuid);
-
 	if (!visorchannel) {
 		dev_err(&chipset_dev->acpi_device->dev,
 			"failed to create visorchannel: %d/%d\n",
@@ -919,7 +916,6 @@ visorbus_device_destroy(struct controlvm_message *inmsg)
 		err = -EINVAL;
 		goto err_respond;
 	}
-
 	if (dev_info->pending_msg_hdr) {
 		/* only non-NULL if dev is still waiting on a response */
 		err = -EIO;
@@ -955,8 +951,7 @@ visorbus_device_destroy(struct controlvm_message *inmsg)
  * disable the specified device. The udev script then writes to
  * /sys/devices/platform/visorchipset/parahotplug, which causes the
  * parahotplug store functions to get called, at which point the
- * appropriate CONTROLVM message is retrieved from the list and responded
- * to.
+ * appropriate CONTROLVM message is retrieved from the list and responded to.
  */
 
 #define PARAHOTPLUG_TIMEOUT_MS 2000
@@ -1203,7 +1198,6 @@ parahotplug_process_message(struct controlvm_message *inmsg)
 	int err;
 
 	req = parahotplug_request_create(inmsg);
-
 	if (!req)
 		return -ENOMEM;
 
@@ -1297,10 +1291,9 @@ chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
 static int
 chipset_notready_uevent(struct controlvm_message_header *msg_hdr)
 {
-	int res;
-
-	res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj,
+	int res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj,
 			     KOBJ_OFFLINE);
+
 	if (msg_hdr->flags.response_expected)
 		controlvm_respond(msg_hdr, res, NULL);
 
@@ -1323,7 +1316,6 @@ static int unisys_vmcall(unsigned long tuple, unsigned long param)
 
 	__asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
 		"a"(tuple), "b"(reg_ebx), "c"(reg_ecx));
-
 	if (result)
 		goto error;
 
@@ -1694,9 +1686,7 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
 static int
 read_controlvm_event(struct controlvm_message *msg)
 {
-	int err;
-
-	err = visorchannel_signalremove(chipset_dev->controlvm_channel,
+	int err = visorchannel_signalremove(chipset_dev->controlvm_channel,
 					CONTROLVM_QUEUE_EVENT, msg);
 	if (err)
 		return err;
@@ -1831,12 +1821,10 @@ visorchipset_init(struct acpi_device *acpi_device)
 		goto error;
 
 	acpi_device->driver_data = chipset_dev;
-
 	chipset_dev->acpi_device = acpi_device;
 	chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
 	controlvm_channel = visorchannel_create_with_lock(addr,
 							  0, GFP_KERNEL, uuid);
-
 	if (!controlvm_channel)
 		goto error_free_chipset_dev;
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 03/42] staging: unisys: visorbus: visorbus_main.c: Adjust code layout
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
  2017-07-17 20:16 ` [PATCH 01/42] staging: unisys: visorbus: visorbus_main.c: use __func__ over hardcoded name David Kershner
  2017-07-17 20:16 ` [PATCH 02/42] staging: unisys: visorbus: visorchipset.c: Adjust code layout David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 04/42] staging: unisys: visorhba: visorhba_main.c: Adjust whitespace usage David Kershner
                   ` (39 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

From: David Binder <david.binder@unisys.com>

Adjusts the ordering of function statements, as well as modifies
whitespace usage, in order to create a more uniform coding style.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 28 +++++++-----------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 2c79673..7823593 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -103,9 +103,8 @@ visorbus_match(struct device *xdev, struct device_driver *xdrv)
 	struct visor_driver *drv;
 
 	dev = to_visor_device(xdev);
-	drv = to_visor_driver(xdrv);
 	channel_type = visorchannel_get_uuid(dev->visorchannel);
-
+	drv = to_visor_driver(xdrv);
 	if (!drv->channel_types)
 		return 0;
 
@@ -361,6 +360,7 @@ static const struct attribute_group *visorbus_groups[] = {
  *  define & implement display of debugfs attributes under
  *  /sys/kernel/debug/visorbus/visorbus<n>.
  */
+
 /*
  * vbuschannel_print_devinfo() - format a struct visor_vbus_deviceinfo
  *                               and write it to a seq_file
@@ -399,12 +399,11 @@ vbuschannel_print_devinfo(struct visor_vbus_deviceinfo *devinfo,
 
 static int client_bus_info_debugfs_show(struct seq_file *seq, void *v)
 {
-	struct visor_device *vdev = seq->private;
-	struct visorchannel *channel = vdev->visorchannel;
-
-	int i;
+	int i = 0;
 	unsigned long off;
 	struct visor_vbus_deviceinfo dev_info;
+	struct visor_device *vdev = seq->private;
+	struct visorchannel *channel = vdev->visorchannel;
 
 	if (!channel)
 		return 0;
@@ -413,6 +412,7 @@ static int client_bus_info_debugfs_show(struct seq_file *seq, void *v)
 		   "Client device / client driver info for %s partition (vbus #%u):\n",
 		   ((vdev->name) ? (char *)(vdev->name) : ""),
 		   vdev->chipset_bus_no);
+
 	if (visorchannel_read(channel,
 			      offsetof(struct visor_vbus_channel, chp_info),
 			      &dev_info, sizeof(dev_info)) >= 0)
@@ -421,8 +421,8 @@ static int client_bus_info_debugfs_show(struct seq_file *seq, void *v)
 			      offsetof(struct visor_vbus_channel, bus_info),
 			      &dev_info, sizeof(dev_info)) >= 0)
 		vbuschannel_print_devinfo(&dev_info, seq, -1);
+
 	off = offsetof(struct visor_vbus_channel, dev_info);
-	i = 0;
 	while (off + sizeof(dev_info) <= visorchannel_get_nbytes(channel)) {
 		if (visorchannel_read(channel, off, &dev_info,
 				      sizeof(dev_info)) >= 0)
@@ -499,14 +499,16 @@ visordriver_remove_device(struct device *xdev)
 
 	dev = to_visor_device(xdev);
 	drv = to_visor_driver(xdev->driver);
+
 	mutex_lock(&dev->visordriver_callback_lock);
 	dev->being_removed = true;
 	if (drv->remove)
 		drv->remove(dev);
 	mutex_unlock(&dev->visordriver_callback_lock);
-	dev_stop_periodic_work(dev);
 
+	dev_stop_periodic_work(dev);
 	put_device(&dev->device);
+
 	return 0;
 }
 
@@ -861,7 +863,6 @@ fix_vbus_dev_info(struct visor_device *visordev)
 
 	bus_device_info_init(&dev_info, chan_type_name, visordrv->name);
 	write_vbus_dev_info(bdev->visorchannel, hdr_info, &dev_info, dev_no);
-
 	write_vbus_chp_info(bdev->visorchannel, hdr_info, &chipset_driverinfo);
 	write_vbus_bus_info(bdev->visorchannel, hdr_info,
 			    &clientbus_driverinfo);
@@ -889,9 +890,8 @@ visordriver_probe_device(struct device *xdev)
 	struct visor_driver *drv;
 	struct visor_device *dev;
 
-	drv = to_visor_driver(xdev->driver);
 	dev = to_visor_device(xdev);
-
+	drv = to_visor_driver(xdev->driver);
 	if (!drv->probe)
 		return -ENODEV;
 
@@ -1089,7 +1089,6 @@ visorchipset_bus_create(struct visor_device *dev)
 	int err;
 
 	err = visorbus_create_instance(dev);
-
 	if (err < 0)
 		return err;
 
@@ -1123,7 +1122,6 @@ void
 visorchipset_device_destroy(struct visor_device *dev_info)
 {
 	remove_visor_device(dev_info);
-
 	visorbus_device_destroy_response(dev_info, 0);
 }
 
@@ -1143,7 +1141,6 @@ pause_state_change_complete(struct visor_device *dev, int status)
 		return;
 
 	dev->pausing = false;
-
 	visorbus_device_pause_response(dev, status);
 }
 
@@ -1233,7 +1230,6 @@ visorchipset_device_pause(struct visor_device *dev_info)
 	int err;
 
 	err = visorchipset_initiate_device_pause_resume(dev_info, true);
-
 	if (err < 0) {
 		dev_info->pausing = false;
 		return err;
@@ -1256,7 +1252,6 @@ visorchipset_device_resume(struct visor_device *dev_info)
 	int err;
 
 	err = visorchipset_initiate_device_pause_resume(dev_info, false);
-
 	if (err < 0) {
 		dev_info->resuming = false;
 		return err;
@@ -1281,7 +1276,6 @@ visorbus_init(void)
 		return err;
 
 	initialized = true;
-
 	bus_device_info_init(&chipset_driverinfo, "chipset", "visorchipset");
 
 	return 0;
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 04/42] staging: unisys: visorhba: visorhba_main.c: Adjust whitespace usage
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (2 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 03/42] staging: unisys: visorbus: visorbus_main.c: " David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 05/42] staging: unisys: visorinput: visorinput.c: " David Kershner
                   ` (38 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

From: David Binder <david.binder@unisys.com>

Removes unnecessary blank lines to create a more uniform coding style.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorhba/visorhba_main.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index b48a221..17468bf 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -212,7 +212,6 @@ static void *del_scsipending_ent(struct visorhba_devdata *devdata,
 
 	spin_lock_irqsave(&devdata->privlock, flags);
 	sent = devdata->pending[del].sent;
-
 	devdata->pending[del].cmdtype = 0;
 	devdata->pending[del].sent = NULL;
 	spin_unlock_irqrestore(&devdata->privlock, flags);
@@ -514,12 +513,10 @@ visorhba_queue_command_lck(struct scsi_cmnd *scsicmd,
 
 	insert_location = add_scsipending_entry(devdata, CMD_SCSI_TYPE,
 						(void *)scsicmd);
-
 	if (insert_location < 0)
 		return SCSI_MLQUEUE_DEVICE_BUSY;
 
 	cmdrsp = get_scsipending_cmdrsp(devdata, insert_location);
-
 	cmdrsp->cmdtype = CMD_SCSI_TYPE;
 	/* save the pending insertion location. Deletion from pending
 	 * will return the scsicmd pointer for completion
@@ -535,7 +532,6 @@ visorhba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	/* save datadir */
 	cmdrsp->scsi.data_dir = scsicmd->sc_data_direction;
 	memcpy(cmdrsp->scsi.cmnd, cdb, MAX_CMND_SIZE);
-
 	cmdrsp->scsi.bufflen = scsi_bufflen(scsicmd);
 
 	/* keep track of the max buffer length so far. */
@@ -716,7 +712,6 @@ static void complete_taskmgmt_command(struct idr *idrtable,
 		idr_find(idrtable, cmdrsp->scsitaskmgmt.notify_handle);
 	int *scsi_result_ptr =
 		idr_find(idrtable, cmdrsp->scsitaskmgmt.notifyresult_handle);
-
 	if (unlikely(!(wq && scsi_result_ptr))) {
 		pr_err("visorhba: no completion context; cmd will time out\n");
 		return;
@@ -954,7 +949,6 @@ drain_queue(struct uiscmdrsp *cmdrsp, struct visorhba_devdata *devdata)
 					      IOCHAN_FROM_IOPART,
 					      cmdrsp))
 			break;
-
 		if (cmdrsp->cmdtype == CMD_SCSI_TYPE) {
 			/* scsicmd location is returned by the
 			 * deletion
@@ -1057,7 +1051,6 @@ static int visorhba_resume(struct visor_device *dev,
 
 	devdata->thread = visor_thread_start(process_incoming_rsps, devdata,
 					     "vhba_incming");
-
 	devdata->serverdown = false;
 	devdata->serverchangingstate = false;
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 05/42] staging: unisys: visorinput: visorinput.c: Adjust whitespace usage
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (3 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 04/42] staging: unisys: visorhba: visorhba_main.c: Adjust whitespace usage David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-18  8:33   ` Dan Carpenter
  2017-07-17 20:16 ` [PATCH 06/42] staging: unisys: visornic: visornic_main.c: " David Kershner
                   ` (37 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

From: David Binder <david.binder@unisys.com>

Adjusts whitespace usage in order to create a more uniform coding style.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorinput/visorinput.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index c15f28f..761e56b 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -261,7 +261,6 @@ static void visorinput_close(struct input_dev *visorinput_dev)
 	 * interrupts should be disabled so when we resume we will
 	 * not re-enable them.
 	 */
-
 	mutex_lock(&devdata->lock_visor_dev);
 	devdata->interrupts_enabled = false;
 	if (devdata->paused)
@@ -283,9 +282,8 @@ setup_client_keyboard(void *devdata,  /* opaque on purpose */
 
 {
 	int i;
-	struct input_dev *visorinput_dev;
+	struct input_dev *visorinput_dev = input_allocate_device();
 
-	visorinput_dev = input_allocate_device();
 	if (!visorinput_dev)
 		return NULL;
 
@@ -324,11 +322,10 @@ setup_client_keyboard(void *devdata,  /* opaque on purpose */
 static struct input_dev *
 setup_client_mouse(void *devdata /* opaque on purpose */)
 {
-	struct input_dev *visorinput_dev = NULL;
 	int xres, yres;
 	struct fb_info *fb0;
+	struct input_dev *visorinput_dev = input_allocate_device();
 
-	visorinput_dev = input_allocate_device();
 	if (!visorinput_dev)
 		return NULL;
 
@@ -543,7 +540,7 @@ scancode_to_keycode(int scancode)
 	if (scancode > 0xff)
 		return visorkbd_ext_keycode[(scancode >> 8) & 0xff];
 
-	return  visorkbd_keycode[scancode];
+	return visorkbd_keycode[scancode];
 }
 
 static int
@@ -574,7 +571,6 @@ visorinput_channel_interrupt(struct visor_device *dev)
 	struct input_dev *visorinput_dev;
 	int xmotion, ymotion, button;
 	int i;
-
 	struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
 
 	if (!devdata)
@@ -630,7 +626,6 @@ visorinput_channel_interrupt(struct visor_device *dev)
 			if (button < 0)
 				break;
 			input_report_key(visorinput_dev, button, 1);
-
 			input_sync(visorinput_dev);
 			input_report_key(visorinput_dev, button, 0);
 			input_sync(visorinput_dev);
@@ -685,7 +680,6 @@ visorinput_pause(struct visor_device *dev,
 	 * due to above, at this time no thread of execution will be
 	 * in visorinput_channel_interrupt()
 	 */
-
 	devdata->paused = true;
 	complete_func(dev, 0);
 	rc = 0;
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 06/42] staging: unisys: visornic: visornic_main.c: Adjust whitespace usage
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (4 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 05/42] staging: unisys: visorinput: visorinput.c: " David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 07/42] staging: unisys: visorbus: controlvmchannel.h: fix spacing David Kershner
                   ` (36 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

From: David Binder <david.binder@unisys.com>

Adjusts whitespace usage in order to create a more uniform coding style.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visornic/visornic_main.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 5c2614b..5ae8401 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -312,9 +312,7 @@ static const struct file_operations debugfs_enable_ints_fops = {
 static void
 visornic_serverdown_complete(struct visornic_devdata *devdata)
 {
-	struct net_device *netdev;
-
-	netdev = devdata->netdev;
+	struct net_device *netdev = devdata->netdev;
 
 	/* Stop polling for interrupts */
 	del_timer_sync(&devdata->irq_poll_timer);
@@ -450,7 +448,6 @@ post_skb(struct uiscmdrsp *cmdrsp,
 
 	atomic_inc(&devdata->num_rcvbuf_in_iovm);
 	devdata->chstat.sent_post++;
-
 	return 0;
 }
 
@@ -492,7 +489,6 @@ send_enbdis(struct net_device *netdev, int state,
  *	are disabled, reclaim memory from rcv bufs.
  *	Returns 0 on success, negative for failure of IO Partition
  *	responding.
- *
  */
 static int
 visornic_disable_with_timeout(struct net_device *netdev, const int timeout)
@@ -711,7 +707,6 @@ visornic_enable_with_timeout(struct net_device *netdev, const int timeout)
 	}
 
 	netif_start_queue(netdev);
-
 	return 0;
 }
 
@@ -769,7 +764,6 @@ static int
 visornic_open(struct net_device *netdev)
 {
 	visornic_enable_with_timeout(netdev, VISORNIC_INFINITE_RSP_WAIT);
-
 	return 0;
 }
 
@@ -784,7 +778,6 @@ static int
 visornic_close(struct net_device *netdev)
 {
 	visornic_disable_with_timeout(netdev, VISORNIC_INFINITE_RSP_WAIT);
-
 	return 0;
 }
 
@@ -954,6 +947,7 @@ visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
 	 * - everything else will be pass in frags & DMA'ed
 	 */
 	memcpy(cmdrsp->net.xmt.ethhdr, skb->data, ETH_HLEN);
+
 	/* copy frags info - from skb->data we need to only provide access
 	 * beyond eth header
 	 */
@@ -1333,9 +1327,7 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
 	 * sets up skb->pkt_type & it also PULLS out the eth header
 	 */
 	skb->protocol = eth_type_trans(skb, netdev);
-
 	eth = eth_hdr(skb);
-
 	skb->csum = 0;
 	skb->ip_summed = CHECKSUM_NONE;
 
@@ -2184,7 +2176,6 @@ static int visornic_init(void)
 
 cleanup_debugfs:
 	debugfs_remove_recursive(visornic_debugfs_dir);
-
 	return err;
 }
 
@@ -2196,7 +2187,6 @@ static int visornic_init(void)
 static void visornic_cleanup(void)
 {
 	visorbus_unregister_visor_driver(&visornic_driver);
-
 	debugfs_remove_recursive(visornic_debugfs_dir);
 }
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 07/42] staging: unisys: visorbus: controlvmchannel.h: fix spacing
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (5 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 06/42] staging: unisys: visornic: visornic_main.c: " David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 08/42] staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks David Kershner
                   ` (35 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Erik Arfvidson

From: Erik Arfvidson <erik.arfvidson@gmail.com>

This patch fixes space and tab aligned comments in
controlvmchannel.h.

Signed-off-by: Erik Arfvidson <erik.arfvidson@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/controlvmchannel.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h b/drivers/staging/unisys/visorbus/controlvmchannel.h
index dd3aff0..eeaf121 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -45,10 +45,10 @@
 			     VISOR_CONTROLVM_CHANNEL_SIGNATURE))
 
 /* Defines for various channel queues */
-#define CONTROLVM_QUEUE_REQUEST	 0
-#define CONTROLVM_QUEUE_RESPONSE 1
-#define CONTROLVM_QUEUE_EVENT	 2
-#define CONTROLVM_QUEUE_ACK	 3
+#define CONTROLVM_QUEUE_REQUEST		0
+#define CONTROLVM_QUEUE_RESPONSE	1
+#define CONTROLVM_QUEUE_EVENT		2
+#define CONTROLVM_QUEUE_ACK		3
 
 /* Max num of messages stored during IOVM creation to be reused after crash */
 #define CONTROLVM_CRASHMSG_MAX 2
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 08/42] staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (6 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 07/42] staging: unisys: visorbus: controlvmchannel.h: fix spacing David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-18  6:41   ` Greg KH
  2017-07-17 20:16 ` [PATCH 09/42] staging: unisys: include: channel.h: remove unused pound defines David Kershner
                   ` (34 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

From: David Binder <david.binder@unisys.com>

Removes unnecessary checks for a NULL pointer in a non-API function.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorhba/visorhba_main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 17468bf..1b4b338 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -141,9 +141,6 @@ static struct task_struct *visor_thread_start
  */
 static void visor_thread_stop(struct task_struct *task)
 {
-	/* no thread running */
-	if (!task)
-		return;
 	kthread_stop(task);
 }
 
@@ -829,7 +826,7 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 static int set_no_disk_inquiry_result(unsigned char *buf,
 				      size_t len, bool is_lun0)
 {
-	if (!buf || len < NO_DISK_INQUIRY_RESULT_LEN)
+	if (len < NO_DISK_INQUIRY_RESULT_LEN)
 		return -EINVAL;
 	memset(buf, 0, NO_DISK_INQUIRY_RESULT_LEN);
 	buf[2] = SCSI_SPC2_VER;
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 09/42] staging: unisys: include: channel.h: remove unused pound defines
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (7 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 08/42] staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 10/42] staging: unisys: visorbus: controlvmchannel.h: removed VISOR_CONTROLVM_CHANNEL_SIGNATURE David Kershner
                   ` (33 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Erik Arfvidson

From: Erik Arfvidson <erik.arfvidson@gmail.com>

This patch removes all the unused pound defines currently in
channel.h.

Signed-off-by: Erik Arfvidson <erik.arfvidson@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/channel.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h
index fef1b0d..03275d2 100644
--- a/drivers/staging/unisys/include/channel.h
+++ b/drivers/staging/unisys/include/channel.h
@@ -21,13 +21,9 @@
 #include <linux/io.h>
 #include <linux/uuid.h>
 
-#define __SUPERVISOR_CHANNEL_H__
-
 #define SIGNATURE_16(A, B) ((A) | ((B) << 8))
 #define SIGNATURE_32(A, B, C, D) \
 	(SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
-#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
-	(SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
 
 #ifndef COVER
 #define COVER(v, d) ((d) * DIV_ROUND_UP(v, d))
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 10/42] staging: unisys: visorbus: controlvmchannel.h: removed VISOR_CONTROLVM_CHANNEL_SIGNATURE
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (8 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 09/42] staging: unisys: include: channel.h: remove unused pound defines David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 11/42] staging: unisys: visorbus: vbuschannel.h: removed VISOR_VBUS_CHANNEL_SIGNATURE David Kershner
                   ` (32 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

From: Alex Curtin <alexander.curtin@unisys.com>

VISOR_CONTROLVM_CHANNEL_SIGNATURE points to VISOR_CHANNEL_SIGNATURE, so
this replaces the redundant definition with VISOR_CHANNEL_SIGNATURE.

Signed-off-by: Alex Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/controlvmchannel.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h b/drivers/staging/unisys/visorbus/controlvmchannel.h
index eeaf121..9be17fb 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -24,7 +24,6 @@
 	UUID_LE(0x2b3c2d10, 0x7ef5, 0x4ad8, \
 		0xb9, 0x66, 0x34, 0x48, 0xb7, 0x38, 0x6b, 0x3d)
 
-#define VISOR_CONTROLVM_CHANNEL_SIGNATURE VISOR_CHANNEL_SIGNATURE
 #define CONTROLVM_MESSAGE_MAX 64
 
 /*
@@ -42,7 +41,7 @@
 			     "controlvm", \
 			     sizeof(struct visor_controlvm_channel), \
 			     VISOR_CONTROLVM_CHANNEL_VERSIONID, \
-			     VISOR_CONTROLVM_CHANNEL_SIGNATURE))
+			     VISOR_CHANNEL_SIGNATURE))
 
 /* Defines for various channel queues */
 #define CONTROLVM_QUEUE_REQUEST		0
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 11/42] staging: unisys: visorbus: vbuschannel.h: removed VISOR_VBUS_CHANNEL_SIGNATURE
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (9 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 10/42] staging: unisys: visorbus: controlvmchannel.h: removed VISOR_CONTROLVM_CHANNEL_SIGNATURE David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 12/42] staging: unisys: include: iochannel.h: removed VISOR_VHBA_CHANNEL_SIGNATURE David Kershner
                   ` (31 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Alex Curtin

From: Alex Curtin <alexander.curtin@unisys.com>

VISOR_VBUS_CHANNEL_SIGNATURE just pointed to VISOR_CHANNEL_SIGNATURE, so
this replaces the redundant definition with VISOR_CHANNEL_SIGNATURE.

Signed-off-by: Alex Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/vbuschannel.h   | 2 --
 drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h
index 56114f5..2c820e2 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/staging/unisys/visorbus/vbuschannel.h
@@ -34,8 +34,6 @@
 	UUID_LE(0x193b331b, 0xc58f, 0x11da, \
 		0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
 
-#define VISOR_VBUS_CHANNEL_SIGNATURE VISOR_CHANNEL_SIGNATURE
-
 /*
  * Must increment this whenever you insert or delete fields within this channel
  * struct.  Also increment whenever you change the meaning of fields within this
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 7823593..1a212ec 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -701,7 +701,7 @@ get_vbus_header_info(struct visorchannel *chan,
 				 "vbus",
 				 sizeof(struct visor_vbus_channel),
 				 VISOR_VBUS_CHANNEL_VERSIONID,
-				 VISOR_VBUS_CHANNEL_SIGNATURE))
+				 VISOR_CHANNEL_SIGNATURE))
 		return -EINVAL;
 
 	err = visorchannel_read(chan, sizeof(struct channel_header), hdr_info,
-- 
git-series 0.9.1

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

* [PATCH 12/42] staging: unisys: include: iochannel.h: removed VISOR_VHBA_CHANNEL_SIGNATURE
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (10 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 11/42] staging: unisys: visorbus: vbuschannel.h: removed VISOR_VBUS_CHANNEL_SIGNATURE David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 13/42] staging: unisys: include: iochannel.h: removed VISOR_VNIC_CHANNEL_SIGNATURE David Kershner
                   ` (30 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

From: Alex Curtin <alexander.curtin@unisys.com>

VISOR_VHBA_CHANNEL_SIGNATURE is a redundant definition that points to
VISOR_CHANNEL_SIGNATURE. This replaces that definition with
VISOR_CHANNEL_SIGNATURE.

Signed-off-by: Alex Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/iochannel.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 12849bb..797db9f 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -31,7 +31,6 @@
 #include <linux/dma-direction.h>
 #include "channel.h"
 
-#define VISOR_VHBA_CHANNEL_SIGNATURE VISOR_CHANNEL_SIGNATURE
 #define VISOR_VNIC_CHANNEL_SIGNATURE VISOR_CHANNEL_SIGNATURE
 #define VISOR_VSWITCH_CHANNEL_SIGNATURE VISOR_CHANNEL_SIGNATURE
 
@@ -50,7 +49,7 @@
 	(visor_check_channel(ch, visor_vhba_channel_uuid, \
 			     "vhba", MIN_IO_CHANNEL_SIZE, \
 			     VISOR_VHBA_CHANNEL_VERSIONID, \
-			     VISOR_VHBA_CHANNEL_SIGNATURE))
+			     VISOR_CHANNEL_SIGNATURE))
 
 #define VISOR_VNIC_CHANNEL_OK_CLIENT(ch) \
 	(visor_check_channel(ch, visor_vnic_channel_uuid, \
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 13/42] staging: unisys: include: iochannel.h: removed VISOR_VNIC_CHANNEL_SIGNATURE
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (11 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 12/42] staging: unisys: include: iochannel.h: removed VISOR_VHBA_CHANNEL_SIGNATURE David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 14/42] staging: unisys: include: iochannel.h: removed VISOR_VSWITCH_CHANNEL_SIGNATURE David Kershner
                   ` (29 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

From: Alex Curtin <alexander.curtin@unisys.com>

VISOR_VNIC_CHANNEL_SIGNATURE is a redundant definition that points to
VISOR_CHANNEL_SIGNATURE. This replaces that definition with
VISOR_CHANNEL_SIGNATURE.

Signed-off-by: Alex Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/iochannel.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 797db9f..8a86762 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -31,7 +31,6 @@
 #include <linux/dma-direction.h>
 #include "channel.h"
 
-#define VISOR_VNIC_CHANNEL_SIGNATURE VISOR_CHANNEL_SIGNATURE
 #define VISOR_VSWITCH_CHANNEL_SIGNATURE VISOR_CHANNEL_SIGNATURE
 
 /*
@@ -55,7 +54,7 @@
 	(visor_check_channel(ch, visor_vnic_channel_uuid, \
 			     "vnic", MIN_IO_CHANNEL_SIZE, \
 			     VISOR_VNIC_CHANNEL_VERSIONID, \
-			     VISOR_VNIC_CHANNEL_SIGNATURE))
+			     VISOR_CHANNEL_SIGNATURE))
 
 /*
  * Everything necessary to handle SCSI & NIC traffic between Guest Partition and
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 14/42] staging: unisys: include: iochannel.h: removed VISOR_VSWITCH_CHANNEL_SIGNATURE
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (12 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 13/42] staging: unisys: include: iochannel.h: removed VISOR_VNIC_CHANNEL_SIGNATURE David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 15/42] staging: unisys: visorbus: convert VMCALL_CONTROLVM_ADDR enum to #define David Kershner
                   ` (28 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Alex Curtin

From: Alex Curtin <alexander.curtin@unisys.com>

VISOR_VSWITCH_CHANNEL_SIGNATURE is a redundant definition that points to
VISOR_CHANNEL_SIGNATURE. It wasn't being used, so it has been removed.

Signed-off-by: Alex Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/iochannel.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 8a86762..c39451b 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -31,8 +31,6 @@
 #include <linux/dma-direction.h>
 #include "channel.h"
 
-#define VISOR_VSWITCH_CHANNEL_SIGNATURE VISOR_CHANNEL_SIGNATURE
-
 /*
  * Must increment these whenever you insert or delete fields within this channel
  * struct. Also increment whenever you change the meaning of fields within this
-- 
git-series 0.9.1

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

* [PATCH 15/42] staging: unisys: visorbus: convert VMCALL_CONTROLVM_ADDR enum to #define
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (13 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 14/42] staging: unisys: include: iochannel.h: removed VISOR_VSWITCH_CHANNEL_SIGNATURE David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 16/42] staging: unisys: visorbus: visorbus_main.c: remove extra checks for dev->visorchannel David Kershner
                   ` (27 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

VMCALL_CONTROLVM_ADDR is the only element left in enum
vmcall_monitor_interface_method_tuple. Converting it to a #define.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/vmcallinterface.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/vmcallinterface.h b/drivers/staging/unisys/visorbus/vmcallinterface.h
index de6693f..541911b 100644
--- a/drivers/staging/unisys/visorbus/vmcallinterface.h
+++ b/drivers/staging/unisys/visorbus/vmcallinterface.h
@@ -17,8 +17,7 @@
 #define __VMCALLINTERFACE_H__
 
 /*
- * enum vmcall_monitor_interface_method_tuple - VMCALL identification tuples.
- * @VMCALL_CONTROLVM_ADDR: Used by all guests, not just IO.
+ * VMCALL_CONTROLVM_ADDR: Used by all guests, not just IO.
  *
  * Note: When a new VMCALL is added:
  * - The 1st 2 hex digits correspond to one of the VMCALL_MONITOR_INTERFACE
@@ -29,9 +28,7 @@
  * - The 0x01 identifies it as the 1st instance of a VMCALL_VIRTPART type of
  *   VMCALL.
  */
-enum vmcall_monitor_interface_method_tuple {
-	VMCALL_CONTROLVM_ADDR = 0x0501,
-};
+#define VMCALL_CONTROLVM_ADDR 0x0501
 
 enum vmcall_result {
 	VMCALL_RESULT_SUCCESS = 0,
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 16/42] staging: unisys: visorbus: visorbus_main.c: remove extra checks for dev->visorchannel
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (14 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 15/42] staging: unisys: visorbus: convert VMCALL_CONTROLVM_ADDR enum to #define David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 17/42] staging: unisys: visorbus: visorbus_main.c: put function name and return value on same line David Kershner
                   ` (26 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

Removed checks for dev->visorchannel in visorbus_release_device()
and visorbus_remove_instance() since it is also checked in the
visorchannel_destroy() function.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 1a212ec..bdebd58 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -156,10 +156,7 @@ visorbus_release_device(struct device *xdev)
 {
 	struct visor_device *dev = to_visor_device(xdev);
 
-	if (dev->visorchannel) {
-		visorchannel_destroy(dev->visorchannel);
-		dev->visorchannel = NULL;
-	}
+	visorchannel_destroy(dev->visorchannel);
 	kfree(dev);
 }
 
@@ -1058,10 +1055,7 @@ visorbus_remove_instance(struct visor_device *dev)
 	 * successfully been able to trace thru the code to see where/how
 	 * release() gets called.  But I know it does.
 	 */
-	if (dev->visorchannel) {
-		visorchannel_destroy(dev->visorchannel);
-		dev->visorchannel = NULL;
-	}
+	visorchannel_destroy(dev->visorchannel);
 	kfree(dev->vbus_hdr_info);
 	list_del(&dev->list_all);
 	device_unregister(&dev->device);
-- 
git-series 0.9.1

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

* [PATCH 17/42] staging: unisys: visorbus: visorbus_main.c: put function name and return value on same line.
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (15 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 16/42] staging: unisys: visorbus: visorbus_main.c: remove extra checks for dev->visorchannel David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 18/42] staging: unisys: visorbus: visorbus_main.c: remove check from typename_show David Kershner
                   ` (25 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

This patch makes function definitions more consistent by having function
name and return values on the same line.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 131 ++++++-----------
 1 file changed, 48 insertions(+), 83 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index bdebd58..319745e 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -73,8 +73,7 @@ static LIST_HEAD(list_all_bus_instances);
 /* list of visor_device structs, linked via .list_all */
 static LIST_HEAD(list_all_device_instances);
 
-static int
-visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env)
+static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env)
 {
 	struct visor_device *dev;
 	uuid_le guid;
@@ -94,8 +93,7 @@ visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env)
  *
  * Return: 1 iff the provided driver can control the specified device
  */
-static int
-visorbus_match(struct device *xdev, struct device_driver *xdrv)
+static int visorbus_match(struct device *xdev, struct device_driver *xdrv)
 {
 	uuid_le channel_type;
 	int i;
@@ -136,8 +134,7 @@ struct bus_type visorbus_type = {
  *                                involved with destroying the dev are complete
  * @xdev: struct device for the bus being released
  */
-static void
-visorbus_release_busdevice(struct device *xdev)
+static void visorbus_release_busdevice(struct device *xdev)
 {
 	struct visor_device *dev = dev_get_drvdata(xdev);
 
@@ -151,8 +148,7 @@ visorbus_release_busdevice(struct device *xdev)
  *                             each child device instance
  * @xdev: struct device for the visor device being released
  */
-static void
-visorbus_release_device(struct device *xdev)
+static void visorbus_release_device(struct device *xdev)
 {
 	struct visor_device *dev = to_visor_device(xdev);
 
@@ -368,9 +364,8 @@ static const struct attribute_group *visorbus_groups[] = {
  *
  * Reads @devInfo, and writes it in human-readable notation to @seq.
  */
-static void
-vbuschannel_print_devinfo(struct visor_vbus_deviceinfo *devinfo,
-			  struct seq_file *seq, int devix)
+static void vbuschannel_print_devinfo(struct visor_vbus_deviceinfo *devinfo,
+				      struct seq_file *seq, int devix)
 {
 	/* uninitialized vbus device entry */
 	if (!isprint(devinfo->devtype[0]))
@@ -445,8 +440,7 @@ static const struct file_operations client_bus_info_debugfs_fops = {
 	.release = single_release,
 };
 
-static void
-dev_periodic_work(unsigned long __opaque)
+static void dev_periodic_work(unsigned long __opaque)
 {
 	struct visor_device *dev = (struct visor_device *)__opaque;
 	struct visor_driver *drv = to_visor_driver(dev->device.driver);
@@ -455,8 +449,7 @@ dev_periodic_work(unsigned long __opaque)
 	mod_timer(&dev->timer, jiffies + POLLJIFFIES_NORMALCHANNEL);
 }
 
-static int
-dev_start_periodic_work(struct visor_device *dev)
+static int dev_start_periodic_work(struct visor_device *dev)
 {
 	if (dev->being_removed || dev->timer_active)
 		return -EINVAL;
@@ -468,8 +461,7 @@ dev_start_periodic_work(struct visor_device *dev)
 	return 0;
 }
 
-static void
-dev_stop_periodic_work(struct visor_device *dev)
+static void dev_stop_periodic_work(struct visor_device *dev)
 {
 	if (!dev->timer_active)
 		return;
@@ -488,8 +480,7 @@ dev_stop_periodic_work(struct visor_device *dev)
  *
  * Return: 0 iff successful
  */
-static int
-visordriver_remove_device(struct device *xdev)
+static int visordriver_remove_device(struct device *xdev)
 {
 	struct visor_device *dev;
 	struct visor_driver *drv;
@@ -516,8 +507,7 @@ visordriver_remove_device(struct device *xdev)
  * A visor function driver calls this function to unregister the driver,
  * i.e., within its module_exit function.
  */
-void
-visorbus_unregister_visor_driver(struct visor_driver *drv)
+void visorbus_unregister_visor_driver(struct visor_driver *drv)
 {
 	driver_unregister(&drv->driver);
 }
@@ -536,9 +526,8 @@ EXPORT_SYMBOL_GPL(visorbus_unregister_visor_driver);
  *
  * Return: integer indicating success (zero) or failure (non-zero)
  */
-int
-visorbus_read_channel(struct visor_device *dev, unsigned long offset,
-		      void *dest, unsigned long nbytes)
+int visorbus_read_channel(struct visor_device *dev, unsigned long offset,
+			  void *dest, unsigned long nbytes)
 {
 	return visorchannel_read(dev->visorchannel, offset, dest, nbytes);
 }
@@ -557,9 +546,8 @@ EXPORT_SYMBOL_GPL(visorbus_read_channel);
  *
  * Return: integer indicating success (zero) or failure (non-zero)
  */
-int
-visorbus_write_channel(struct visor_device *dev, unsigned long offset,
-		       void *src, unsigned long nbytes)
+int visorbus_write_channel(struct visor_device *dev, unsigned long offset,
+			   void *src, unsigned long nbytes)
 {
 	return visorchannel_write(dev->visorchannel, offset, src, nbytes);
 }
@@ -573,8 +561,7 @@ EXPORT_SYMBOL_GPL(visorbus_write_channel);
  * Currently we don't yet have a real interrupt, so for now we just call the
  * interrupt function periodically via a timer.
  */
-int
-visorbus_enable_channel_interrupts(struct visor_device *dev)
+int visorbus_enable_channel_interrupts(struct visor_device *dev)
 {
 	struct visor_driver *drv = to_visor_driver(dev->device.driver);
 
@@ -592,8 +579,7 @@ EXPORT_SYMBOL_GPL(visorbus_enable_channel_interrupts);
  *                                         designated device
  * @dev: the device on which to disable interrupts
  */
-void
-visorbus_disable_channel_interrupts(struct visor_device *dev)
+void visorbus_disable_channel_interrupts(struct visor_device *dev)
 {
 	dev_stop_periodic_work(dev);
 }
@@ -622,8 +608,7 @@ EXPORT_SYMBOL_GPL(visorbus_disable_channel_interrupts);
  * Return: 0 if successful, otherwise the negative value returned by
  *         device_add() indicating the reason for failure
  */
-static int
-create_visor_device(struct visor_device *dev)
+static int create_visor_device(struct visor_device *dev)
 {
 	int err;
 	u32 chipset_bus_no = dev->chipset_bus_no;
@@ -679,17 +664,15 @@ create_visor_device(struct visor_device *dev)
 	return err;
 }
 
-static void
-remove_visor_device(struct visor_device *dev)
+static void remove_visor_device(struct visor_device *dev)
 {
 	list_del(&dev->list_all);
 	put_device(&dev->device);
 	device_unregister(&dev->device);
 }
 
-static int
-get_vbus_header_info(struct visorchannel *chan,
-		     struct visor_vbus_headerinfo *hdr_info)
+static int get_vbus_header_info(struct visorchannel *chan,
+				struct visor_vbus_headerinfo *hdr_info)
 {
 	int err;
 
@@ -729,10 +712,9 @@ get_vbus_header_info(struct visorchannel *chan,
  * Returns no value since this is debug information and not needed for
  * device functionality.
  */
-static void
-write_vbus_chp_info(struct visorchannel *chan,
-		    struct visor_vbus_headerinfo *hdr_info,
-		    struct visor_vbus_deviceinfo *info)
+static void write_vbus_chp_info(struct visorchannel *chan,
+				struct visor_vbus_headerinfo *hdr_info,
+				struct visor_vbus_deviceinfo *info)
 {
 	int off = sizeof(struct channel_header) + hdr_info->chp_info_offset;
 
@@ -755,10 +737,9 @@ write_vbus_chp_info(struct visorchannel *chan,
  * Returns no value since this is debug information and not needed for
  * device functionality.
  */
-static void
-write_vbus_bus_info(struct visorchannel *chan,
-		    struct visor_vbus_headerinfo *hdr_info,
-		    struct visor_vbus_deviceinfo *info)
+static void write_vbus_bus_info(struct visorchannel *chan,
+				struct visor_vbus_headerinfo *hdr_info,
+				struct visor_vbus_deviceinfo *info)
 {
 	int off = sizeof(struct channel_header) + hdr_info->bus_info_offset;
 
@@ -782,10 +763,10 @@ write_vbus_bus_info(struct visorchannel *chan,
  * Returns no value since this is debug information and not needed for
  * device functionality.
  */
-static void
-write_vbus_dev_info(struct visorchannel *chan,
-		    struct visor_vbus_headerinfo *hdr_info,
-		    struct visor_vbus_deviceinfo *info, unsigned int devix)
+static void write_vbus_dev_info(struct visorchannel *chan,
+				struct visor_vbus_headerinfo *hdr_info,
+				struct visor_vbus_deviceinfo *info,
+				unsigned int devix)
 {
 	int off =
 	    (sizeof(struct channel_header) + hdr_info->dev_info_offset) +
@@ -820,8 +801,7 @@ static void bus_device_info_init(
  *                       vbus channel of the bus instance
  * @visordev: struct visor_device for the desired device
  */
-static void
-fix_vbus_dev_info(struct visor_device *visordev)
+static void fix_vbus_dev_info(struct visor_device *visordev)
 {
 	int i;
 	struct visor_device *bdev;
@@ -880,8 +860,7 @@ fix_vbus_dev_info(struct visor_device *visordev)
  *         was successful with this device, otherwise a negative errno
  *         value indicating failure reason
  */
-static int
-visordriver_probe_device(struct device *xdev)
+static int visordriver_probe_device(struct device *xdev)
 {
 	int res;
 	struct visor_driver *drv;
@@ -991,8 +970,7 @@ EXPORT_SYMBOL_GPL(visorbus_register_visor_driver);
  * Return: 0 for success, otherwise negative errno value indicating reason for
  *         failure
  */
-static int
-visorbus_create_instance(struct visor_device *dev)
+static int visorbus_create_instance(struct visor_device *dev)
 {
 	int id = dev->chipset_bus_no;
 	int err;
@@ -1044,8 +1022,7 @@ visorbus_create_instance(struct visor_device *dev)
  * visorbus_remove_instance() - remove a device instance for the visorbus itself
  * @dev: struct visor_device indentifying the bus to remove
  */
-static void
-visorbus_remove_instance(struct visor_device *dev)
+static void visorbus_remove_instance(struct visor_device *dev)
 {
 	/*
 	 * Note that this will result in the release method for
@@ -1064,8 +1041,7 @@ visorbus_remove_instance(struct visor_device *dev)
 /*
  * remove_all_visor_devices() - remove all child visorbus device instances
  */
-static void
-remove_all_visor_devices(void)
+static void remove_all_visor_devices(void)
 {
 	struct list_head *listentry, *listtmp;
 
@@ -1077,8 +1053,7 @@ remove_all_visor_devices(void)
 	}
 }
 
-int
-visorchipset_bus_create(struct visor_device *dev)
+int visorchipset_bus_create(struct visor_device *dev)
 {
 	int err;
 
@@ -1091,15 +1066,13 @@ visorchipset_bus_create(struct visor_device *dev)
 	return 0;
 }
 
-void
-visorchipset_bus_destroy(struct visor_device *dev)
+void visorchipset_bus_destroy(struct visor_device *dev)
 {
 	visorbus_remove_instance(dev);
 	visorbus_destroy_response(dev, 0);
 }
 
-int
-visorchipset_device_create(struct visor_device *dev_info)
+int visorchipset_device_create(struct visor_device *dev_info)
 {
 	int err;
 
@@ -1112,8 +1085,7 @@ visorchipset_device_create(struct visor_device *dev_info)
 	return 0;
 }
 
-void
-visorchipset_device_destroy(struct visor_device *dev_info)
+void visorchipset_device_destroy(struct visor_device *dev_info)
 {
 	remove_visor_device(dev_info);
 	visorbus_device_destroy_response(dev_info, 0);
@@ -1128,8 +1100,7 @@ visorchipset_device_destroy(struct visor_device *dev_info)
  * @status: 0 iff the pause state change completed successfully, otherwise
  *          a negative errno value indicating the reason for failure
  */
-static void
-pause_state_change_complete(struct visor_device *dev, int status)
+static void pause_state_change_complete(struct visor_device *dev, int status)
 {
 	if (!dev->pausing)
 		return;
@@ -1147,8 +1118,7 @@ pause_state_change_complete(struct visor_device *dev, int status)
  * @status: 0 iff the resume state change completed successfully, otherwise
  *          a negative errno value indicating the reason for failure
  */
-static void
-resume_state_change_complete(struct visor_device *dev, int status)
+static void resume_state_change_complete(struct visor_device *dev, int status)
 {
 	if (!dev->resuming)
 		return;
@@ -1174,9 +1144,8 @@ resume_state_change_complete(struct visor_device *dev, int status)
  * via a callback function; see pause_state_change_complete() and
  * resume_state_change_complete().
  */
-static int
-visorchipset_initiate_device_pause_resume(struct visor_device *dev,
-					  bool is_pause)
+static int visorchipset_initiate_device_pause_resume(struct visor_device *dev,
+						     bool is_pause)
 {
 	int err;
 	struct visor_driver *drv = NULL;
@@ -1218,8 +1187,7 @@ visorchipset_initiate_device_pause_resume(struct visor_device *dev,
  * that device.  Success/failure result is returned asynchronously
  * via a callback function; see pause_state_change_complete().
  */
-int
-visorchipset_device_pause(struct visor_device *dev_info)
+int visorchipset_device_pause(struct visor_device *dev_info)
 {
 	int err;
 
@@ -1240,8 +1208,7 @@ visorchipset_device_pause(struct visor_device *dev_info)
  * that device.  Success/failure result is returned asynchronously
  * via a callback function; see resume_state_change_complete().
  */
-int
-visorchipset_device_resume(struct visor_device *dev_info)
+int visorchipset_device_resume(struct visor_device *dev_info)
 {
 	int err;
 
@@ -1254,8 +1221,7 @@ visorchipset_device_resume(struct visor_device *dev_info)
 	return 0;
 }
 
-int
-visorbus_init(void)
+int visorbus_init(void)
 {
 	int err;
 
@@ -1275,8 +1241,7 @@ visorbus_init(void)
 	return 0;
 }
 
-void
-visorbus_exit(void)
+void visorbus_exit(void)
 {
 	struct list_head *listentry, *listtmp;
 
-- 
git-series 0.9.1

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

* [PATCH 18/42] staging: unisys: visorbus: visorbus_main.c: remove check from typename_show
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (16 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 17/42] staging: unisys: visorbus: visorbus_main.c: put function name and return value on same line David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-17 20:16 ` [PATCH 19/42] staging: unisys: visorbus: add checks for probe, remove, pause and resume in visorbus_register_visor_driver David Kershner
                   ` (24 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

Remove check for xbus in typename_show() function in
visorbus_main.c.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 319745e..57f59cb 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -221,7 +221,7 @@ static ssize_t typename_show(struct device *dev, struct device_attribute *attr,
 	struct device_driver *xdrv = dev->driver;
 	struct visor_driver *drv = NULL;
 
-	if (!xbus || !xdrv)
+	if (!xdrv)
 		return 0;
 	i = xbus->match(dev, xdrv);
 	if (!i)
-- 
git-series 0.9.1

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

* [PATCH 19/42] staging: unisys: visorbus: add checks for probe, remove, pause and resume in visorbus_register_visor_driver
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (17 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 18/42] staging: unisys: visorbus: visorbus_main.c: remove check from typename_show David Kershner
@ 2017-07-17 20:16 ` David Kershner
  2017-07-18  6:44   ` Greg KH
  2017-07-17 20:17 ` [PATCH 20/42] staging: unisys: remove unused define VISOR_VSWITCH_CHANNEL_VERSIONID David Kershner
                   ` (23 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:16 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

Added checks for functions probe, remove, pause and resume in
visorbus_register_visor_driver() and removed these checks from
the individual functions itself.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 22 ++++++++++--------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 57f59cb..4849054 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -490,8 +490,7 @@ static int visordriver_remove_device(struct device *xdev)
 
 	mutex_lock(&dev->visordriver_callback_lock);
 	dev->being_removed = true;
-	if (drv->remove)
-		drv->remove(dev);
+	drv->remove(dev);
 	mutex_unlock(&dev->visordriver_callback_lock);
 
 	dev_stop_periodic_work(dev);
@@ -868,8 +867,6 @@ static int visordriver_probe_device(struct device *xdev)
 
 	dev = to_visor_device(xdev);
 	drv = to_visor_driver(xdev->driver);
-	if (!drv->probe)
-		return -ENODEV;
 
 	mutex_lock(&dev->visordriver_callback_lock);
 	dev->being_removed = false;
@@ -940,6 +937,18 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
 	if (!initialized)
 		return -ENODEV;
 
+	if (!drv->probe)
+		return -ENODEV;
+
+	if (!drv->remove)
+		return -ENODEV;
+
+	if (!drv->pause)
+		return -ENODEV;
+
+	if (!drv->resume)
+		return -ENODEV;
+
 	drv->driver.name = drv->name;
 	drv->driver.bus = &visorbus_type;
 	drv->driver.probe = visordriver_probe_device;
@@ -1158,9 +1167,6 @@ static int visorchipset_initiate_device_pause_resume(struct visor_device *dev,
 		return -EBUSY;
 
 	if (is_pause) {
-		if (!drv->pause)
-			return -EINVAL;
-
 		dev->pausing = true;
 		err = drv->pause(dev, pause_state_change_complete);
 	} else {
@@ -1169,8 +1175,6 @@ static int visorchipset_initiate_device_pause_resume(struct visor_device *dev,
 		 * make sure it is valid.
 		 */
 		fix_vbus_dev_info(dev);
-		if (!drv->resume)
-			return -EINVAL;
 
 		dev->resuming = true;
 		err = drv->resume(dev, resume_state_change_complete);
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 20/42] staging: unisys: remove unused define VISOR_VSWITCH_CHANNEL_VERSIONID
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (18 preceding siblings ...)
  2017-07-17 20:16 ` [PATCH 19/42] staging: unisys: visorbus: add checks for probe, remove, pause and resume in visorbus_register_visor_driver David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 21/42] staging: unisys: include: Remove unused CHANNEL_OK defines David Kershner
                   ` (22 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

The VSWITCH channel is not used in Linux guests, so remove the VERSIONID.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/iochannel.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index c39451b..1a3d82d 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -40,7 +40,6 @@
  */
 #define VISOR_VHBA_CHANNEL_VERSIONID 2
 #define VISOR_VNIC_CHANNEL_VERSIONID 2
-#define VISOR_VSWITCH_CHANNEL_VERSIONID 1
 
 #define VISOR_VHBA_CHANNEL_OK_CLIENT(ch) \
 	(visor_check_channel(ch, visor_vhba_channel_uuid, \
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 21/42] staging: unisys: include: Remove unused CHANNEL_OK defines.
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (19 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 20/42] staging: unisys: remove unused define VISOR_VSWITCH_CHANNEL_VERSIONID David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 22/42] staging: unisys: moved visor_check_channel from include/channel.h to visorbus/visorbus_main.c David Kershner
                   ` (21 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

The VISOR_VNIC_CHANNEL_OK_CLIENT and VISOR_HBA_CHANNEL_OK_CLIENT macros
were not being used. They can be removed.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/iochannel.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 1a3d82d..425edb6 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -41,18 +41,6 @@
 #define VISOR_VHBA_CHANNEL_VERSIONID 2
 #define VISOR_VNIC_CHANNEL_VERSIONID 2
 
-#define VISOR_VHBA_CHANNEL_OK_CLIENT(ch) \
-	(visor_check_channel(ch, visor_vhba_channel_uuid, \
-			     "vhba", MIN_IO_CHANNEL_SIZE, \
-			     VISOR_VHBA_CHANNEL_VERSIONID, \
-			     VISOR_CHANNEL_SIGNATURE))
-
-#define VISOR_VNIC_CHANNEL_OK_CLIENT(ch) \
-	(visor_check_channel(ch, visor_vnic_channel_uuid, \
-			     "vnic", MIN_IO_CHANNEL_SIZE, \
-			     VISOR_VNIC_CHANNEL_VERSIONID, \
-			     VISOR_CHANNEL_SIGNATURE))
-
 /*
  * Everything necessary to handle SCSI & NIC traffic between Guest Partition and
  * IO Partition is defined below.
-- 
git-series 0.9.1

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

* [PATCH 22/42] staging: unisys: moved visor_check_channel from include/channel.h to visorbus/visorbus_main.c
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (20 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 21/42] staging: unisys: include: Remove unused CHANNEL_OK defines David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 23/42] staging: unisys: visorbus: Fix memory leak David Kershner
                   ` (20 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

Moved the function visor_check_channel() from include/channel.h to
visorbus/visorbus_main.c.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/channel.h           | 55 +---------------
 drivers/staging/unisys/include/visorbus.h          |  4 +-
 drivers/staging/unisys/visorbus/controlvmchannel.h |  8 +--
 drivers/staging/unisys/visorbus/visorbus_main.c    | 55 +++++++++++++++-
 drivers/staging/unisys/visorbus/visorchipset.c     |  8 +-
 5 files changed, 65 insertions(+), 65 deletions(-)

diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h
index 03275d2..4fe9451 100644
--- a/drivers/staging/unisys/include/channel.h
+++ b/drivers/staging/unisys/include/channel.h
@@ -206,61 +206,6 @@ struct signal_queue_header {
 	u8 filler[12];
 } __packed;
 
-/*
- * Generic function useful for validating any type of channel when it is
- * received by the client that will be accessing the channel.
- * Note that <logCtx> is only needed for callers in the EFI environment, and
- * is used to pass the EFI_DIAG_CAPTURE_PROTOCOL needed to log messages.
- */
-static inline int
-visor_check_channel(struct channel_header *ch,
-		    uuid_le expected_uuid,
-		    char *chname,
-		    u64 expected_min_bytes,
-		    u32 expected_version,
-		    u64 expected_signature)
-{
-	if (uuid_le_cmp(expected_uuid, NULL_UUID_LE) != 0) {
-		/* caller wants us to verify type GUID */
-		if (uuid_le_cmp(ch->chtype, expected_uuid) != 0) {
-			pr_err("Channel mismatch on channel=%s(%pUL) field=type expected=%pUL actual=%pUL\n",
-			       chname, &expected_uuid,
-			       &expected_uuid, &ch->chtype);
-			return 0;
-		}
-	}
-	/* verify channel size */
-	if (expected_min_bytes > 0) {
-		if (ch->size < expected_min_bytes) {
-			pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
-			       chname, &expected_uuid,
-			       (unsigned long long)expected_min_bytes,
-			       ch->size);
-			return 0;
-		}
-	}
-	/* verify channel version */
-	if (expected_version > 0) {
-		if (ch->version_id != expected_version) {
-			pr_err("Channel mismatch on channel=%s(%pUL) field=version expected=0x%-8.8lx actual=0x%-8.8x\n",
-			       chname, &expected_uuid,
-			       (unsigned long)expected_version,
-			       ch->version_id);
-			return 0;
-		}
-	}
-	/* verify channel signature */
-	if (expected_signature > 0) {
-		if (ch->signature != expected_signature) {
-			pr_err("Channel mismatch on channel=%s(%pUL) field=signature expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
-			       chname, &expected_uuid,
-			       expected_signature, ch->signature);
-			return 0;
-		}
-	}
-	return 1;
-}
-
 /* CHANNEL Guids */
 /* {414815ed-c58c-11da-95a9-00e08161165f} */
 #define VISOR_VHBA_CHANNEL_UUID \
diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index b727dee..17c9229 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -172,6 +172,10 @@ struct visor_device {
 
 #define to_visor_device(x) container_of(x, struct visor_device, device)
 
+int visor_check_channel(struct channel_header *ch, uuid_le expected_uuid,
+			char *chname, u64 expected_min_bytes,
+			u32 expected_version, u64 expected_signature);
+
 int visorbus_register_visor_driver(struct visor_driver *drv);
 void visorbus_unregister_visor_driver(struct visor_driver *drv);
 int visorbus_read_channel(struct visor_device *dev,
diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h b/drivers/staging/unisys/visorbus/controlvmchannel.h
index 9be17fb..96ac574 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -35,14 +35,6 @@
  */
 #define VISOR_CONTROLVM_CHANNEL_VERSIONID 1
 
-#define VISOR_CONTROLVM_CHANNEL_OK_CLIENT(ch) \
-	(visor_check_channel(ch, \
-			     VISOR_CONTROLVM_CHANNEL_UUID, \
-			     "controlvm", \
-			     sizeof(struct visor_controlvm_channel), \
-			     VISOR_CONTROLVM_CHANNEL_VERSIONID, \
-			     VISOR_CHANNEL_SIGNATURE))
-
 /* Defines for various channel queues */
 #define CONTROLVM_QUEUE_REQUEST		0
 #define CONTROLVM_QUEUE_RESPONSE	1
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 4849054..8c633e2 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -73,6 +73,61 @@ static LIST_HEAD(list_all_bus_instances);
 /* list of visor_device structs, linked via .list_all */
 static LIST_HEAD(list_all_device_instances);
 
+/*
+ * Generic function useful for validating any type of channel when it is
+ * received by the client that will be accessing the channel.
+ * Note that <logCtx> is only needed for callers in the EFI environment, and
+ * is used to pass the EFI_DIAG_CAPTURE_PROTOCOL needed to log messages.
+ */
+int visor_check_channel(struct channel_header *ch,
+			uuid_le expected_uuid,
+			char *chname,
+			u64 expected_min_bytes,
+			u32 expected_version,
+			u64 expected_signature)
+{
+	if (uuid_le_cmp(expected_uuid, NULL_UUID_LE) != 0) {
+		/* caller wants us to verify type GUID */
+		if (uuid_le_cmp(ch->chtype, expected_uuid) != 0) {
+			pr_err("Channel mismatch on channel=%s(%pUL) field=type expected=%pUL actual=%pUL\n",
+			       chname, &expected_uuid,
+			       &expected_uuid, &ch->chtype);
+			return 0;
+		}
+	}
+	/* verify channel size */
+	if (expected_min_bytes > 0) {
+		if (ch->size < expected_min_bytes) {
+			pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
+			       chname, &expected_uuid,
+			       (unsigned long long)expected_min_bytes,
+			       ch->size);
+			return 0;
+		}
+	}
+	/* verify channel version */
+	if (expected_version > 0) {
+		if (ch->version_id != expected_version) {
+			pr_err("Channel mismatch on channel=%s(%pUL) field=version expected=0x%-8.8lx actual=0x%-8.8x\n",
+			       chname, &expected_uuid,
+			       (unsigned long)expected_version,
+			       ch->version_id);
+			return 0;
+		}
+	}
+	/* verify channel signature */
+	if (expected_signature > 0) {
+		if (ch->signature != expected_signature) {
+			pr_err("Channel mismatch on channel=%s(%pUL) field=signature expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
+			       chname, &expected_uuid,
+			       expected_signature, ch->signature);
+			return 0;
+		}
+	}
+	return 1;
+}
+EXPORT_SYMBOL_GPL(visor_check_channel);
+
 static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env)
 {
 	struct visor_device *dev;
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 1106eb5..160a63e 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1835,8 +1835,12 @@ visorchipset_init(struct acpi_device *acpi_device)
 	if (err < 0)
 		goto error_destroy_channel;
 
-	if (!VISOR_CONTROLVM_CHANNEL_OK_CLIENT(
-				visorchannel_get_header(controlvm_channel)))
+	if (!visor_check_channel(visorchannel_get_header(controlvm_channel),
+				 VISOR_CONTROLVM_CHANNEL_UUID,
+				 "controlvm",
+				 sizeof(struct visor_controlvm_channel),
+				 VISOR_CONTROLVM_CHANNEL_VERSIONID,
+				 VISOR_CHANNEL_SIGNATURE))
 		goto error_delete_groups;
 
 	/* if booting in a crash kernel */
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 23/42] staging: unisys: visorbus: Fix memory leak
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (21 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 22/42] staging: unisys: moved visor_check_channel from include/channel.h to visorbus/visorbus_main.c David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 24/42] staging: unisys: visorbus: Beginning of the file /* on its own line David Kershner
                   ` (19 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Zachary Dremann

From: Zachary Dremann <dremann@gmail.com>

The name of a visor_device was never freed, which was allocated in
visorbus_configure.

It is expected that visorbus_device_destroy will not be called on the
same visor_device again, or this would be a double free.

Signed-off-by: Zachary Dremann <dremann@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 160a63e..aa6ee41 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -933,6 +933,7 @@ visorbus_device_destroy(struct controlvm_message *inmsg)
 		dev_info->pending_msg_hdr = pmsg_hdr;
 	}
 
+	kfree(dev_info->name);
 	visorchipset_device_destroy(dev_info);
 	return 0;
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 24/42] staging: unisys: visorbus: Beginning of the file /* on its own line
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (22 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 23/42] staging: unisys: visorbus: Fix memory leak David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-18  6:44   ` Greg KH
  2017-07-17 20:17 ` [PATCH 25/42] staging: unisys: include: iochannel.h: Removed unused DEFINE David Kershner
                   ` (18 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Zohaib

From: Zohaib <zohaib.javed@gmail.com>

Leading comment changed to follow surrounding convention.

Signed-off-by: Zohaib <zohaib.javed@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index aa6ee41..b21a4de 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1,4 +1,5 @@
-/* visorchipset_main.c
+/*
+ * visorchipset_main.c
  *
  * Copyright (C) 2010 - 2015 UNISYS CORPORATION
  * All rights reserved.
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 25/42] staging: unisys: include: iochannel.h: Removed unused DEFINE
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (23 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 24/42] staging: unisys: visorbus: Beginning of the file /* on its own line David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-18  6:45   ` Greg KH
  2017-07-17 20:17 ` [PATCH 26/42] staging: unisys: visorbus: Adding a new line between function definition David Kershner
                   ` (17 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Zohaib

From: Zohaib <zohaib.javed@gmail.com>

Removed unused #define GPI_ENTRIES_PER_PAGE

Signed-off-by: Zohaib <zohaib.javed@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/iochannel.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 425edb6..8db034a 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -133,8 +133,6 @@ struct guest_phys_info {
 	u64 length;
 } __packed;
 
-#define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info))
-
 /*
  * struct uisscsi_dest
  * @channel: Bus number.
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 26/42] staging: unisys: visorbus: Adding a new line between function definition
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (24 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 25/42] staging: unisys: include: iochannel.h: Removed unused DEFINE David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-18  6:45   ` Greg KH
  2017-07-17 20:17 ` [PATCH 27/42] staging: unisys: visorbus: rename fix_vbus_dev_info David Kershner
                   ` (16 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Zohaib

From: Zohaib <zohaib.javed@gmail.com>

Added a new line before issue_vmcall_io_controlvm_addr() function
definition.

Signed-off-by: Zohaib <zohaib.javed@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index b21a4de..ebae5bd 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1333,6 +1333,7 @@ static int unisys_vmcall(unsigned long tuple, unsigned long param)
 		return -EFAULT;
 	}
 }
+
 static unsigned int
 issue_vmcall_io_controlvm_addr(u64 *control_addr, u32 *control_bytes)
 {
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 27/42] staging: unisys: visorbus: rename fix_vbus_dev_info
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (25 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 26/42] staging: unisys: visorbus: Adding a new line between function definition David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 28/42] staging: unisys: visorbus: remove target_hostname comment David Kershner
                   ` (15 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Erik Arfvidson

From: Erik Arfvidson <erik.arfvidson@gmail.com>

Rename fix_vbus_dev_info to something clearer: publish_vbus_dev_info.

Signed-off-by: Erik Arfvidson <erik.arfvidson@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 8c633e2..b5c6017 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -849,13 +849,13 @@ static void bus_device_info_init(
 }
 
 /*
- * fix_vbus_dev_info() - for a child device just created on a client bus, fill
- *                       in information about the driver that is controlling
- *                       this device into the appropriate slot within the
- *                       vbus channel of the bus instance
+ * publish_vbus_dev_info() - for a child device just created on a client bus,
+ *			     fill in information about the driver that is
+ *			     controlling this device into the appropriate slot
+ *			     within the vbus channel of the bus instance
  * @visordev: struct visor_device for the desired device
  */
-static void fix_vbus_dev_info(struct visor_device *visordev)
+static void publish_vbus_dev_info(struct visor_device *visordev)
 {
 	int i;
 	struct visor_device *bdev;
@@ -930,7 +930,7 @@ static int visordriver_probe_device(struct device *xdev)
 	if (res >= 0) {
 		/* success: reference kept via unmatched get_device() */
 		get_device(&dev->device);
-		fix_vbus_dev_info(dev);
+		publish_vbus_dev_info(dev);
 	}
 
 	mutex_unlock(&dev->visordriver_callback_lock);
@@ -1229,8 +1229,7 @@ static int visorchipset_initiate_device_pause_resume(struct visor_device *dev,
 		 * The vbus_dev_info structure in the channel was been cleared,
 		 * make sure it is valid.
 		 */
-		fix_vbus_dev_info(dev);
-
+		publish_vbus_dev_info(dev);
 		dev->resuming = true;
 		err = drv->resume(dev, resume_state_change_complete);
 	}
-- 
git-series 0.9.1

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

* [PATCH 28/42] staging: unisys: visorbus: remove target_hostname comment
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (26 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 27/42] staging: unisys: visorbus: rename fix_vbus_dev_info David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 29/42] staging: unisys: visorchipset: remove local_addr in handle_command David Kershner
                   ` (14 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Erik Arfvidson

From: Erik Arfvidson <erik.arfvidson@gmail.com>

This patch simply removes TARGET_HOSTNAME comment that is no
longer relevant.

Signed-off-by: Erik Arfvidson <erik.arfvidson@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_private.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h
index 98a5af1..7ccf756 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/staging/unisys/visorbus/visorbus_private.h
@@ -23,10 +23,6 @@
 #include "controlvmchannel.h"
 #include "vbuschannel.h"
 
-/* TARGET_HOSTNAME specified as -DTARGET_HOSTNAME=\"thename\" on the
- * command line
- */
-
 int visorchipset_bus_create(struct visor_device *bus_info);
 void visorchipset_bus_destroy(struct visor_device *bus_info);
 int visorchipset_device_create(struct visor_device *dev_info);
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 29/42] staging: unisys: visorchipset: remove local_addr in handle_command
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (27 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 28/42] staging: unisys: visorbus: remove target_hostname comment David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-18  8:45   ` Dan Carpenter
  2017-07-17 20:17 ` [PATCH 30/42] staging: unisys: visorbus: Update comment style vbuschannel.h David Kershner
                   ` (13 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Erik Arfvidson

From: Erik Arfvidson <erik.arfvidson@gmail.com>

In the function handle_command, the variable local_addr is always false. So
this patch is getting rid of logic when it is true.

Signed-off-by: Erik Arfvidson <erik.arfvidson@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 43 +++++--------------
 1 file changed, 13 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index ebae5bd..6d77160 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1510,10 +1510,11 @@ visorbus_device_resume_response(struct visor_device *dev_info, int response)
 }
 
 static struct parser_context *
-parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry)
+parser_init_byte_stream(u64 addr, u32 bytes, bool *retry)
 {
 	int allocbytes = sizeof(struct parser_context) + bytes;
 	struct parser_context *ctx;
+	void *mapping;
 
 	*retry = false;
 
@@ -1538,22 +1539,11 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry)
 	ctx->curr = NULL;
 	ctx->bytes_remaining = 0;
 	ctx->byte_stream = false;
-	if (local) {
-		void *p;
-
-		if (addr > virt_to_phys(high_memory - 1))
-			goto err_finish_ctx;
-		p = __va((unsigned long)(addr));
-		memcpy(ctx->data, p, bytes);
-	} else {
-		void *mapping = memremap(addr, bytes, MEMREMAP_WB);
-
-		if (!mapping)
-			goto err_finish_ctx;
-		memcpy(ctx->data, mapping, bytes);
-		memunmap(mapping);
-	}
-
+	mapping = memremap(addr, bytes, MEMREMAP_WB);
+	if (!mapping)
+		goto err_finish_ctx;
+	memcpy(ctx->data, mapping, bytes);
+	memunmap(mapping);
 	ctx->byte_stream = true;
 	chipset_dev->controlvm_payload_bytes_buffered += ctx->param_bytes;
 
@@ -1584,12 +1574,10 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
 	u64 parm_addr;
 	u32 parm_bytes;
 	struct parser_context *parser_ctx = NULL;
-	bool local_addr;
 	struct controlvm_message ackmsg;
 	int err = 0;
 
 	/* create parsing context if necessary */
-	local_addr = (inmsg.hdr.flags.test_message == 1);
 	parm_addr = channel_addr + inmsg.hdr.payload_vm_offset;
 	parm_bytes = inmsg.hdr.payload_bytes;
 
@@ -1602,21 +1590,16 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
 		bool retry = false;
 
 		parser_ctx =
-		    parser_init_byte_stream(parm_addr, parm_bytes,
-					    local_addr, &retry);
+		    parser_init_byte_stream(parm_addr, parm_bytes, &retry);
 		if (!parser_ctx && retry)
 			return -EAGAIN;
 	}
+	controlvm_init_response(&ackmsg, &inmsg.hdr, CONTROLVM_RESP_SUCCESS);
+	err = visorchannel_signalinsert(chipset_dev->controlvm_channel,
+					CONTROLVM_QUEUE_ACK, &ackmsg);
+	if (err)
+		return err;
 
-	if (!local_addr) {
-		controlvm_init_response(&ackmsg, &inmsg.hdr,
-					CONTROLVM_RESP_SUCCESS);
-		err = visorchannel_signalinsert(chipset_dev->controlvm_channel,
-						CONTROLVM_QUEUE_ACK,
-						&ackmsg);
-		if (err)
-			return err;
-	}
 	switch (inmsg.hdr.id) {
 	case CONTROLVM_CHIPSET_INIT:
 		err = chipset_init(&inmsg);
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 30/42] staging: unisys: visorbus: Update comment style vbuschannel.h
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (28 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 29/42] staging: unisys: visorchipset: remove local_addr in handle_command David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-18  6:46   ` Greg KH
  2017-07-17 20:17 ` [PATCH 31/42] staging: unisys: visorbus: fixed comment in visorbus_private.h David Kershner
                   ` (12 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Mark Foresta

From: Mark Foresta <Mark.Foresta@Unisys.com>

Moved /* to own line at beginning of struct visor_vbus_deviceinfo to follow
standard.

Signed-off-by: Mark Foresta <Mark.Foresta@Unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/vbuschannel.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h
index 2c820e2..f374e72 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/staging/unisys/visorbus/vbuschannel.h
@@ -45,7 +45,8 @@
 
 static const uuid_le visor_vbus_channel_uuid = VISOR_VBUS_CHANNEL_UUID;
 
-/* struct visor_vbus_deviceinfo
+/*
+ * struct visor_vbus_deviceinfo
  * @devtype:  Short string identifying the device type.
  * @drvname:  Driver .sys file name.
  * @infostrs: Kernel vversion.
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 31/42] staging: unisys: visorbus: fixed comment in visorbus_private.h
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (29 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 30/42] staging: unisys: visorbus: Update comment style vbuschannel.h David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-18  6:46   ` Greg KH
  2017-07-17 20:17 ` [PATCH 32/42] staging: unisys: visorbus: removed blank line in viorbus_main.c David Kershner
                   ` (11 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Mark Foresta

From: Mark Foresta <Mark.Foresta@Unisys.com>

Placed /* on line 1 alone rather than start comment.

Signed-off-by: Mark Foresta <Mark.Foresta@Unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_private.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h
index 7ccf756..464aa0b 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/staging/unisys/visorbus/visorbus_private.h
@@ -1,4 +1,5 @@
-/* visorbus_private.h
+/*
+ * visorbus_private.h
  *
  * Copyright (C) 2010 - 2015 UNISYS CORPORATION
  * All rights reserved.
-- 
git-series 0.9.1

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

* [PATCH 32/42] staging: unisys: visorbus: removed blank line in viorbus_main.c
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (30 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 31/42] staging: unisys: visorbus: fixed comment in visorbus_private.h David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 33/42] staging: unisys: visorbus: Removed unused define from visorbus_main.c David Kershner
                   ` (10 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Mark Foresta

From: Mark Foresta <Mark.Foresta@Unisys.com>

Removed blank line between #defines.

Signed-off-by: Mark Foresta <Mark.Foresta@Unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index b5c6017..97524b0 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -23,7 +23,6 @@
 
 /* Display string that is guaranteed to be no longer the 99 characters */
 #define LINESIZE 99
-
 #define CURRENT_FILE_PC VISOR_BUS_PC_visorbus_main_c
 #define POLLJIFFIES_NORMALCHANNEL 10
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 33/42] staging: unisys: visorbus: Removed unused define from visorbus_main.c
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (31 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 32/42] staging: unisys: visorbus: removed blank line in viorbus_main.c David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 34/42] staging: unisys: visorbus: cleaned up include block of visorchipset.c David Kershner
                   ` (9 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Mark Foresta

From: Mark Foresta <Mark.Foresta@Unisys.com>

Removed unused #define CURRENT_FILE_PC.

Signed-off-by: Mark Foresta <Mark.Foresta@Unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 97524b0..9012cc1 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -23,7 +23,6 @@
 
 /* Display string that is guaranteed to be no longer the 99 characters */
 #define LINESIZE 99
-#define CURRENT_FILE_PC VISOR_BUS_PC_visorbus_main_c
 #define POLLJIFFIES_NORMALCHANNEL 10
 
 /* stores whether bus_registration was successful */
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 34/42] staging: unisys: visorbus: cleaned up include block of visorchipset.c
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (32 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 33/42] staging: unisys: visorbus: Removed unused define from visorbus_main.c David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 35/42] staging: unisys: visorbus: Remove unused define for visorchipset David Kershner
                   ` (8 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Mark Foresta

From: Mark Foresta <Mark.Foresta@Unisys.com>

Removed 4 unneeded includes netdevice, nls, fs, and ctype.

Signed-off-by: Mark Foresta <Mark.Foresta@Unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 6d77160..e694797 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -16,11 +16,7 @@
  */
 
 #include <linux/acpi.h>
-#include <linux/ctype.h>
-#include <linux/fs.h>
 #include <linux/mm.h>
-#include <linux/nls.h>
-#include <linux/netdevice.h>
 #include <linux/uuid.h>
 #include <linux/crash_dump.h>
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 35/42] staging: unisys: visorbus: Remove unused define for visorchipset.
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (33 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 34/42] staging: unisys: visorbus: cleaned up include block of visorchipset.c David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 36/42] staging: unisys: include: Remove COVER macro from channel.h David Kershner
                   ` (7 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Kershner

The define CURRENT_FILE_PC was not being used, so just remove it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index e694797..279c4d4 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -24,8 +24,6 @@
 #include "visorbus_private.h"
 #include "vmcallinterface.h"
 
-#define CURRENT_FILE_PC VISOR_BUS_PC_visorchipset_c
-
 #define POLLJIFFIES_CONTROLVMCHANNEL_FAST 1
 #define POLLJIFFIES_CONTROLVMCHANNEL_SLOW 100
 
-- 
git-series 0.9.1

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

* [PATCH 36/42] staging: unisys: include: Remove COVER macro from channel.h
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (34 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 35/42] staging: unisys: visorbus: Remove unused define for visorchipset David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 37/42] staging: unisys: visorbus: fix multi-line function definition David Kershner
                   ` (6 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Charles Daniels

From: Charles Daniels <cdaniels@fastmail.com>

Replaced the one and only call to COVER in iochannel.h.

Signed-off-by: Charles Daniels <cdaniels@fastmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/include/channel.h   | 4 ----
 drivers/staging/unisys/include/iochannel.h | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h
index 4fe9451..d6d99cc 100644
--- a/drivers/staging/unisys/include/channel.h
+++ b/drivers/staging/unisys/include/channel.h
@@ -25,10 +25,6 @@
 #define SIGNATURE_32(A, B, C, D) \
 	(SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
 
-#ifndef COVER
-#define COVER(v, d) ((d) * DIV_ROUND_UP(v, d))
-#endif
-
 #define VISOR_CHANNEL_SIGNATURE SIGNATURE_32('E', 'C', 'N', 'L')
 
 /*
diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 8db034a..40eb7d5 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -585,7 +585,7 @@ struct visor_io_channel {
 } __packed;
 
 /* INLINE functions for initializing and accessing I/O data channels. */
-#define SIZEOF_CMDRSP (COVER(sizeof(struct uiscmdrsp), 64))
+#define SIZEOF_CMDRSP (64 * DIV_ROUND_UP(sizeof(struct uiscmdrsp), 64))
 
 /* Use 4K page sizes when passing page info between Guest and IOPartition. */
 #define PI_PAGE_SIZE 0x1000
-- 
git-series 0.9.1

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

* [PATCH 37/42] staging: unisys: visorbus: fix multi-line function definition
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (35 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 36/42] staging: unisys: include: Remove COVER macro from channel.h David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-18  6:49   ` Greg KH
  2017-07-17 20:17 ` [PATCH 38/42] staging: unisys: visorbus: visorchannel.c: " David Kershner
                   ` (5 subsequent siblings)
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Charles Daniels

From: Charles Daniels <cdaniels@fastmail.com>

Fixed incorrectly styled function definitions in visorbus/visorchipset.c
by placing the function names on the same line as the return.

Signed-off-by: Charles Daniels <cdaniels@fastmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 153 +++++++-----------
 1 file changed, 62 insertions(+), 91 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 279c4d4..af02ad0 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -269,8 +269,7 @@ static ssize_t remaining_steps_store(struct device *dev,
 }
 static DEVICE_ATTR_RW(remaining_steps);
 
-static uuid_le
-parser_id_get(struct parser_context *ctx)
+static uuid_le parser_id_get(struct parser_context *ctx)
 {
 	struct visor_controlvm_parameters_header *phdr = NULL;
 
@@ -284,8 +283,7 @@ static void parser_done(struct parser_context *ctx)
 	kfree(ctx);
 }
 
-static void *
-parser_string_get(struct parser_context *ctx)
+static void *parser_string_get(struct parser_context *ctx)
 {
 	u8 *pscan;
 	unsigned long nscan;
@@ -318,8 +316,7 @@ parser_string_get(struct parser_context *ctx)
 	return value;
 }
 
-static void *
-parser_name_get(struct parser_context *ctx)
+static void *parser_name_get(struct parser_context *ctx)
 {
 	struct visor_controlvm_parameters_header *phdr = NULL;
 
@@ -372,9 +369,9 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
 	return vdev;
 }
 
-static void
-controlvm_init_response(struct controlvm_message *msg,
-			struct controlvm_message_header *msg_hdr, int response)
+static void controlvm_init_response(struct controlvm_message *msg,
+				    struct controlvm_message_header *msg_hdr,
+				    int response)
 {
 	memset(msg, 0, sizeof(struct controlvm_message));
 	memcpy(&msg->hdr, msg_hdr, sizeof(struct controlvm_message_header));
@@ -387,10 +384,10 @@ controlvm_init_response(struct controlvm_message *msg,
 	}
 }
 
-static int
-controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr,
-			       int response,
-			       enum visor_chipset_feature features)
+static int controlvm_respond_chipset_init(
+				struct controlvm_message_header *msg_hdr,
+				int response,
+				enum visor_chipset_feature features)
 {
 	struct controlvm_message outmsg;
 
@@ -400,8 +397,7 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr,
 					 CONTROLVM_QUEUE_REQUEST, &outmsg);
 }
 
-static int
-chipset_init(struct controlvm_message *inmsg)
+static int chipset_init(struct controlvm_message *inmsg)
 {
 	static int chipset_inited;
 	enum visor_chipset_feature features = 0;
@@ -435,9 +431,9 @@ chipset_init(struct controlvm_message *inmsg)
 	return res;
 }
 
-static int
-controlvm_respond(struct controlvm_message_header *msg_hdr, int response,
-		  struct visor_segment_state *state)
+static int controlvm_respond(struct controlvm_message_header *msg_hdr,
+			     int response,
+			     struct visor_segment_state *state)
 {
 	struct controlvm_message outmsg;
 
@@ -459,8 +455,8 @@ enum crash_obj_type {
 	CRASH_BUS,
 };
 
-static int
-save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type)
+static int save_crash_message(struct controlvm_message *msg,
+			      enum crash_obj_type cr_type)
 {
 	u32 local_crash_msg_offset;
 	u16 local_crash_msg_count;
@@ -524,10 +520,9 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type)
 	return 0;
 }
 
-static int
-controlvm_responder(enum controlvm_id cmd_id,
-		    struct controlvm_message_header *pending_msg_hdr,
-		    int response)
+static int controlvm_responder(enum controlvm_id cmd_id,
+			       struct controlvm_message_header *pending_msg_hdr,
+			       int response)
 {
 	if (!pending_msg_hdr)
 		return -EIO;
@@ -538,10 +533,10 @@ controlvm_responder(enum controlvm_id cmd_id,
 	return controlvm_respond(pending_msg_hdr, response, NULL);
 }
 
-static int
-device_changestate_responder(enum controlvm_id cmd_id,
-			     struct visor_device *p, int response,
-			     struct visor_segment_state response_state)
+static int device_changestate_responder(
+				enum controlvm_id cmd_id,
+				struct visor_device *p, int response,
+				struct visor_segment_state response_state)
 {
 	struct controlvm_message outmsg;
 	u32 bus_no = p->chipset_bus_no;
@@ -562,8 +557,7 @@ device_changestate_responder(enum controlvm_id cmd_id,
 					 CONTROLVM_QUEUE_REQUEST, &outmsg);
 }
 
-static int
-visorbus_create(struct controlvm_message *inmsg)
+static int visorbus_create(struct controlvm_message *inmsg)
 {
 	struct controlvm_message_packet *cmd = &inmsg->cmd;
 	struct controlvm_message_header *pmsg_hdr = NULL;
@@ -643,8 +637,7 @@ visorbus_create(struct controlvm_message *inmsg)
 	return err;
 }
 
-static int
-visorbus_destroy(struct controlvm_message *inmsg)
+static int visorbus_destroy(struct controlvm_message *inmsg)
 {
 	struct controlvm_message_packet *cmd = &inmsg->cmd;
 	struct controlvm_message_header *pmsg_hdr = NULL;
@@ -688,9 +681,8 @@ visorbus_destroy(struct controlvm_message *inmsg)
 	return err;
 }
 
-static int
-visorbus_configure(struct controlvm_message *inmsg,
-		   struct parser_context *parser_ctx)
+static int visorbus_configure(struct controlvm_message *inmsg,
+			      struct parser_context *parser_ctx)
 {
 	struct controlvm_message_packet *cmd = &inmsg->cmd;
 	u32 bus_no;
@@ -733,8 +725,7 @@ visorbus_configure(struct controlvm_message *inmsg,
 	return err;
 }
 
-static int
-visorbus_device_create(struct controlvm_message *inmsg)
+static int visorbus_device_create(struct controlvm_message *inmsg)
 {
 	struct controlvm_message_packet *cmd = &inmsg->cmd;
 	struct controlvm_message_header *pmsg_hdr = NULL;
@@ -831,8 +822,7 @@ visorbus_device_create(struct controlvm_message *inmsg)
 	return err;
 }
 
-static int
-visorbus_device_changestate(struct controlvm_message *inmsg)
+static int visorbus_device_changestate(struct controlvm_message *inmsg)
 {
 	struct controlvm_message_packet *cmd = &inmsg->cmd;
 	struct controlvm_message_header *pmsg_hdr = NULL;
@@ -892,8 +882,7 @@ visorbus_device_changestate(struct controlvm_message *inmsg)
 	return err;
 }
 
-static int
-visorbus_device_destroy(struct controlvm_message *inmsg)
+static int visorbus_device_destroy(struct controlvm_message *inmsg)
 {
 	struct controlvm_message_packet *cmd = &inmsg->cmd;
 	struct controlvm_message_header *pmsg_hdr = NULL;
@@ -959,8 +948,7 @@ visorbus_device_destroy(struct controlvm_message *inmsg)
  *
  * Return: a unique integer value
  */
-static int
-parahotplug_next_id(void)
+static int parahotplug_next_id(void)
 {
 	static atomic_t id = ATOMIC_INIT(0);
 
@@ -974,8 +962,7 @@ parahotplug_next_id(void)
  *
  * Return: expected expiration time (in jiffies)
  */
-static unsigned long
-parahotplug_next_expiration(void)
+static unsigned long parahotplug_next_expiration(void)
 {
 	return jiffies + msecs_to_jiffies(PARAHOTPLUG_TIMEOUT_MS);
 }
@@ -988,8 +975,8 @@ parahotplug_next_expiration(void)
  *
  * Return: the request containing the provided message
  */
-static struct parahotplug_request *
-parahotplug_request_create(struct controlvm_message *msg)
+static struct parahotplug_request *parahotplug_request_create(
+						struct controlvm_message *msg)
 {
 	struct parahotplug_request *req;
 
@@ -1008,8 +995,7 @@ parahotplug_request_create(struct controlvm_message *msg)
  * parahotplug_request_destroy() - free a parahotplug_request
  * @req: the request to deallocate
  */
-static void
-parahotplug_request_destroy(struct parahotplug_request *req)
+static void parahotplug_request_destroy(struct parahotplug_request *req)
 {
 	kfree(req);
 }
@@ -1029,8 +1015,7 @@ static DEFINE_SPINLOCK(parahotplug_request_list_lock);
  *
  * Return: 0 on success or -EINVAL on failure
  */
-static int
-parahotplug_request_complete(int id, u16 active)
+static int parahotplug_request_complete(int id, u16 active)
 {
 	struct list_head *pos;
 	struct list_head *tmp;
@@ -1157,8 +1142,7 @@ static const struct attribute_group *visorchipset_dev_groups[] = {
  * Cause uevent to run the user level script to do the disable/enable specified
  * in the parahotplug_request.
  */
-static int
-parahotplug_request_kickoff(struct parahotplug_request *req)
+static int parahotplug_request_kickoff(struct parahotplug_request *req)
 {
 	struct controlvm_message_packet *cmd = &req->msg.cmd;
 	char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40],
@@ -1187,8 +1171,7 @@ parahotplug_request_kickoff(struct parahotplug_request *req)
  *                                 off a udev script
  * @inmsg: the message indicating whether to enable or disable
  */
-static int
-parahotplug_process_message(struct controlvm_message *inmsg)
+static int parahotplug_process_message(struct controlvm_message *inmsg)
 {
 	struct parahotplug_request *req;
 	int err;
@@ -1239,8 +1222,7 @@ parahotplug_process_message(struct controlvm_message *inmsg)
  *
  * Return: 0 on success, negative on failure
  */
-static int
-chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
+static int chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
 {
 	int res;
 
@@ -1260,8 +1242,7 @@ chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
  *
  * Return: 0 on success, negative on failure
  */
-static int
-chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
+static int chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
 {
 	char env_selftest[20];
 	char *envp[] = { env_selftest, NULL };
@@ -1284,8 +1265,7 @@ chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
  *
  * Return: 0 on success, negative on failure
  */
-static int
-chipset_notready_uevent(struct controlvm_message_header *msg_hdr)
+static int chipset_notready_uevent(struct controlvm_message_header *msg_hdr)
 {
 	int res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj,
 			     KOBJ_OFFLINE);
@@ -1328,8 +1308,8 @@ static int unisys_vmcall(unsigned long tuple, unsigned long param)
 	}
 }
 
-static unsigned int
-issue_vmcall_io_controlvm_addr(u64 *control_addr, u32 *control_bytes)
+static unsigned int issue_vmcall_io_controlvm_addr(u64 *control_addr,
+						   u32 *control_bytes)
 {
 	chipset_dev->controlvm_addr.physaddr = virt_to_phys(
 					   &chipset_dev->controlvm_addr.params);
@@ -1355,8 +1335,7 @@ static u64 controlvm_get_channel_address(void)
 	return addr;
 }
 
-static void
-setup_crash_devices_work_queue(struct work_struct *work)
+static void setup_crash_devices_work_queue(struct work_struct *work)
 {
 	struct controlvm_message local_crash_bus_msg;
 	struct controlvm_message local_crash_dev_msg;
@@ -1435,8 +1414,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
 	visorbus_device_create(&local_crash_dev_msg);
 }
 
-void
-visorbus_create_response(struct visor_device *bus_info, int response)
+void visorbus_create_response(struct visor_device *bus_info, int response)
 {
 	if (response >= 0)
 		bus_info->state.created = 1;
@@ -1448,8 +1426,7 @@ visorbus_create_response(struct visor_device *bus_info, int response)
 	bus_info->pending_msg_hdr = NULL;
 }
 
-void
-visorbus_destroy_response(struct visor_device *bus_info, int response)
+void visorbus_destroy_response(struct visor_device *bus_info, int response)
 {
 	controlvm_responder(CONTROLVM_BUS_DESTROY, bus_info->pending_msg_hdr,
 			    response);
@@ -1458,8 +1435,8 @@ visorbus_destroy_response(struct visor_device *bus_info, int response)
 	bus_info->pending_msg_hdr = NULL;
 }
 
-void
-visorbus_device_create_response(struct visor_device *dev_info, int response)
+void visorbus_device_create_response(struct visor_device *dev_info,
+				     int response)
 {
 	if (response >= 0)
 		dev_info->state.created = 1;
@@ -1471,8 +1448,8 @@ visorbus_device_create_response(struct visor_device *dev_info, int response)
 	dev_info->pending_msg_hdr = NULL;
 }
 
-void
-visorbus_device_destroy_response(struct visor_device *dev_info, int response)
+void visorbus_device_destroy_response(struct visor_device *dev_info,
+				      int response)
 {
 	controlvm_responder(CONTROLVM_DEVICE_DESTROY, dev_info->pending_msg_hdr,
 			    response);
@@ -1481,8 +1458,8 @@ visorbus_device_destroy_response(struct visor_device *dev_info, int response)
 	dev_info->pending_msg_hdr = NULL;
 }
 
-void
-visorbus_device_pause_response(struct visor_device *dev_info, int response)
+void visorbus_device_pause_response(struct visor_device *dev_info,
+				    int response)
 {
 	device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
 				     dev_info, response,
@@ -1492,8 +1469,8 @@ visorbus_device_pause_response(struct visor_device *dev_info, int response)
 	dev_info->pending_msg_hdr = NULL;
 }
 
-void
-visorbus_device_resume_response(struct visor_device *dev_info, int response)
+void visorbus_device_resume_response(struct visor_device *dev_info,
+				     int response)
 {
 	device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
 				     dev_info, response,
@@ -1503,8 +1480,8 @@ visorbus_device_resume_response(struct visor_device *dev_info, int response)
 	dev_info->pending_msg_hdr = NULL;
 }
 
-static struct parser_context *
-parser_init_byte_stream(u64 addr, u32 bytes, bool *retry)
+static struct parser_context *parser_init_byte_stream(u64 addr, u32 bytes,
+						      bool *retry)
 {
 	int allocbytes = sizeof(struct parser_context) + bytes;
 	struct parser_context *ctx;
@@ -1561,8 +1538,7 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool *retry)
  *		  which to copy out controlvm payload data.
  *	< 0	- error: ControlVM message was processed but an error occurred.
  */
-static int
-handle_command(struct controlvm_message inmsg, u64 channel_addr)
+static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
 {
 	struct controlvm_message_packet *cmd = &inmsg.cmd;
 	u64 parm_addr;
@@ -1663,8 +1639,7 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
  *
  * Return: 0 if valid message was retrieved or -error
  */
-static int
-read_controlvm_event(struct controlvm_message *msg)
+static int read_controlvm_event(struct controlvm_message *msg)
 {
 	int err = visorchannel_signalremove(chipset_dev->controlvm_channel,
 					CONTROLVM_QUEUE_EVENT, msg);
@@ -1682,8 +1657,7 @@ read_controlvm_event(struct controlvm_message *msg)
  * parahotplug_process_list() - remove any request from the list that's been on
  *                              there too long and respond with an error
  */
-static void
-parahotplug_process_list(void)
+static void parahotplug_process_list(void)
 {
 	struct list_head *pos;
 	struct list_head *tmp;
@@ -1709,8 +1683,7 @@ parahotplug_process_list(void)
 	spin_unlock(&parahotplug_request_list_lock);
 }
 
-static void
-controlvm_periodic_work(struct work_struct *work)
+static void controlvm_periodic_work(struct work_struct *work)
 {
 	struct controlvm_message inmsg;
 	int count = 0;
@@ -1784,8 +1757,7 @@ controlvm_periodic_work(struct work_struct *work)
 			      chipset_dev->poll_jiffies);
 }
 
-static int
-visorchipset_init(struct acpi_device *acpi_device)
+static int visorchipset_init(struct acpi_device *acpi_device)
 {
 	int err = -ENODEV;
 	u64 addr;
@@ -1860,8 +1832,7 @@ visorchipset_init(struct acpi_device *acpi_device)
 	return err;
 }
 
-static int
-visorchipset_exit(struct acpi_device *acpi_device)
+static int visorchipset_exit(struct acpi_device *acpi_device)
 {
 	visorbus_exit();
 	cancel_delayed_work_sync(&chipset_dev->periodic_controlvm_work);
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 38/42] staging: unisys: visorbus: visorchannel.c: fix multi-line function definition
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (36 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 37/42] staging: unisys: visorbus: fix multi-line function definition David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 39/42] staging: unisys: visorhba: " David Kershner
                   ` (4 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Charles Daniels

From: Charles Daniels <cdaniels@fastmail.com>

Fixed incorrect function definition style in visorbus/visorchannel.c
by placing the function names on the same line as the return.

Signed-off-by: Charles Daniels <cdaniels@fastmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchannel.c | 101 +++++++-----------
 1 file changed, 44 insertions(+), 57 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index fcff231..c7eea65 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -54,8 +54,7 @@ struct visorchannel {
 	uuid_le inst;
 };
 
-void
-visorchannel_destroy(struct visorchannel *channel)
+void visorchannel_destroy(struct visorchannel *channel)
 {
 	if (!channel)
 		return;
@@ -67,46 +66,39 @@ visorchannel_destroy(struct visorchannel *channel)
 	kfree(channel);
 }
 
-u64
-visorchannel_get_physaddr(struct visorchannel *channel)
+u64 visorchannel_get_physaddr(struct visorchannel *channel)
 {
 	return channel->physaddr;
 }
 
-ulong
-visorchannel_get_nbytes(struct visorchannel *channel)
+ulong visorchannel_get_nbytes(struct visorchannel *channel)
 {
 	return channel->nbytes;
 }
 
-char *
-visorchannel_uuid_id(uuid_le *guid, char *s)
+char *visorchannel_uuid_id(uuid_le *guid, char *s)
 {
 	sprintf(s, "%pUL", guid);
 	return s;
 }
 
-char *
-visorchannel_id(struct visorchannel *channel, char *s)
+char *visorchannel_id(struct visorchannel *channel, char *s)
 {
 	return visorchannel_uuid_id(&channel->guid, s);
 }
 
-char *
-visorchannel_zoneid(struct visorchannel *channel, char *s)
+char *visorchannel_zoneid(struct visorchannel *channel, char *s)
 {
 	return visorchannel_uuid_id(&channel->chan_hdr.zone_uuid, s);
 }
 
-u64
-visorchannel_get_clientpartition(struct visorchannel *channel)
+u64 visorchannel_get_clientpartition(struct visorchannel *channel)
 {
 	return channel->chan_hdr.partition_handle;
 }
 
-int
-visorchannel_set_clientpartition(struct visorchannel *channel,
-				 u64 partition_handle)
+int visorchannel_set_clientpartition(struct visorchannel *channel,
+				     u64 partition_handle)
 {
 	channel->chan_hdr.partition_handle = partition_handle;
 	return 0;
@@ -118,16 +110,14 @@ visorchannel_set_clientpartition(struct visorchannel *channel,
  *
  * Return: the UUID of the provided channel
  */
-uuid_le
-visorchannel_get_uuid(struct visorchannel *channel)
+uuid_le visorchannel_get_uuid(struct visorchannel *channel)
 {
 	return channel->guid;
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_uuid);
 
-int
-visorchannel_read(struct visorchannel *channel, ulong offset,
-		  void *dest, ulong nbytes)
+int visorchannel_read(struct visorchannel *channel, ulong offset, void *dest,
+		      ulong nbytes)
 {
 	if (offset + nbytes > channel->nbytes)
 		return -EIO;
@@ -137,9 +127,8 @@ visorchannel_read(struct visorchannel *channel, ulong offset,
 	return 0;
 }
 
-int
-visorchannel_write(struct visorchannel *channel, ulong offset,
-		   void *dest, ulong nbytes)
+int visorchannel_write(struct visorchannel *channel, ulong offset, void *dest,
+		       ulong nbytes)
 {
 	size_t chdr_size = sizeof(struct channel_header);
 	size_t copy_size;
@@ -158,8 +147,7 @@ visorchannel_write(struct visorchannel *channel, ulong offset,
 	return 0;
 }
 
-void *
-visorchannel_get_header(struct visorchannel *channel)
+void *visorchannel_get_header(struct visorchannel *channel)
 {
 	return &channel->chan_hdr;
 }
@@ -191,9 +179,8 @@ visorchannel_get_header(struct visorchannel *channel)
 			   &((sig_hdr)->FIELD), \
 			   sizeof((sig_hdr)->FIELD))
 
-static int
-sig_read_header(struct visorchannel *channel, u32 queue,
-		struct signal_queue_header *sig_hdr)
+static int sig_read_header(struct visorchannel *channel, u32 queue,
+			   struct signal_queue_header *sig_hdr)
 {
 	if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header))
 		return -EINVAL;
@@ -204,9 +191,9 @@ sig_read_header(struct visorchannel *channel, u32 queue,
 				 sig_hdr, sizeof(struct signal_queue_header));
 }
 
-static int
-sig_read_data(struct visorchannel *channel, u32 queue,
-	      struct signal_queue_header *sig_hdr, u32 slot, void *data)
+static int sig_read_data(struct visorchannel *channel, u32 queue,
+			 struct signal_queue_header *sig_hdr, u32 slot,
+			 void *data)
 {
 	int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
 						 sig_hdr, slot);
@@ -215,9 +202,9 @@ sig_read_data(struct visorchannel *channel, u32 queue,
 				 data, sig_hdr->signal_size);
 }
 
-static int
-sig_write_data(struct visorchannel *channel, u32 queue,
-	       struct signal_queue_header *sig_hdr, u32 slot, void *data)
+static int sig_write_data(struct visorchannel *channel, u32 queue,
+			  struct signal_queue_header *sig_hdr, u32 slot,
+			  void *data)
 {
 	int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
 						 sig_hdr, slot);
@@ -226,8 +213,8 @@ sig_write_data(struct visorchannel *channel, u32 queue,
 				  data, sig_hdr->signal_size);
 }
 
-static int
-signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
+static int signalremove_inner(struct visorchannel *channel, u32 queue,
+			      void *msg)
 {
 	struct signal_queue_header sig_hdr;
 	int error;
@@ -273,8 +260,8 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
  *
  * Return: integer error code indicating the status of the removal
  */
-int
-visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
+int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
+			      void *msg)
 {
 	int rc;
 	unsigned long flags;
@@ -291,8 +278,7 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalremove);
 
-static bool
-queue_empty(struct visorchannel *channel, u32 queue)
+static bool queue_empty(struct visorchannel *channel, u32 queue)
 {
 	struct signal_queue_header sig_hdr;
 
@@ -311,8 +297,7 @@ queue_empty(struct visorchannel *channel, u32 queue)
  * Return: boolean indicating whether any messages in the designated
  *         channel/queue are present
  */
-bool
-visorchannel_signalempty(struct visorchannel *channel, u32 queue)
+bool visorchannel_signalempty(struct visorchannel *channel, u32 queue)
 {
 	bool rc;
 	unsigned long flags;
@@ -328,8 +313,8 @@ visorchannel_signalempty(struct visorchannel *channel, u32 queue)
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalempty);
 
-static int
-signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
+static int signalinsert_inner(struct visorchannel *channel, u32 queue,
+			      void *msg)
 {
 	struct signal_queue_header sig_hdr;
 	int err;
@@ -392,9 +377,11 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
  * Return: pointer to visorchannel that was created if successful,
  *         otherwise NULL
  */
-static struct visorchannel *
-visorchannel_create_guts(u64 physaddr, unsigned long channel_bytes,
-			 gfp_t gfp, uuid_le guid, bool needs_lock)
+static struct visorchannel *visorchannel_create_guts(
+						u64 physaddr,
+						unsigned long channel_bytes,
+						gfp_t gfp, uuid_le guid,
+						bool needs_lock)
 {
 	struct visorchannel *channel;
 	int err;
@@ -469,17 +456,17 @@ visorchannel_create_guts(u64 physaddr, unsigned long channel_bytes,
 	return NULL;
 }
 
-struct visorchannel *
-visorchannel_create(u64 physaddr, unsigned long channel_bytes,
-		    gfp_t gfp, uuid_le guid)
+struct visorchannel *visorchannel_create(u64 physaddr,
+					 unsigned long channel_bytes,
+					 gfp_t gfp, uuid_le guid)
 {
 	return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid,
 					false);
 }
 
-struct visorchannel *
-visorchannel_create_with_lock(u64 physaddr, unsigned long channel_bytes,
-			      gfp_t gfp, uuid_le guid)
+struct visorchannel *visorchannel_create_with_lock(u64 physaddr,
+						   unsigned long channel_bytes,
+						   gfp_t gfp, uuid_le guid)
 {
 	return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid,
 					true);
@@ -494,8 +481,8 @@ visorchannel_create_with_lock(u64 physaddr, unsigned long channel_bytes,
  *
  * Return: integer error code indicating the status of the insertion
  */
-int
-visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
+int visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
+			      void *msg)
 {
 	int rc;
 	unsigned long flags;
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 39/42] staging: unisys: visorhba: fix multi-line function definition
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (37 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 38/42] staging: unisys: visorbus: visorchannel.c: " David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 40/42] staging: unisys: visorinput: " David Kershner
                   ` (3 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Charles Daniels

From: Charles Daniels <cdaniels@fastmail.com>

Fixed incorrect function definition style in visorhba/visorhba_main.c
by placing the function names on the same line as the return.

Signed-off-by: Charles Daniels <cdaniels@fastmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorhba/visorhba_main.c | 36 ++++++++----------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 1b4b338..178d022 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -122,8 +122,8 @@ struct visorhba_devices_open {
  * Return: The task_struct * denoting the thread on success,
  *	   or NULL on failure
  */
-static struct task_struct *visor_thread_start
-(int (*threadfn)(void *), void *thrcontext, char *name)
+static struct task_struct *visor_thread_start(int (*threadfn)(void *),
+					      void *thrcontext, char *name)
 {
 	struct task_struct *task;
 
@@ -198,8 +198,7 @@ static int add_scsipending_entry(struct visorhba_devdata *devdata,
  *
  * Return: The scsipending entry pointed to on success, NULL on failure
  */
-static void *del_scsipending_ent(struct visorhba_devdata *devdata,
-				 int del)
+static void *del_scsipending_ent(struct visorhba_devdata *devdata, int del)
 {
 	unsigned long flags;
 	void *sent;
@@ -460,8 +459,7 @@ static int visorhba_bus_reset_handler(struct scsi_cmnd *scsicmd)
  *
  * Return: Not supported, return SUCCESS
  */
-static int
-visorhba_host_reset_handler(struct scsi_cmnd *scsicmd)
+static int visorhba_host_reset_handler(struct scsi_cmnd *scsicmd)
 {
 	/* issue TASK_MGMT_TARGET_RESET for each target on each bus for host */
 	return SUCCESS;
@@ -490,9 +488,9 @@ static const char *visorhba_get_info(struct Scsi_Host *shp)
  * Return: 0 if successfully queued to the Service Partition, otherwise
  *	   error code
  */
-static int
-visorhba_queue_command_lck(struct scsi_cmnd *scsicmd,
-			   void (*visorhba_cmnd_done)(struct scsi_cmnd *))
+static int visorhba_queue_command_lck(struct scsi_cmnd *scsicmd,
+				      void (*visorhba_cmnd_done)
+					   (struct scsi_cmnd *))
 {
 	struct uiscmdrsp *cmdrsp;
 	struct scsi_device *scsidev = scsicmd->device;
@@ -798,8 +796,8 @@ static int visorhba_serverdown(struct visorhba_devdata *devdata)
  *
  * Don't log errors for disk-not-present inquiries.
  */
-static void
-do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
+static void do_scsi_linuxstat(struct uiscmdrsp *cmdrsp,
+			      struct scsi_cmnd *scsicmd)
 {
 	struct visorhba_devdata *devdata;
 	struct visordisk_info *vdisk;
@@ -823,8 +821,8 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	}
 }
 
-static int set_no_disk_inquiry_result(unsigned char *buf,
-				      size_t len, bool is_lun0)
+static int set_no_disk_inquiry_result(unsigned char *buf, size_t len,
+				      bool is_lun0)
 {
 	if (len < NO_DISK_INQUIRY_RESULT_LEN)
 		return -EINVAL;
@@ -848,8 +846,8 @@ static int set_no_disk_inquiry_result(unsigned char *buf,
  *
  * Handle response when no linuxstat was returned.
  */
-static void
-do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
+static void do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp,
+				struct scsi_cmnd *scsicmd)
 {
 	struct scsi_device *scsidev;
 	unsigned char *buf;
@@ -915,8 +913,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
  * Response was returned by the Service Partition. Finish it and send
  * completion to the scsi midlayer.
  */
-static void
-complete_scsi_command(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
+static void complete_scsi_command(struct uiscmdrsp *cmdrsp,
+				  struct scsi_cmnd *scsicmd)
 {
 	/* take what we need out of cmdrsp and complete the scsicmd */
 	scsicmd->result = cmdrsp->scsi.linuxstat;
@@ -935,8 +933,8 @@ complete_scsi_command(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
  *
  * Pulls responses out of the iochannel and process the responses.
  */
-static void
-drain_queue(struct uiscmdrsp *cmdrsp, struct visorhba_devdata *devdata)
+static void drain_queue(struct uiscmdrsp *cmdrsp,
+			struct visorhba_devdata *devdata)
 {
 	struct scsi_cmnd *scsicmd;
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 40/42] staging: unisys: visorinput: fix multi-line function definition
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (38 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 39/42] staging: unisys: visorhba: " David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 41/42] staging: unisys: visornic: " David Kershner
                   ` (2 subsequent siblings)
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Kershner, Charles Daniels

From: Charles Daniels <cdaniels@fastmail.com>

Fixed incorrect function declaration style in visorinput/visorinput.c
by placing the function names on the same line as the return.

Signed-off-by: Charles Daniels <cdaniels@fastmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visorinput/visorinput.c | 52 +++++++------------
 1 file changed, 20 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index 761e56b..65060e9 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -276,9 +276,8 @@ static void visorinput_close(struct input_dev *visorinput_dev)
  * we can use to deliver keyboard inputs to Linux.  We of course do this when
  * we see keyboard inputs coming in on a keyboard channel.
  */
-static struct input_dev *
-setup_client_keyboard(void *devdata,  /* opaque on purpose */
-		      unsigned char *keycode_table)
+static struct input_dev *setup_client_keyboard(void *devdata,
+					       unsigned char *keycode_table)
 
 {
 	int i;
@@ -319,8 +318,7 @@ setup_client_keyboard(void *devdata,  /* opaque on purpose */
 	return visorinput_dev;
 }
 
-static struct input_dev *
-setup_client_mouse(void *devdata /* opaque on purpose */)
+static struct input_dev *setup_client_mouse(void *devdata)
 {
 	int xres, yres;
 	struct fb_info *fb0;
@@ -361,8 +359,9 @@ setup_client_mouse(void *devdata /* opaque on purpose */)
 	return visorinput_dev;
 }
 
-static struct visorinput_devdata *
-devdata_create(struct visor_device *dev, enum visorinput_device_type devtype)
+static struct visorinput_devdata *devdata_create(
+					struct visor_device *dev,
+					enum visorinput_device_type devtype)
 {
 	struct visorinput_devdata *devdata = NULL;
 	unsigned int extra_bytes = 0;
@@ -447,8 +446,7 @@ devdata_create(struct visor_device *dev, enum visorinput_device_type devtype)
 	return NULL;
 }
 
-static int
-visorinput_probe(struct visor_device *dev)
+static int visorinput_probe(struct visor_device *dev)
 {
 	uuid_le guid;
 	enum visorinput_device_type devtype;
@@ -466,15 +464,13 @@ visorinput_probe(struct visor_device *dev)
 	return 0;
 }
 
-static void
-unregister_client_input(struct input_dev *visorinput_dev)
+static void unregister_client_input(struct input_dev *visorinput_dev)
 {
 	if (visorinput_dev)
 		input_unregister_device(visorinput_dev);
 }
 
-static void
-visorinput_remove(struct visor_device *dev)
+static void visorinput_remove(struct visor_device *dev)
 {
 	struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
 
@@ -500,9 +496,8 @@ visorinput_remove(struct visor_device *dev)
  * Make it so the current locking state of the locking key indicated by
  * <keycode> is as indicated by <desired_state> (1=locked, 0=unlocked).
  */
-static void
-handle_locking_key(struct input_dev *visorinput_dev,
-		   int keycode, int desired_state)
+static void handle_locking_key(struct input_dev *visorinput_dev, int keycode,
+			       int desired_state)
 {
 	int led;
 
@@ -534,8 +529,7 @@ handle_locking_key(struct input_dev *visorinput_dev,
  * with 0xE0 in the low byte and the extended scancode value in the next
  * higher byte.
  */
-static int
-scancode_to_keycode(int scancode)
+static int scancode_to_keycode(int scancode)
 {
 	if (scancode > 0xff)
 		return visorkbd_ext_keycode[(scancode >> 8) & 0xff];
@@ -543,8 +537,7 @@ scancode_to_keycode(int scancode)
 	return visorkbd_keycode[scancode];
 }
 
-static int
-calc_button(int x)
+static int calc_button(int x)
 {
 	switch (x) {
 	case 1:
@@ -563,8 +556,7 @@ calc_button(int x)
  * client guest partition.  It is called periodically so we can obtain inputs
  * from the channel, and deliver them to the guest OS.
  */
-static void
-visorinput_channel_interrupt(struct visor_device *dev)
+static void visorinput_channel_interrupt(struct visor_device *dev)
 {
 	struct visor_inputreport r;
 	int scancode, keycode;
@@ -656,9 +648,8 @@ visorinput_channel_interrupt(struct visor_device *dev)
 	}
 }
 
-static int
-visorinput_pause(struct visor_device *dev,
-		 visorbus_state_complete_func complete_func)
+static int visorinput_pause(struct visor_device *dev,
+			    visorbus_state_complete_func complete_func)
 {
 	int rc;
 	struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
@@ -689,9 +680,8 @@ visorinput_pause(struct visor_device *dev,
 	return rc;
 }
 
-static int
-visorinput_resume(struct visor_device *dev,
-		  visorbus_state_complete_func complete_func)
+static int visorinput_resume(struct visor_device *dev,
+			     visorbus_state_complete_func complete_func)
 {
 	int rc;
 	struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
@@ -741,14 +731,12 @@ static struct visor_driver visorinput_driver = {
 	.resume = visorinput_resume,
 };
 
-static int
-visorinput_init(void)
+static int visorinput_init(void)
 {
 	return visorbus_register_visor_driver(&visorinput_driver);
 }
 
-static void
-visorinput_cleanup(void)
+static void visorinput_cleanup(void)
 {
 	visorbus_unregister_visor_driver(&visorinput_driver);
 }
-- 
git-series 0.9.1

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

* [PATCH 41/42] staging: unisys: visornic: fix multi-line function definition
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (39 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 40/42] staging: unisys: visorinput: " David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-17 20:17 ` [PATCH 42/42] staging: unisys: visornic: update the struct viosrnic_devdata to have kernel-doc like comments David Kershner
  2017-07-18  6:50 ` [PATCH 00/42] staging: unisys: More updates to the code Greg KH
  42 siblings, 0 replies; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Charles Daniels

From: Charles Daniels <cdaniels@fastmail.com>

Fixed incorrect function declaration style in visornic/visornic_main.c
by placing the function names on the same line as the return.

Signed-off-by: Charles Daniels <cdaniels@fastmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visornic/visornic_main.c | 101 +++++++----------
 1 file changed, 43 insertions(+), 58 deletions(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 5ae8401..0b39676 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -155,9 +155,9 @@ struct visornic_devdata {
 };
 
 /* Returns next non-zero index on success or 0 on failure (i.e. out of room). */
-static u16
-add_physinfo_entries(u64 inp_pfn, u16 inp_off, u32 inp_len, u16 index,
-		     u16 max_pi_arr_entries, struct phys_info pi_arr[])
+static u16 add_physinfo_entries(u64 inp_pfn, u16 inp_off, u32 inp_len,
+				u16 index, u16 max_pi_arr_entries,
+				struct phys_info pi_arr[])
 {
 	u32 len;
 	u16 i, firstlen;
@@ -203,10 +203,10 @@ add_physinfo_entries(u64 inp_pfn, u16 inp_off, u32 inp_len, u16 index,
  *	Return value indicates number of entries filled in frags
  *	Negative values indicate an error.
  */
-static int
-visor_copy_fragsinfo_from_skb(struct sk_buff *skb, unsigned int firstfraglen,
-			      unsigned int frags_max,
-			      struct phys_info frags[])
+static int visor_copy_fragsinfo_from_skb(struct sk_buff *skb,
+					 unsigned int firstfraglen,
+					 unsigned int frags_max,
+					 struct phys_info frags[])
 {
 	unsigned int count = 0, frag, size, offset = 0, numfrags;
 	unsigned int total_count;
@@ -309,8 +309,7 @@ static const struct file_operations debugfs_enable_ints_fops = {
  *	being down.
  *	Returns void.
  */
-static void
-visornic_serverdown_complete(struct visornic_devdata *devdata)
+static void visornic_serverdown_complete(struct visornic_devdata *devdata)
 {
 	struct net_device *netdev = devdata->netdev;
 
@@ -341,9 +340,8 @@ visornic_serverdown_complete(struct visornic_devdata *devdata)
  *	sure we haven't already handled the server change state event.
  *	Returns 0 if we scheduled the work, -EINVAL on error.
  */
-static int
-visornic_serverdown(struct visornic_devdata *devdata,
-		    visorbus_state_complete_func complete_func)
+static int visornic_serverdown(struct visornic_devdata *devdata,
+			       visorbus_state_complete_func complete_func)
 {
 	unsigned long flags;
 	int err;
@@ -388,8 +386,7 @@ visornic_serverdown(struct visornic_devdata *devdata,
  *	so that it can write rcv data into our memory space.
  *	Return pointer to sk_buff
  */
-static struct sk_buff *
-alloc_rcv_buf(struct net_device *netdev)
+static struct sk_buff *alloc_rcv_buf(struct net_device *netdev)
 {
 	struct sk_buff *skb;
 
@@ -420,9 +417,8 @@ alloc_rcv_buf(struct net_device *netdev)
  *	Send the skb to the IO Partition.
  *	Returns 0 or error
  */
-static int
-post_skb(struct uiscmdrsp *cmdrsp,
-	 struct visornic_devdata *devdata, struct sk_buff *skb)
+static int post_skb(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
+		    struct sk_buff *skb)
 {
 	int err;
 
@@ -461,9 +457,8 @@ post_skb(struct uiscmdrsp *cmdrsp,
  *	Send the enable/disable message to the IO Partition.
  *	Returns 0 or error
  */
-static int
-send_enbdis(struct net_device *netdev, int state,
-	    struct visornic_devdata *devdata)
+static int send_enbdis(struct net_device *netdev, int state,
+		       struct visornic_devdata *devdata)
 {
 	int err;
 
@@ -490,8 +485,8 @@ send_enbdis(struct net_device *netdev, int state,
  *	Returns 0 on success, negative for failure of IO Partition
  *	responding.
  */
-static int
-visornic_disable_with_timeout(struct net_device *netdev, const int timeout)
+static int visornic_disable_with_timeout(struct net_device *netdev,
+					 const int timeout)
 {
 	struct visornic_devdata *devdata = netdev_priv(netdev);
 	int i;
@@ -578,8 +573,8 @@ visornic_disable_with_timeout(struct net_device *netdev, const int timeout)
  *	Allocate rcv buffers and post them to the IO Partition.
  *	Return 0 for success, and negative for failure.
  */
-static int
-init_rcv_bufs(struct net_device *netdev, struct visornic_devdata *devdata)
+static int init_rcv_bufs(struct net_device *netdev,
+			 struct visornic_devdata *devdata)
 {
 	int i, j, count, err;
 
@@ -645,8 +640,8 @@ init_rcv_bufs(struct net_device *netdev, struct visornic_devdata *devdata)
  *	timeout is defined in msecs (timeout of 0 specifies infinite wait)
  *	Return 0 for success, negative for failure.
  */
-static int
-visornic_enable_with_timeout(struct net_device *netdev, const int timeout)
+static int visornic_enable_with_timeout(struct net_device *netdev,
+					const int timeout)
 {
 	int err = 0;
 	struct visornic_devdata *devdata = netdev_priv(netdev);
@@ -718,8 +713,7 @@ visornic_enable_with_timeout(struct net_device *netdev, const int timeout)
  *	device for our virtual NIC we will send a Disable and Enable
  *	to the IOVM. If it doesn't respond we will trigger a serverdown.
  */
-static void
-visornic_timeout_reset(struct work_struct *work)
+static void visornic_timeout_reset(struct work_struct *work)
 {
 	struct visornic_devdata *devdata;
 	struct net_device *netdev;
@@ -760,8 +754,7 @@ visornic_timeout_reset(struct work_struct *work)
  *      Enable the device and start the transmit queue.
  *      Return 0 for success
  */
-static int
-visornic_open(struct net_device *netdev)
+static int visornic_open(struct net_device *netdev)
 {
 	visornic_enable_with_timeout(netdev, VISORNIC_INFINITE_RSP_WAIT);
 	return 0;
@@ -774,8 +767,7 @@ visornic_open(struct net_device *netdev)
  *      Disable the device and stop the transmit queue.
  *      Return 0 for success
  */
-static int
-visornic_close(struct net_device *netdev)
+static int visornic_close(struct net_device *netdev)
 {
 	visornic_disable_with_timeout(netdev, VISORNIC_INFINITE_RSP_WAIT);
 	return 0;
@@ -839,8 +831,7 @@ static bool vnic_hit_low_watermark(struct visornic_devdata *devdata,
  *	can be called again.
  *	Returns NETDEV_TX_OK.
  */
-static int
-visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
+static int visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
 	struct visornic_devdata *devdata;
 	int len, firstfraglen, padlen;
@@ -1007,8 +998,7 @@ visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
  *
  *	Returns the net_device_stats for the device
  */
-static struct net_device_stats *
-visornic_get_stats(struct net_device *netdev)
+static struct net_device_stats *visornic_get_stats(struct net_device *netdev)
 {
 	struct visornic_devdata *devdata = netdev_priv(netdev);
 
@@ -1026,8 +1016,7 @@ visornic_get_stats(struct net_device *netdev)
  *	Currently not supported.
  *	Returns EINVAL
  */
-static int
-visornic_change_mtu(struct net_device *netdev, int new_mtu)
+static int visornic_change_mtu(struct net_device *netdev, int new_mtu)
 {
 	return -EINVAL;
 }
@@ -1039,8 +1028,7 @@ visornic_change_mtu(struct net_device *netdev, int new_mtu)
  *	Only flag we support currently is IFF_PROMISC
  *	Returns void
  */
-static void
-visornic_set_multi(struct net_device *netdev)
+static void visornic_set_multi(struct net_device *netdev)
 {
 	struct uiscmdrsp *cmdrsp;
 	struct visornic_devdata *devdata = netdev_priv(netdev);
@@ -1080,8 +1068,7 @@ visornic_set_multi(struct net_device *netdev)
  *	been informed the IO Partition is gone, if it is gone
  *	we will already timeout the xmits.
  */
-static void
-visornic_xmit_timeout(struct net_device *netdev)
+static void visornic_xmit_timeout(struct net_device *netdev)
 {
 	struct visornic_devdata *devdata = netdev_priv(netdev);
 	unsigned long flags;
@@ -1118,9 +1105,9 @@ visornic_xmit_timeout(struct net_device *netdev)
  *	we are finished with them.
  *	Returns 0 for success, -1 for error.
  */
-static int
-repost_return(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
-	      struct sk_buff *skb, struct net_device *netdev)
+static int repost_return(struct uiscmdrsp *cmdrsp,
+			 struct visornic_devdata *devdata,
+			 struct sk_buff *skb, struct net_device *netdev)
 {
 	struct net_pkt_rcv copy;
 	int i = 0, cc, numreposted;
@@ -1192,8 +1179,7 @@ repost_return(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
  *	it up the stack.
  *	Returns 1 iff an skb was received, otherwise 0
  */
-static int
-visornic_rx(struct uiscmdrsp *cmdrsp)
+static int visornic_rx(struct uiscmdrsp *cmdrsp)
 {
 	struct visornic_devdata *devdata;
 	struct sk_buff *skb, *prev, *curr;
@@ -1398,8 +1384,9 @@ visornic_rx(struct uiscmdrsp *cmdrsp)
  *	values.
  *	Returns a pointer to the devdata structure
  */
-static struct visornic_devdata *
-devdata_initialize(struct visornic_devdata *devdata, struct visor_device *dev)
+static struct visornic_devdata *devdata_initialize(
+					struct visornic_devdata *devdata,
+					struct visor_device *dev)
 {
 	devdata->dev = dev;
 	devdata->incarnation_id = get_jiffies_64();
@@ -1590,8 +1577,7 @@ static const struct file_operations debugfs_info_fops = {
  *	Send receive buffers to the IO Partition.
  *	Returns void
  */
-static int
-send_rcv_posts_if_needed(struct visornic_devdata *devdata)
+static int send_rcv_posts_if_needed(struct visornic_devdata *devdata)
 {
 	int i;
 	struct net_device *netdev;
@@ -1638,8 +1624,8 @@ send_rcv_posts_if_needed(struct visornic_devdata *devdata)
  *	@cmdrsp: io channel command response message
  *	@devdata: visornic device to drain
  */
-static void
-drain_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata)
+static void drain_resp_queue(struct uiscmdrsp *cmdrsp,
+			     struct visornic_devdata *devdata)
 {
 	while (!visorchannel_signalremove(devdata->dev->visorchannel,
 					  IOCHAN_FROM_IOPART,
@@ -1656,9 +1642,9 @@ drain_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata)
  *	Process the responses as we get them.
  *	Returns when response queue is empty or when the thread stops.
  */
-static void
-service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
-		   int *rx_work_done, int budget)
+static void service_resp_queue(struct uiscmdrsp *cmdrsp,
+			       struct visornic_devdata *devdata,
+			       int *rx_work_done, int budget)
 {
 	unsigned long flags;
 	struct net_device *netdev;
@@ -1777,8 +1763,7 @@ static int visornic_poll(struct napi_struct *napi, int budget)
  *	response queue and drain it if needed.
  *	Returns when thread has stopped.
  */
-static void
-poll_for_irq(unsigned long v)
+static void poll_for_irq(unsigned long v)
 {
 	struct visornic_devdata *devdata = (struct visornic_devdata *)v;
 
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 42/42] staging: unisys: visornic: update the struct viosrnic_devdata to have kernel-doc like comments
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (40 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 41/42] staging: unisys: visornic: " David Kershner
@ 2017-07-17 20:17 ` David Kershner
  2017-07-18  6:48   ` Greg KH
  2017-07-18  6:50 ` [PATCH 00/42] staging: unisys: More updates to the code Greg KH
  42 siblings, 1 reply; 56+ messages in thread
From: David Kershner @ 2017-07-17 20:17 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>

Cleaned up the in-line comments in the structure and added a
kernel-doc like comment for the structure.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
---
 drivers/staging/unisys/visornic/visornic_main.c | 86 ++++++++++++------
 1 file changed, 61 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 0b39676..90d9d03 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -68,10 +68,68 @@ struct chanstat {
 	unsigned long extra_rcvbufs_sent;
 };
 
+/* struct visornic_devdata
+ *
+ * @enabled:                        0 disabled 1 enabled to receive.
+ * @enab_dis_acked:                 NET_RCV_ENABLE/DISABLE acked by IOPART.
+ * @struct *dev:
+ * @struct *netdev:
+ * @struct net_stats:
+ * @interrupt_rcvd:
+ * @rsp_queue:
+ * @struct **rcvbuf:
+ * @incarnation_id:                 incarnation_id lets IOPART know about
+ *                                  re-birth.
+ * @old_flags:                      flags as they were prior to
+ *                                  set_multicast_list.
+ * @usage:                          count of users.
+ * @num_rcv_bufs:                   number of rcv buffers the vnic will post.
+ * @num_rcv_bufs_could_not_alloc:
+ * @num_rcvbuf_in_iovm:
+ * @alloc_failed_in_if_needed_cnt:
+ * @alloc_failed_in_repost_rtn_cnt:
+ * @max_outstanding_net_xmits:      absolute max number of outstanding xmits
+ *                                  - should never hit this.
+ * @upper_threshold_net_xmits:      high water mark for calling
+ *                                  netif_stop_queue().
+ * @lower_threshold_net_xmits:      high water mark for calling
+ *                                  netif_wake_queue().
+ * @struct xmitbufhead:             xmitbufhead - head of the xmit buffer list
+ *                                  sent to the IOPART end.
+ * @server_down_complete_func:
+ * @struct timeout_reset:
+ * @struct *cmdrsp_rcv:             cmdrsp_rcv is used for posting/unposting rcv
+ *                                  buffers.
+ * @struct *xmit_cmdrsp:            xmit_cmdrsp - issues NET_XMIT - only one
+ *                                  active xmit at a time.
+ * @server_down:                    IOPART is down.
+ * @server_change_state:            Processing SERVER_CHANGESTATE msg.
+ * @going_away:                     device is being torn down.
+ * @struct *eth_debugfs_dir:
+ * @interrupts_rcvd:
+ * @interrupts_notme:
+ * @interrupts_disabled:
+ * @busy_cnt:
+ * @priv_lock:                      spinlock to access devdata structures.
+ * @flow_control_upper_hits:
+ * @flow_control_lower_hits:
+ * @n_rcv0:                         # rcvs of 0 buffers.
+ * @n_rcv1:                         # rcvs of 1 buffers.
+ * @n_rcv2:                         # rcvs of 2 buffers.
+ * @n_rcvx:                         # rcvs of >2 buffers.
+ * @found_repost_rcvbuf_cnt:        # repost_rcvbuf_cnt.
+ * @repost_found_skb_cnt:           # of found the skb.
+ * @n_repost_deficit:               # of lost rcv buffers.
+ * @bad_rcv_buf:                    # of unknown rcv skb not freed.
+ * @n_rcv_packets_not_accepted:     # bogs rcv packets.
+ * @queuefullmsg_logged:
+ * @struct chstat:
+ * @struct irq_poll_timer:
+ * @struct napi:
+ * @struct cmdrsp:
+ */
 struct visornic_devdata {
-	/* 0 disabled 1 enabled to receive */
 	unsigned short enabled;
-	/* NET_RCV_ENABLE/DISABLE acked by IOPART */
 	unsigned short enab_dis_acked;
 
 	struct visor_device *dev;
@@ -80,47 +138,34 @@ struct visornic_devdata {
 	atomic_t interrupt_rcvd;
 	wait_queue_head_t rsp_queue;
 	struct sk_buff **rcvbuf;
-	/* incarnation_id lets IOPART know about re-birth */
 	u64 incarnation_id;
-	/* flags as they were prior to set_multicast_list */
 	unsigned short old_flags;
-	/* count of users */
 	atomic_t usage;
 
-	/* number of rcv buffers the vnic will post */
 	int num_rcv_bufs;
 	int num_rcv_bufs_could_not_alloc;
 	atomic_t num_rcvbuf_in_iovm;
 	unsigned long alloc_failed_in_if_needed_cnt;
 	unsigned long alloc_failed_in_repost_rtn_cnt;
 
-	/* absolute max number of outstanding xmits - should never hit this */
 	unsigned long max_outstanding_net_xmits;
-	/* high water mark for calling netif_stop_queue() */
 	unsigned long upper_threshold_net_xmits;
-	/* high water mark for calling netif_wake_queue() */
 	unsigned long lower_threshold_net_xmits;
-	/* xmitbufhead - head of the xmit buffer list sent to the IOPART end */
 	struct sk_buff_head xmitbufhead;
 
 	visorbus_state_complete_func server_down_complete_func;
 	struct work_struct timeout_reset;
-	/* cmdrsp_rcv is used for posting/unposting rcv buffers  */
 	struct uiscmdrsp *cmdrsp_rcv;
-	/* xmit_cmdrsp - issues NET_XMIT - only one active xmit at a time */
 	struct uiscmdrsp *xmit_cmdrsp;
-	/* IOPART is down */
 	bool server_down;
-	/* Processing SERVER_CHANGESTATE msg */
 	bool server_change_state;
-	/* device is being torn down */
 	bool going_away;
 	struct dentry *eth_debugfs_dir;
 	u64 interrupts_rcvd;
 	u64 interrupts_notme;
 	u64 interrupts_disabled;
 	u64 busy_cnt;
-	/* spinlock to access devdata structures */
+	/* spinlock to access devdata structures. */
 	spinlock_t priv_lock;
 
 	/* flow control counter */
@@ -128,23 +173,14 @@ struct visornic_devdata {
 	u64 flow_control_lower_hits;
 
 	/* debug counters */
-	/* # rcvs of 0 buffers */
 	unsigned long n_rcv0;
-	/* # rcvs of 1 buffers */
 	unsigned long n_rcv1;
-	/* # rcvs of 2 buffers */
 	unsigned long n_rcv2;
-	/* # rcvs of >2 buffers */
 	unsigned long n_rcvx;
-	/* # repost_rcvbuf_cnt */
 	unsigned long found_repost_rcvbuf_cnt;
-	/* # of found the skb */
 	unsigned long repost_found_skb_cnt;
-	/* # of lost rcv buffers */
 	unsigned long n_repost_deficit;
-	/* # of unknown rcv skb  not freed */
 	unsigned long bad_rcv_buf;
-	/* # bogs rcv packets */
 	unsigned long n_rcv_packets_not_accepted;
 
 	int queuefullmsg_logged;
-- 
git-series 0.9.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 08/42] staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks
  2017-07-17 20:16 ` [PATCH 08/42] staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks David Kershner
@ 2017-07-18  6:41   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:41 UTC (permalink / raw)
  To: David Kershner
  Cc: sparmaintainer, driverdev-devel, jes.sorensen, David Binder

On Mon, Jul 17, 2017 at 04:16:48PM -0400, David Kershner wrote:
> From: David Binder <david.binder@unisys.com>
> 
> Removes unnecessary checks for a NULL pointer in a non-API function.
> 
> Signed-off-by: David Binder <david.binder@unisys.com>
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: David Binder <david.binder@unisys.com>
> ---
>  drivers/staging/unisys/visorhba/visorhba_main.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
> index 17468bf..1b4b338 100644
> --- a/drivers/staging/unisys/visorhba/visorhba_main.c
> +++ b/drivers/staging/unisys/visorhba/visorhba_main.c
> @@ -141,9 +141,6 @@ static struct task_struct *visor_thread_start
>   */
>  static void visor_thread_stop(struct task_struct *task)
>  {
> -	/* no thread running */
> -	if (!task)
> -		return;
>  	kthread_stop(task);
>  }

Why is this a wrapper function at all anyway?  Why not just call
kthread_stop() instead of visor_thread_stop()?

I'll take this, but you should get rid of it in the future.

thanks,

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

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

* Re: [PATCH 19/42] staging: unisys: visorbus: add checks for probe, remove, pause and resume in visorbus_register_visor_driver
  2017-07-17 20:16 ` [PATCH 19/42] staging: unisys: visorbus: add checks for probe, remove, pause and resume in visorbus_register_visor_driver David Kershner
@ 2017-07-18  6:44   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:44 UTC (permalink / raw)
  To: David Kershner
  Cc: Sameer Wadgaonkar, sparmaintainer, driverdev-devel, jes.sorensen

On Mon, Jul 17, 2017 at 04:16:59PM -0400, David Kershner wrote:
> From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
> 
> Added checks for functions probe, remove, pause and resume in
> visorbus_register_visor_driver() and removed these checks from
> the individual functions itself.
> 
> Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: David Binder <david.binder@unisys.com>
> ---
>  drivers/staging/unisys/visorbus/visorbus_main.c | 22 ++++++++++--------
>  1 file changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
> index 57f59cb..4849054 100644
> --- a/drivers/staging/unisys/visorbus/visorbus_main.c
> +++ b/drivers/staging/unisys/visorbus/visorbus_main.c
> @@ -490,8 +490,7 @@ static int visordriver_remove_device(struct device *xdev)
>  
>  	mutex_lock(&dev->visordriver_callback_lock);
>  	dev->being_removed = true;
> -	if (drv->remove)
> -		drv->remove(dev);
> +	drv->remove(dev);
>  	mutex_unlock(&dev->visordriver_callback_lock);
>  
>  	dev_stop_periodic_work(dev);
> @@ -868,8 +867,6 @@ static int visordriver_probe_device(struct device *xdev)
>  
>  	dev = to_visor_device(xdev);
>  	drv = to_visor_driver(xdev->driver);
> -	if (!drv->probe)
> -		return -ENODEV;
>  
>  	mutex_lock(&dev->visordriver_callback_lock);
>  	dev->being_removed = false;
> @@ -940,6 +937,18 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
>  	if (!initialized)
>  		return -ENODEV;
>  
> +	if (!drv->probe)
> +		return -ENODEV;
> +
> +	if (!drv->remove)
> +		return -ENODEV;
> +
> +	if (!drv->pause)
> +		return -ENODEV;
> +
> +	if (!drv->resume)
> +		return -ENODEV;

It's not a "no device present" error, it's a "you gave me invalid data"
error, so perhaps -EINVAL instead?

> +
>  	drv->driver.name = drv->name;
>  	drv->driver.bus = &visorbus_type;
>  	drv->driver.probe = visordriver_probe_device;
> @@ -1158,9 +1167,6 @@ static int visorchipset_initiate_device_pause_resume(struct visor_device *dev,
>  		return -EBUSY;
>  
>  	if (is_pause) {
> -		if (!drv->pause)
> -			return -EINVAL;

See, you say it there :)

I'll take this, but future change please.

thanks,

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

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

* Re: [PATCH 24/42] staging: unisys: visorbus: Beginning of the file /* on its own line
  2017-07-17 20:17 ` [PATCH 24/42] staging: unisys: visorbus: Beginning of the file /* on its own line David Kershner
@ 2017-07-18  6:44   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:44 UTC (permalink / raw)
  To: David Kershner; +Cc: sparmaintainer, driverdev-devel, jes.sorensen, Zohaib

On Mon, Jul 17, 2017 at 04:17:04PM -0400, David Kershner wrote:
> From: Zohaib <zohaib.javed@gmail.com>
> 
> Leading comment changed to follow surrounding convention.
> 
> Signed-off-by: Zohaib <zohaib.javed@gmail.com>
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: David Binder <david.binder@unisys.com>
> ---
>  drivers/staging/unisys/visorbus/visorchipset.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
> index aa6ee41..b21a4de 100644
> --- a/drivers/staging/unisys/visorbus/visorchipset.c
> +++ b/drivers/staging/unisys/visorbus/visorchipset.c
> @@ -1,4 +1,5 @@
> -/* visorchipset_main.c
> +/*
> + * visorchipset_main.c

Too bad this is the wrong name :(

I'm not going to take this, sorry.  Just drop silly things like this
from files, it means nothing to no one.

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

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

* Re: [PATCH 25/42] staging: unisys: include: iochannel.h: Removed unused DEFINE
  2017-07-17 20:17 ` [PATCH 25/42] staging: unisys: include: iochannel.h: Removed unused DEFINE David Kershner
@ 2017-07-18  6:45   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:45 UTC (permalink / raw)
  To: David Kershner; +Cc: sparmaintainer, driverdev-devel, jes.sorensen, Zohaib

On Mon, Jul 17, 2017 at 04:17:05PM -0400, David Kershner wrote:
> From: Zohaib <zohaib.javed@gmail.com>

I need a "real" and "full" name please for all kernel changes.

thanks,

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

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

* Re: [PATCH 26/42] staging: unisys: visorbus: Adding a new line between function definition
  2017-07-17 20:17 ` [PATCH 26/42] staging: unisys: visorbus: Adding a new line between function definition David Kershner
@ 2017-07-18  6:45   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:45 UTC (permalink / raw)
  To: David Kershner; +Cc: sparmaintainer, driverdev-devel, jes.sorensen, Zohaib

On Mon, Jul 17, 2017 at 04:17:06PM -0400, David Kershner wrote:
> From: Zohaib <zohaib.javed@gmail.com>

Same name issue here.

thanks,

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

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

* Re: [PATCH 30/42] staging: unisys: visorbus: Update comment style vbuschannel.h
  2017-07-17 20:17 ` [PATCH 30/42] staging: unisys: visorbus: Update comment style vbuschannel.h David Kershner
@ 2017-07-18  6:46   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:46 UTC (permalink / raw)
  To: David Kershner
  Cc: Mark Foresta, sparmaintainer, driverdev-devel, jes.sorensen

On Mon, Jul 17, 2017 at 04:17:10PM -0400, David Kershner wrote:
> From: Mark Foresta <Mark.Foresta@Unisys.com>
> 
> Moved /* to own line at beginning of struct visor_vbus_deviceinfo to follow
> standard.
> 
> Signed-off-by: Mark Foresta <Mark.Foresta@Unisys.com>
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: David Binder <david.binder@unisys.com>
> ---
>  drivers/staging/unisys/visorbus/vbuschannel.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h
> index 2c820e2..f374e72 100644
> --- a/drivers/staging/unisys/visorbus/vbuschannel.h
> +++ b/drivers/staging/unisys/visorbus/vbuschannel.h
> @@ -45,7 +45,8 @@
>  
>  static const uuid_le visor_vbus_channel_uuid = VISOR_VBUS_CHANNEL_UUID;
>  
> -/* struct visor_vbus_deviceinfo
> +/*
> + * struct visor_vbus_deviceinfo

As this is kernel-doc format, the correct change should be:
  /**
   * struct visor_vbus_deviceinfo
right?

I'm dropping this.

thanks,

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

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

* Re: [PATCH 31/42] staging: unisys: visorbus: fixed comment in visorbus_private.h
  2017-07-17 20:17 ` [PATCH 31/42] staging: unisys: visorbus: fixed comment in visorbus_private.h David Kershner
@ 2017-07-18  6:46   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:46 UTC (permalink / raw)
  To: David Kershner
  Cc: Mark Foresta, sparmaintainer, driverdev-devel, jes.sorensen

On Mon, Jul 17, 2017 at 04:17:11PM -0400, David Kershner wrote:
> From: Mark Foresta <Mark.Foresta@Unisys.com>
> 
> Placed /* on line 1 alone rather than start comment.
> 
> Signed-off-by: Mark Foresta <Mark.Foresta@Unisys.com>
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: David Binder <david.binder@unisys.com>
> ---
>  drivers/staging/unisys/visorbus/visorbus_private.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h
> index 7ccf756..464aa0b 100644
> --- a/drivers/staging/unisys/visorbus/visorbus_private.h
> +++ b/drivers/staging/unisys/visorbus/visorbus_private.h
> @@ -1,4 +1,5 @@
> -/* visorbus_private.h
> +/*
> + * visorbus_private.h

Just delete the file name please.

thanks,

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

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

* Re: [PATCH 42/42] staging: unisys: visornic: update the struct viosrnic_devdata to have kernel-doc like comments
  2017-07-17 20:17 ` [PATCH 42/42] staging: unisys: visornic: update the struct viosrnic_devdata to have kernel-doc like comments David Kershner
@ 2017-07-18  6:48   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:48 UTC (permalink / raw)
  To: David Kershner
  Cc: Sameer Wadgaonkar, sparmaintainer, driverdev-devel, jes.sorensen

On Mon, Jul 17, 2017 at 04:17:22PM -0400, David Kershner wrote:
> From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
> 
> Cleaned up the in-line comments in the structure and added a
> kernel-doc like comment for the structure.
> 
> Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: David Binder <david.binder@unisys.com>
> ---
>  drivers/staging/unisys/visornic/visornic_main.c | 86 ++++++++++++------
>  1 file changed, 61 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
> index 0b39676..90d9d03 100644
> --- a/drivers/staging/unisys/visornic/visornic_main.c
> +++ b/drivers/staging/unisys/visornic/visornic_main.c
> @@ -68,10 +68,68 @@ struct chanstat {
>  	unsigned long extra_rcvbufs_sent;
>  };
>  
> +/* struct visornic_devdata

If you are going to do kernel-doc, do it correctly please.  Don't make
it half-way, that helps no one as a follow-on patch to do it correctly
is now required.

Please do it correct the first time.

thanks,

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

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

* Re: [PATCH 37/42] staging: unisys: visorbus: fix multi-line function definition
  2017-07-17 20:17 ` [PATCH 37/42] staging: unisys: visorbus: fix multi-line function definition David Kershner
@ 2017-07-18  6:49   ` Greg KH
  0 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:49 UTC (permalink / raw)
  To: David Kershner
  Cc: Charles Daniels, sparmaintainer, driverdev-devel, jes.sorensen

On Mon, Jul 17, 2017 at 04:17:17PM -0400, David Kershner wrote:
> From: Charles Daniels <cdaniels@fastmail.com>
> 
> Fixed incorrectly styled function definitions in visorbus/visorchipset.c
> by placing the function names on the same line as the return.
> 
> Signed-off-by: Charles Daniels <cdaniels@fastmail.com>
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: David Binder <david.binder@unisys.com>
> ---
>  drivers/staging/unisys/visorbus/visorchipset.c | 153 +++++++-----------
>  1 file changed, 62 insertions(+), 91 deletions(-)

Did not apply :(
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 00/42] staging: unisys: More updates to the code
  2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
                   ` (41 preceding siblings ...)
  2017-07-17 20:17 ` [PATCH 42/42] staging: unisys: visornic: update the struct viosrnic_devdata to have kernel-doc like comments David Kershner
@ 2017-07-18  6:50 ` Greg KH
  42 siblings, 0 replies; 56+ messages in thread
From: Greg KH @ 2017-07-18  6:50 UTC (permalink / raw)
  To: David Kershner; +Cc: sparmaintainer, driverdev-devel, jes.sorensen

On Mon, Jul 17, 2017 at 04:16:40PM -0400, David Kershner wrote:
> This series fixes some more style issues with the code found
> during our internal review.

I've applied most of these, please rebase and fix up the remaining ones
and resend.

thanks,

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

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

* Re: [PATCH 05/42] staging: unisys: visorinput: visorinput.c: Adjust whitespace usage
  2017-07-17 20:16 ` [PATCH 05/42] staging: unisys: visorinput: visorinput.c: " David Kershner
@ 2017-07-18  8:33   ` Dan Carpenter
  2017-07-18  8:51     ` Dan Carpenter
  0 siblings, 1 reply; 56+ messages in thread
From: Dan Carpenter @ 2017-07-18  8:33 UTC (permalink / raw)
  To: David Kershner
  Cc: gregkh, sparmaintainer, driverdev-devel, jes.sorensen,
	David Binder

> @@ -324,11 +322,10 @@ setup_client_keyboard(void *devdata,  /* opaque on purpose */
>  static struct input_dev *
>  setup_client_mouse(void *devdata /* opaque on purpose */)
>  {
> -	struct input_dev *visorinput_dev = NULL;
>  	int xres, yres;
>  	struct fb_info *fb0;
> +	struct input_dev *visorinput_dev = input_allocate_device();
>  
> -	visorinput_dev = input_allocate_device();
>  	if (!visorinput_dev)
>  		return NULL;
>  

So far these patches are pretty annoying.  You seem to be using
Christmas tree ordering:

short
medium
loooooong

Instead of reverse Christmas tree:

loooooong
medium
short

Nobody else does that...  People either use reverse Christmas tree or
they don't care.  Also putting alloc functions in the declarations is a
common source of bugs.  Empirically, from reviewing thousands of static
checker bugs, I can say that declarations get reviewed worse than normal
code.

regards,
dan carpenter

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

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

* Re: [PATCH 29/42] staging: unisys: visorchipset: remove local_addr in handle_command
  2017-07-17 20:17 ` [PATCH 29/42] staging: unisys: visorchipset: remove local_addr in handle_command David Kershner
@ 2017-07-18  8:45   ` Dan Carpenter
  0 siblings, 0 replies; 56+ messages in thread
From: Dan Carpenter @ 2017-07-18  8:45 UTC (permalink / raw)
  To: David Kershner
  Cc: gregkh, sparmaintainer, driverdev-devel, jes.sorensen,
	Erik Arfvidson

On Mon, Jul 17, 2017 at 04:17:09PM -0400, David Kershner wrote:
> +	mapping = memremap(addr, bytes, MEMREMAP_WB);
> +	if (!mapping)
> +		goto err_finish_ctx;

This goto is wrong.  It calls parser_done(ctx) when it should just call
kfree(ctx).  The difference is that parser_done() looks like this:

   289  static void parser_done(struct parser_context *ctx)
   290  {
   291          chipset_dev->controlvm_payload_bytes_buffered -= ctx->param_bytes;
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We never incremented this so we shouldn't be decrementing it.

   292          kfree(ctx);
   293  }


regards,
dan carpenter

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

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

* Re: [PATCH 05/42] staging: unisys: visorinput: visorinput.c: Adjust whitespace usage
  2017-07-18  8:33   ` Dan Carpenter
@ 2017-07-18  8:51     ` Dan Carpenter
  0 siblings, 0 replies; 56+ messages in thread
From: Dan Carpenter @ 2017-07-18  8:51 UTC (permalink / raw)
  To: David Kershner
  Cc: gregkh, sparmaintainer, driverdev-devel, jes.sorensen,
	David Binder

I perhaps judged to early and harshly.  This patchset is fine.

regards,
dan carpenter

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

end of thread, other threads:[~2017-07-18  8:51 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17 20:16 [PATCH 00/42] staging: unisys: More updates to the code David Kershner
2017-07-17 20:16 ` [PATCH 01/42] staging: unisys: visorbus: visorbus_main.c: use __func__ over hardcoded name David Kershner
2017-07-17 20:16 ` [PATCH 02/42] staging: unisys: visorbus: visorchipset.c: Adjust code layout David Kershner
2017-07-17 20:16 ` [PATCH 03/42] staging: unisys: visorbus: visorbus_main.c: " David Kershner
2017-07-17 20:16 ` [PATCH 04/42] staging: unisys: visorhba: visorhba_main.c: Adjust whitespace usage David Kershner
2017-07-17 20:16 ` [PATCH 05/42] staging: unisys: visorinput: visorinput.c: " David Kershner
2017-07-18  8:33   ` Dan Carpenter
2017-07-18  8:51     ` Dan Carpenter
2017-07-17 20:16 ` [PATCH 06/42] staging: unisys: visornic: visornic_main.c: " David Kershner
2017-07-17 20:16 ` [PATCH 07/42] staging: unisys: visorbus: controlvmchannel.h: fix spacing David Kershner
2017-07-17 20:16 ` [PATCH 08/42] staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks David Kershner
2017-07-18  6:41   ` Greg KH
2017-07-17 20:16 ` [PATCH 09/42] staging: unisys: include: channel.h: remove unused pound defines David Kershner
2017-07-17 20:16 ` [PATCH 10/42] staging: unisys: visorbus: controlvmchannel.h: removed VISOR_CONTROLVM_CHANNEL_SIGNATURE David Kershner
2017-07-17 20:16 ` [PATCH 11/42] staging: unisys: visorbus: vbuschannel.h: removed VISOR_VBUS_CHANNEL_SIGNATURE David Kershner
2017-07-17 20:16 ` [PATCH 12/42] staging: unisys: include: iochannel.h: removed VISOR_VHBA_CHANNEL_SIGNATURE David Kershner
2017-07-17 20:16 ` [PATCH 13/42] staging: unisys: include: iochannel.h: removed VISOR_VNIC_CHANNEL_SIGNATURE David Kershner
2017-07-17 20:16 ` [PATCH 14/42] staging: unisys: include: iochannel.h: removed VISOR_VSWITCH_CHANNEL_SIGNATURE David Kershner
2017-07-17 20:16 ` [PATCH 15/42] staging: unisys: visorbus: convert VMCALL_CONTROLVM_ADDR enum to #define David Kershner
2017-07-17 20:16 ` [PATCH 16/42] staging: unisys: visorbus: visorbus_main.c: remove extra checks for dev->visorchannel David Kershner
2017-07-17 20:16 ` [PATCH 17/42] staging: unisys: visorbus: visorbus_main.c: put function name and return value on same line David Kershner
2017-07-17 20:16 ` [PATCH 18/42] staging: unisys: visorbus: visorbus_main.c: remove check from typename_show David Kershner
2017-07-17 20:16 ` [PATCH 19/42] staging: unisys: visorbus: add checks for probe, remove, pause and resume in visorbus_register_visor_driver David Kershner
2017-07-18  6:44   ` Greg KH
2017-07-17 20:17 ` [PATCH 20/42] staging: unisys: remove unused define VISOR_VSWITCH_CHANNEL_VERSIONID David Kershner
2017-07-17 20:17 ` [PATCH 21/42] staging: unisys: include: Remove unused CHANNEL_OK defines David Kershner
2017-07-17 20:17 ` [PATCH 22/42] staging: unisys: moved visor_check_channel from include/channel.h to visorbus/visorbus_main.c David Kershner
2017-07-17 20:17 ` [PATCH 23/42] staging: unisys: visorbus: Fix memory leak David Kershner
2017-07-17 20:17 ` [PATCH 24/42] staging: unisys: visorbus: Beginning of the file /* on its own line David Kershner
2017-07-18  6:44   ` Greg KH
2017-07-17 20:17 ` [PATCH 25/42] staging: unisys: include: iochannel.h: Removed unused DEFINE David Kershner
2017-07-18  6:45   ` Greg KH
2017-07-17 20:17 ` [PATCH 26/42] staging: unisys: visorbus: Adding a new line between function definition David Kershner
2017-07-18  6:45   ` Greg KH
2017-07-17 20:17 ` [PATCH 27/42] staging: unisys: visorbus: rename fix_vbus_dev_info David Kershner
2017-07-17 20:17 ` [PATCH 28/42] staging: unisys: visorbus: remove target_hostname comment David Kershner
2017-07-17 20:17 ` [PATCH 29/42] staging: unisys: visorchipset: remove local_addr in handle_command David Kershner
2017-07-18  8:45   ` Dan Carpenter
2017-07-17 20:17 ` [PATCH 30/42] staging: unisys: visorbus: Update comment style vbuschannel.h David Kershner
2017-07-18  6:46   ` Greg KH
2017-07-17 20:17 ` [PATCH 31/42] staging: unisys: visorbus: fixed comment in visorbus_private.h David Kershner
2017-07-18  6:46   ` Greg KH
2017-07-17 20:17 ` [PATCH 32/42] staging: unisys: visorbus: removed blank line in viorbus_main.c David Kershner
2017-07-17 20:17 ` [PATCH 33/42] staging: unisys: visorbus: Removed unused define from visorbus_main.c David Kershner
2017-07-17 20:17 ` [PATCH 34/42] staging: unisys: visorbus: cleaned up include block of visorchipset.c David Kershner
2017-07-17 20:17 ` [PATCH 35/42] staging: unisys: visorbus: Remove unused define for visorchipset David Kershner
2017-07-17 20:17 ` [PATCH 36/42] staging: unisys: include: Remove COVER macro from channel.h David Kershner
2017-07-17 20:17 ` [PATCH 37/42] staging: unisys: visorbus: fix multi-line function definition David Kershner
2017-07-18  6:49   ` Greg KH
2017-07-17 20:17 ` [PATCH 38/42] staging: unisys: visorbus: visorchannel.c: " David Kershner
2017-07-17 20:17 ` [PATCH 39/42] staging: unisys: visorhba: " David Kershner
2017-07-17 20:17 ` [PATCH 40/42] staging: unisys: visorinput: " David Kershner
2017-07-17 20:17 ` [PATCH 41/42] staging: unisys: visornic: " David Kershner
2017-07-17 20:17 ` [PATCH 42/42] staging: unisys: visornic: update the struct viosrnic_devdata to have kernel-doc like comments David Kershner
2017-07-18  6:48   ` Greg KH
2017-07-18  6:50 ` [PATCH 00/42] staging: unisys: More updates to the code Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).