All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] staging: unisys: Remove version information
@ 2016-09-26 15:03 David Kershner
  2016-09-26 15:03 ` [PATCH 1/9] staging: unisys: remove driver version from struct visor_driver David Kershner
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

This patch series removes the Unisys s-Par specific versioning
and replaces it where approrpriate with the kernel version.

This series also converts several bool return types to the
more appropriate error returns. It does not completely fix error
handling with the new functions; that will be addressed in another
series that overhauls error handling for the driver.

David Binder (3):
  staging: unisys: visorbus: Change support functions to integer return
    vals
  staging: unisys: visorbus: Convert visorchannel_signalremove() return
    val
  staging: unisys: visorbus: Convert visorchannel_signalinsert() return
    val

Jon Frisch (6):
  staging: unisys: remove driver version from struct visor_driver
  staging: unisys: visorbus: remove driver version from visorchipset.c
  staging: unisys: visorinput: remove driver version from visorinput.c
  staging: unisys: visornic: remove driver version from visornic_main.c
  staging: unisys: remove version.h
  staging: unisys: make MODULE_DESCRIPTIONs consistent

 drivers/staging/unisys/include/version.h           |  45 --------
 drivers/staging/unisys/include/visorbus.h          |  14 +--
 drivers/staging/unisys/visorbus/vbuschannel.h      |   3 +-
 drivers/staging/unisys/visorbus/visorbus_main.c    |  76 +------------
 drivers/staging/unisys/visorbus/visorbus_private.h |  12 +-
 drivers/staging/unisys/visorbus/visorchannel.c     | 123 ++++++++++-----------
 drivers/staging/unisys/visorbus/visorchipset.c     |  31 +++---
 drivers/staging/unisys/visorhba/visorhba_main.c    |  20 ++--
 drivers/staging/unisys/visorinput/visorinput.c     |   7 +-
 drivers/staging/unisys/visornic/visornic_main.c    |  33 +++---
 10 files changed, 114 insertions(+), 250 deletions(-)
 delete mode 100644 drivers/staging/unisys/include/version.h

-- 
1.9.1

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

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

* [PATCH 1/9] staging: unisys: remove driver version from struct visor_driver
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-26 15:03 ` [PATCH 2/9] staging: unisys: visorbus: remove driver version from visorchipset.c David Kershner
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: Jon Frisch, David Kershner

From: Jon Frisch <jon.frisch@unisys.com>

This patch removes the all instances of the driver version from
struct visor_driver. This includes removing version, vertag
(a human readable version string of the driver version) and
version_attr from struct visor_driver. This resulted in removing the
bus attributes and driver attributes which only contained the driver
version. The utsname function is used to replace the driver version
with the kernel version in bus_device_info_init().

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h          |  6 --
 drivers/staging/unisys/visorbus/vbuschannel.h      |  3 +-
 drivers/staging/unisys/visorbus/visorbus_main.c    | 76 +---------------------
 drivers/staging/unisys/visorbus/visorbus_private.h | 12 ++--
 drivers/staging/unisys/visorinput/visorinput.c     |  1 -
 drivers/staging/unisys/visornic/visornic_main.c    |  2 -
 6 files changed, 8 insertions(+), 92 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 993cf19..2e508c2 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -66,8 +66,6 @@ struct visor_channeltype_descriptor {
  * struct visor_driver - Information provided by each visor driver when it
  * registers with the visorbus driver.
  * @name:		Name of the visor driver.
- * @version:		The numbered version of the driver (x.x.xxx).
- * @vertag:		A human readable version string.
  * @owner:		The module owner.
  * @channel_types:	Types of channels handled by this driver, ending with
  *			a zero GUID. Our specialized BUS.match() method knows
@@ -94,12 +92,9 @@ struct visor_channeltype_descriptor {
  * @resume:		Behaves similar to pause.
  * @driver:		Private reference to the device driver. For use by bus
  *			driver only.
- * @version_attr:	Private version field. For use by bus driver only.
  */
 struct visor_driver {
 	const char *name;
-	const char *version;
-	const char *vertag;
 	struct module *owner;
 	struct visor_channeltype_descriptor *channel_types;
 	int (*probe)(struct visor_device *dev);
@@ -112,7 +107,6 @@ struct visor_driver {
 
 	/* These fields are for private use by the bus driver only. */
 	struct device_driver driver;
-	struct driver_attribute version_attr;
 };
 
 #define to_visor_driver(x) ((x) ? \
diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h
index 3f7830b..e979175 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/staging/unisys/visorbus/vbuschannel.h
@@ -67,8 +67,7 @@ static const uuid_le spar_vbus_channel_protocol_uuid =
 struct ultra_vbus_deviceinfo {
 	u8 devtype[16];		/* short string identifying the device type */
 	u8 drvname[16];		/* driver .sys file name */
-	u8 infostrs[96];	/* sequence of tab-delimited id strings: */
-	/* <DRIVER_REV> <DRIVER_VERTAG> <DRIVER_COMPILETIME> */
+	u8 infostrs[96];	/* kernel version */
 	u8 reserved[128];	/* pad size to 256 bytes */
 };
 
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 3918bb5..1f3d2e0 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -18,7 +18,6 @@
 
 #include "visorbus.h"
 #include "visorbus_private.h"
-#include "version.h"
 #include "vmcallinterface.h"
 
 #define MYDRVNAME "visorbus"
@@ -36,34 +35,6 @@ static int visorbus_forcenomatch;
 static int busreg_rc = -ENODEV; /* stores the result from bus registration */
 
 /*
- * BUS type attributes
- *
- * define & implement display of bus attributes under
- * /sys/bus/visorbus.
- */
-
-static ssize_t version_show(struct bus_type *bus, char *buf)
-{
-	return snprintf(buf, PAGE_SIZE, "%s\n", VERSION);
-}
-
-static BUS_ATTR_RO(version);
-
-static struct attribute *visorbus_bus_attrs[] = {
-	&bus_attr_version.attr,
-	NULL,
-};
-
-static const struct attribute_group visorbus_bus_group = {
-	.attrs = visorbus_bus_attrs,
-};
-
-static const struct attribute_group *visorbus_bus_groups[] = {
-	&visorbus_bus_group,
-	NULL,
-};
-
-/*
  * DEVICE type attributes
  *
  * The modalias file will contain the guid of the device.
@@ -167,7 +138,6 @@ struct bus_type visorbus_type = {
 	.match = visorbus_match,
 	.uevent = visorbus_uevent,
 	.dev_groups = visorbus_dev_groups,
-	.bus_groups = visorbus_bus_groups,
 };
 
 /**
@@ -465,36 +435,6 @@ static const struct attribute_group *visorbus_groups[] = {
 		NULL
 };
 
-/*
- *  DRIVER attributes
- *
- *  define & implement display of driver attributes under
- *  /sys/bus/visorbus/drivers/<drivername>.
- */
-
-static ssize_t
-DRIVER_ATTR_version(struct device_driver *xdrv, char *buf)
-{
-	struct visor_driver *drv = to_visor_driver(xdrv);
-
-	return snprintf(buf, PAGE_SIZE, "%s\n", drv->version);
-}
-
-static int
-register_driver_attributes(struct visor_driver *drv)
-{
-	struct driver_attribute version =
-	    __ATTR(version, S_IRUGO, DRIVER_ATTR_version, NULL);
-	drv->version_attr = version;
-	return driver_create_file(&drv->driver, &drv->version_attr);
-}
-
-static void
-unregister_driver_attributes(struct visor_driver *drv)
-{
-	driver_remove_file(&drv->driver, &drv->version_attr);
-}
-
 static void
 dev_periodic_work(unsigned long __opaque)
 {
@@ -567,7 +507,6 @@ visordriver_remove_device(struct device *xdev)
 void
 visorbus_unregister_visor_driver(struct visor_driver *drv)
 {
-	unregister_driver_attributes(drv);
 	driver_unregister(&drv->driver);
 }
 EXPORT_SYMBOL_GPL(visorbus_unregister_visor_driver);
@@ -882,9 +821,7 @@ fix_vbus_dev_info(struct visor_device *visordev)
 		}
 	}
 
-	bus_device_info_init(&dev_info, chan_type_name,
-			     visordrv->name, visordrv->version,
-			     visordrv->vertag);
+	bus_device_info_init(&dev_info, chan_type_name, visordrv->name);
 	write_vbus_dev_info(bdev->visorchannel, hdr_info, &dev_info, dev_no);
 
 	/*
@@ -1015,9 +952,6 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
 
 	rc = driver_register(&drv->driver);
 	if (rc < 0)
-		return rc;
-	rc = register_driver_attributes(drv);
-	if (rc < 0)
 		driver_unregister(&drv->driver);
 	return rc;
 }
@@ -1343,9 +1277,7 @@ visorbus_init(void)
 	int err;
 
 	POSTCODE_LINUX_3(DRIVER_ENTRY_PC, 0, POSTCODE_SEVERITY_INFO);
-	bus_device_info_init(&clientbus_driverinfo,
-			     "clientbus", "visorbus",
-			     VERSION, NULL);
+	bus_device_info_init(&clientbus_driverinfo, "clientbus", "visorbus");
 
 	err = create_bus_type();
 	if (err < 0) {
@@ -1353,9 +1285,7 @@ visorbus_init(void)
 		goto error;
 	}
 
-	bus_device_info_init(&chipset_driverinfo,
-			     "chipset", "visorchipset",
-			     VERSION, NULL);
+	bus_device_info_init(&chipset_driverinfo, "chipset", "visorchipset");
 
 	return 0;
 
diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h
index 2f4e1e6..15403fb 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/staging/unisys/visorbus/visorbus_private.h
@@ -18,6 +18,7 @@
 #define __VISORBUS_PRIVATE_H__
 
 #include <linux/uuid.h>
+#include <linux/utsname.h>
 
 #include "controlvmchannel.h"
 #include "vbuschannel.h"
@@ -26,12 +27,9 @@
  * command line
  */
 
-#define TARGET_HOSTNAME "linuxguest"
-
 static inline void bus_device_info_init(
 		struct ultra_vbus_deviceinfo *bus_device_info_ptr,
-		const char *dev_type, const char *drv_name,
-		const char *ver, const char *ver_tag)
+		const char *dev_type, const char *drv_name)
 {
 	memset(bus_device_info_ptr, 0, sizeof(struct ultra_vbus_deviceinfo));
 	snprintf(bus_device_info_ptr->devtype,
@@ -41,10 +39,8 @@ static inline void bus_device_info_init(
 		 sizeof(bus_device_info_ptr->drvname),
 		 "%s", (drv_name) ? drv_name : "unknownDriver");
 	snprintf(bus_device_info_ptr->infostrs,
-		 sizeof(bus_device_info_ptr->infostrs), "%s\t%s\t%s",
-		 (ver) ? ver : "unknownVer",
-		 (ver_tag) ? ver_tag : "unknownVerTag",
-		 TARGET_HOSTNAME);
+		 sizeof(bus_device_info_ptr->infostrs), "kernel ver. %s",
+		 utsname()->release);
 }
 
 void chipset_bus_create(struct visor_device *bus_info);
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index 641cdab..4e0b26d 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -735,7 +735,6 @@ static struct visor_channeltype_descriptor visorinput_channel_types[] = {
 
 static struct visor_driver visorinput_driver = {
 	.name = "visorinput",
-	.vertag = NULL,
 	.owner = THIS_MODULE,
 	.channel_types = visorinput_channel_types,
 	.probe = visorinput_probe,
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 6b206be..7a58d2e 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -2033,8 +2033,6 @@ static int visornic_resume(struct visor_device *dev,
  */
 static struct visor_driver visornic_driver = {
 	.name = "visornic",
-	.version = "1.0.0.0",
-	.vertag = NULL,
 	.owner = THIS_MODULE,
 	.channel_types = visornic_channel_types,
 	.probe = visornic_probe,
-- 
1.9.1

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

* [PATCH 2/9] staging: unisys: visorbus: remove driver version from visorchipset.c
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
  2016-09-26 15:03 ` [PATCH 1/9] staging: unisys: remove driver version from struct visor_driver David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-26 15:03 ` [PATCH 3/9] staging: unisys: visorinput: remove driver version from visorinput.c David Kershner
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Jon Frisch

From: Jon Frisch <jon.frisch@unisys.com>

This patch removes the driver version and the version.h include
from visorchipset.c

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 39e8aca..fe3a773 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -25,7 +25,6 @@
 #include <linux/uuid.h>
 #include <linux/crash_dump.h>
 
-#include "version.h"
 #include "visorbus.h"
 #include "visorbus_private.h"
 #include "vmcallinterface.h"
@@ -2264,6 +2263,4 @@ module_exit(exit_unisys);
 
 MODULE_AUTHOR("Unisys");
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Supervisor chipset driver for service partition: ver "
-		   VERSION);
-MODULE_VERSION(VERSION);
+MODULE_DESCRIPTION("Supervisor chipset driver for service partition");
-- 
1.9.1

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

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

* [PATCH 3/9] staging: unisys: visorinput: remove driver version from visorinput.c
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
  2016-09-26 15:03 ` [PATCH 1/9] staging: unisys: remove driver version from struct visor_driver David Kershner
  2016-09-26 15:03 ` [PATCH 2/9] staging: unisys: visorbus: remove driver version from visorchipset.c David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-26 15:03 ` [PATCH 4/9] staging: unisys: visornic: remove driver version from visornic_main.c David Kershner
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: Jon Frisch, David Kershner

From: Jon Frisch <jon.frisch@unisys.com>

This patch removes the driver version and the version.h include
from visorinput.c

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/visorinput/visorinput.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index 4e0b26d..afdf2b5 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -29,7 +29,6 @@
 #include <linux/kernel.h>
 #include <linux/uuid.h>
 
-#include "version.h"
 #include "visorbus.h"
 #include "ultrainputreport.h"
 
@@ -764,7 +763,6 @@ MODULE_DEVICE_TABLE(visorbus, visorinput_channel_types);
 MODULE_AUTHOR("Unisys");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("s-Par human input driver for guest Linux");
-MODULE_VERSION(VERSION);
 
 MODULE_ALIAS("visorbus:" SPAR_MOUSE_CHANNEL_PROTOCOL_UUID_STR);
 MODULE_ALIAS("visorbus:" SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID_STR);
-- 
1.9.1

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

* [PATCH 4/9] staging: unisys: visornic: remove driver version from visornic_main.c
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
                   ` (2 preceding siblings ...)
  2016-09-26 15:03 ` [PATCH 3/9] staging: unisys: visorinput: remove driver version from visorinput.c David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-26 15:03 ` [PATCH 5/9] staging: unisys: remove version.h David Kershner
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: Jon Frisch, David Kershner

From: Jon Frisch <jon.frisch@unisys.com>

This patch removes the driver version from visornic_main.c

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/visornic/visornic_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 7a58d2e..c001225 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -2096,5 +2096,4 @@ module_exit(visornic_cleanup);
 
 MODULE_AUTHOR("Unisys");
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("sPAR nic driver for sparlinux: ver 1.0.0.0");
-MODULE_VERSION("1.0.0.0");
+MODULE_DESCRIPTION("sPAR nic driver for sparlinux");
-- 
1.9.1

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

* [PATCH 5/9] staging: unisys: remove version.h
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
                   ` (3 preceding siblings ...)
  2016-09-26 15:03 ` [PATCH 4/9] staging: unisys: visornic: remove driver version from visornic_main.c David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-26 15:03 ` [PATCH 6/9] staging: unisys: make MODULE_DESCRIPTIONs consistent David Kershner
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: Jon Frisch, David Kershner

From: Jon Frisch <jon.frisch@unisys.com>

This patch removes version.h and the last version.h
include in visorchannel.c.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/include/version.h       | 45 --------------------------
 drivers/staging/unisys/visorbus/visorchannel.c |  1 -
 2 files changed, 46 deletions(-)
 delete mode 100644 drivers/staging/unisys/include/version.h

diff --git a/drivers/staging/unisys/include/version.h b/drivers/staging/unisys/include/version.h
deleted file mode 100644
index 83d1da7..0000000
--- a/drivers/staging/unisys/include/version.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 2010 - 2013 UNISYS CORPORATION
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- */
-
-/* version.h */
-
-/*  Common version/release info needed by all components goes here.
- *  (This file must compile cleanly in all environments.)
- *  Ultimately, this will be combined with defines generated dynamically as
- *  part of the sysgen, and some of the defines below may in fact end up
- *  being replaced with dynamically generated ones.
- */
-#ifndef __VERSION_H__
-#define __VERSION_H__
-
-#define SPARVER1 "1"
-#define SPARVER2 "0"
-#define SPARVER3 "0"
-#define SPARVER4 "0"
-
-#define  VERSION        SPARVER1 "." SPARVER2 "." SPARVER3 "." SPARVER4
-
-/* Here are various version forms needed in Windows environments.
- */
-#define VISOR_PRODUCTVERSION      SPARVERCOMMA
-#define VISOR_PRODUCTVERSION_STR  SPARVER1 "." SPARVER2 "." SPARVER3 "." \
-	SPARVER4
-#define VISOR_OBJECTVERSION_STR   SPARVER1 "," SPARVER2 "," SPARVER3 "," \
-	SPARVER4
-
-#define  COPYRIGHT      "Unisys Corporation"
-#define  COPYRIGHTDATE  "2010 - 2013"
-
-#endif
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index b84c8d8..6cfd213 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -22,7 +22,6 @@
 #include <linux/uuid.h>
 #include <linux/io.h>
 
-#include "version.h"
 #include "visorbus.h"
 #include "controlvmchannel.h"
 
-- 
1.9.1

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

* [PATCH 6/9] staging: unisys: make MODULE_DESCRIPTIONs consistent
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
                   ` (4 preceding siblings ...)
  2016-09-26 15:03 ` [PATCH 5/9] staging: unisys: remove version.h David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-26 15:03 ` [PATCH 7/9] staging: unisys: visorbus: Change support functions to integer return vals David Kershner
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: Jon Frisch, David Kershner

From: Jon Frisch <jon.frisch@unisys.com>

This patch ensures that consistent verbiage is used in the
MODULE_DESCRIPTION text (reported by 'modinfo') for all of
the Unisys s-Par drivers.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c  | 2 +-
 drivers/staging/unisys/visorhba/visorhba_main.c | 2 +-
 drivers/staging/unisys/visorinput/visorinput.c  | 2 +-
 drivers/staging/unisys/visornic/visornic_main.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index fe3a773..e95d04d 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -2263,4 +2263,4 @@ module_exit(exit_unisys);
 
 MODULE_AUTHOR("Unisys");
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Supervisor chipset driver for service partition");
+MODULE_DESCRIPTION("s-Par visorbus driver for virtual device buses");
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 5ab5c3f..887be22 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -1220,4 +1220,4 @@ module_exit(visorhba_exit);
 
 MODULE_AUTHOR("Unisys");
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("s-Par hba driver");
+MODULE_DESCRIPTION("s-Par HBA driver for virtual SCSI host busses");
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index afdf2b5..aa44414 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -762,7 +762,7 @@ MODULE_DEVICE_TABLE(visorbus, visorinput_channel_types);
 
 MODULE_AUTHOR("Unisys");
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("s-Par human input driver for guest Linux");
+MODULE_DESCRIPTION("s-Par human input driver for virtual keyboard/mouse");
 
 MODULE_ALIAS("visorbus:" SPAR_MOUSE_CHANNEL_PROTOCOL_UUID_STR);
 MODULE_ALIAS("visorbus:" SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID_STR);
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index c001225..2b3ba49 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -2096,4 +2096,4 @@ module_exit(visornic_cleanup);
 
 MODULE_AUTHOR("Unisys");
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("sPAR nic driver for sparlinux");
+MODULE_DESCRIPTION("s-Par NIC driver for virtual network devices");
-- 
1.9.1

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

* [PATCH 7/9] staging: unisys: visorbus: Change support functions to integer return vals
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
                   ` (5 preceding siblings ...)
  2016-09-26 15:03 ` [PATCH 6/9] staging: unisys: make MODULE_DESCRIPTIONs consistent David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-26 15:03 ` [PATCH 8/9] staging: unisys: visorbus: Convert visorchannel_signalremove() return val David Kershner
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

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

Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer value. This commit changes
several functions and a macro, internal to visorchannel.c, to follow this
paradigm. These changes will be necessary later on to change other
functions in this file, which are part of the visorbus API, to return
integer values in lieu of a boolean.

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

diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 6cfd213..fe5a620 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -185,76 +185,66 @@ visorchannel_get_header(struct visorchannel *channel)
  * into host memory
  */
 #define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD)			 \
-	(visorchannel_write(channel,					 \
-			    SIG_QUEUE_OFFSET(&channel->chan_hdr, queue) +\
-			    offsetof(struct signal_queue_header, FIELD), \
-			    &((sig_hdr)->FIELD),			 \
-			    sizeof((sig_hdr)->FIELD)) >= 0)
+	visorchannel_write(channel,					 \
+			   SIG_QUEUE_OFFSET(&channel->chan_hdr, queue) +\
+			   offsetof(struct signal_queue_header, FIELD), \
+			   &((sig_hdr)->FIELD),			 \
+			   sizeof((sig_hdr)->FIELD))
 
-static bool
+static int
 sig_read_header(struct visorchannel *channel, u32 queue,
 		struct signal_queue_header *sig_hdr)
 {
-	int err;
-
 	if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header))
-		return false;
+		return -EINVAL;
 
 	/* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */
-	err = visorchannel_read(channel,
-				SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
-				sig_hdr, sizeof(struct signal_queue_header));
-	if (err)
-		return false;
-
-	return true;
+	return visorchannel_read(channel,
+				 SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
+				 sig_hdr, sizeof(struct signal_queue_header));
 }
 
-static inline bool
+static inline int
 sig_read_data(struct visorchannel *channel, u32 queue,
 	      struct signal_queue_header *sig_hdr, u32 slot, void *data)
 {
-	int err;
 	int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
 						 sig_hdr, slot);
 
-	err = visorchannel_read(channel, signal_data_offset,
-				data, sig_hdr->signal_size);
-	if (err)
-		return false;
-
-	return true;
+	return visorchannel_read(channel, signal_data_offset,
+				 data, sig_hdr->signal_size);
 }
 
-static inline bool
+static inline int
 sig_write_data(struct visorchannel *channel, u32 queue,
 	       struct signal_queue_header *sig_hdr, u32 slot, void *data)
 {
-	int err;
 	int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
 						 sig_hdr, slot);
 
-	err = visorchannel_write(channel, signal_data_offset,
-				 data, sig_hdr->signal_size);
-	if (err)
-		return false;
-
-	return true;
+	return visorchannel_write(channel, signal_data_offset,
+				  data, sig_hdr->signal_size);
 }
 
-static bool
+static int
 signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
 {
 	struct signal_queue_header sig_hdr;
+	int error;
+
+	error = sig_read_header(channel, queue, &sig_hdr);
+	if (error)
+		return error;
 
-	if (!sig_read_header(channel, queue, &sig_hdr))
-		return false;
 	if (sig_hdr.head == sig_hdr.tail)
-		return false;	/* no signals to remove */
+		return -EIO;	/* no signals to remove */
 
 	sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots;
-	if (!sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg))
-		return false;
+
+	error = sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg);
+	if (error)
+		return error;
+
 	sig_hdr.num_received++;
 
 	/*
@@ -262,11 +252,15 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
 	 * update host memory.
 	 */
 	mb(); /* required for channel synch */
-	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, tail))
-		return false;
-	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_received))
-		return false;
-	return true;
+
+	error = SIG_WRITE_FIELD(channel, queue, &sig_hdr, tail);
+	if (error)
+		return error;
+	error = SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_received);
+	if (error)
+		return error;
+
+	return 0;
 }
 
 /**
@@ -292,7 +286,7 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
 		rc = signalremove_inner(channel, queue, msg);
 	}
 
-	return rc;
+	return !rc;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalremove);
 
@@ -315,7 +309,7 @@ visorchannel_signalempty(struct visorchannel *channel, u32 queue)
 	if (channel->needs_lock)
 		spin_lock_irqsave(&channel->remove_lock, flags);
 
-	if (!sig_read_header(channel, queue, &sig_hdr))
+	if (sig_read_header(channel, queue, &sig_hdr))
 		rc = true;
 	if (sig_hdr.head == sig_hdr.tail)
 		rc = true;
@@ -326,13 +320,15 @@ visorchannel_signalempty(struct visorchannel *channel, u32 queue)
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalempty);
 
-static bool
+static int
 signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
 {
 	struct signal_queue_header sig_hdr;
+	int error;
 
-	if (!sig_read_header(channel, queue, &sig_hdr))
-		return false;
+	error = sig_read_header(channel, queue, &sig_hdr);
+	if (error)
+		return error;
 
 	sig_hdr.head = (sig_hdr.head + 1) % sig_hdr.max_slots;
 	if (sig_hdr.head == sig_hdr.tail) {
@@ -343,11 +339,12 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
 					    num_overflows),
 				   &sig_hdr.num_overflows,
 				   sizeof(sig_hdr.num_overflows));
-		return false;
+		return -EIO;
 	}
 
-	if (!sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg))
-		return false;
+	error = sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg);
+	if (error)
+		return error;
 
 	sig_hdr.num_sent++;
 
@@ -356,12 +353,15 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
 	 * update host memory.
 	 */
 	mb(); /* required for channel synch */
-	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, head))
-		return false;
-	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent))
-		return false;
 
-	return true;
+	error = SIG_WRITE_FIELD(channel, queue, &sig_hdr, head);
+	if (error)
+		return error;
+	error = SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent);
+	if (error)
+		return error;
+
+	return 0;
 }
 
 /**
@@ -509,6 +509,6 @@ visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 		rc = signalinsert_inner(channel, queue, msg);
 	}
 
-	return rc;
+	return !rc;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalinsert);
-- 
1.9.1

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

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

* [PATCH 8/9] staging: unisys: visorbus: Convert visorchannel_signalremove() return val
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
                   ` (6 preceding siblings ...)
  2016-09-26 15:03 ` [PATCH 7/9] staging: unisys: visorbus: Change support functions to integer return vals David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-26 15:03 ` [PATCH 9/9] staging: unisys: visorbus: Convert visorchannel_signalinsert() " David Kershner
  2016-09-27  9:55 ` [PATCH 0/9] staging: unisys: Remove version information Dan Carpenter
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

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

Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer. This commit converts the
visorbus API function, visorchannel_signalremove(), to returning integer
values. All uses of this function are updated accordingly.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h       |  4 ++--
 drivers/staging/unisys/visorbus/visorchannel.c  |  8 ++++----
 drivers/staging/unisys/visorbus/visorchipset.c  | 10 +++++-----
 drivers/staging/unisys/visorhba/visorhba_main.c |  6 +++---
 drivers/staging/unisys/visorinput/visorinput.c  |  2 +-
 drivers/staging/unisys/visornic/visornic_main.c | 12 ++++++------
 6 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 2e508c2..a4442c3 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -200,8 +200,8 @@ enum diag_severity {
 	DIAG_SEVERITY_PRINT = 4,
 };
 
-bool visorchannel_signalremove(struct visorchannel *channel, u32 queue,
-			       void *msg);
+int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
+			      void *msg);
 bool visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
 			       void *msg);
 bool visorchannel_signalempty(struct visorchannel *channel, u32 queue);
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index fe5a620..70fcd1f 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -270,12 +270,12 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
  * @queue:   the queue the message will be removed from
  * @msg:     the message to remove
  *
- * Return: boolean indicating whether the removal succeeded or failed
+ * Return: integer error code indicating the status of the removal
  */
-bool
+int
 visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
 {
-	bool rc;
+	int rc;
 	unsigned long flags;
 
 	if (channel->needs_lock) {
@@ -286,7 +286,7 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
 		rc = signalremove_inner(channel, queue, msg);
 	}
 
-	return !rc;
+	return rc;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalremove);
 
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index e95d04d..ed4eced 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -2000,8 +2000,8 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
 static bool
 read_controlvm_event(struct controlvm_message *msg)
 {
-	if (visorchannel_signalremove(controlvm_channel,
-				      CONTROLVM_QUEUE_EVENT, msg)) {
+	if (!visorchannel_signalremove(controlvm_channel,
+				       CONTROLVM_QUEUE_EVENT, msg)) {
 		/* got a message */
 		if (msg->hdr.flags.test_message == 1)
 			return false;
@@ -2048,9 +2048,9 @@ controlvm_periodic_work(struct work_struct *work)
 	bool got_command = false;
 	bool handle_command_failed = false;
 
-	while (visorchannel_signalremove(controlvm_channel,
-					 CONTROLVM_QUEUE_RESPONSE,
-					 &inmsg))
+	while (!visorchannel_signalremove(controlvm_channel,
+					  CONTROLVM_QUEUE_RESPONSE,
+					  &inmsg))
 		;
 	if (!got_command) {
 		if (controlvm_pending_msg_valid) {
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 887be22..e968f33 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -927,9 +927,9 @@ drain_queue(struct uiscmdrsp *cmdrsp, struct visorhba_devdata *devdata)
 	struct scsi_cmnd *scsicmd;
 
 	while (1) {
-		if (!visorchannel_signalremove(devdata->dev->visorchannel,
-					       IOCHAN_FROM_IOPART,
-					       cmdrsp))
+		if (visorchannel_signalremove(devdata->dev->visorchannel,
+					      IOCHAN_FROM_IOPART,
+					      cmdrsp))
 			break; /* queue empty */
 
 		if (cmdrsp->cmdtype == CMD_SCSI_TYPE) {
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index aa44414..6f94b64 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -581,7 +581,7 @@ visorinput_channel_interrupt(struct visor_device *dev)
 
 	visorinput_dev = devdata->visorinput_dev;
 
-	while (visorchannel_signalremove(dev->visorchannel, 0, &r)) {
+	while (!visorchannel_signalremove(dev->visorchannel, 0, &r)) {
 		scancode = r.activity.arg1;
 		keycode = scancode_to_keycode(scancode);
 		switch (r.activity.action) {
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 2b3ba49..8e70b36 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1539,9 +1539,9 @@ send_rcv_posts_if_needed(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,
-					 cmdrsp))
+	while (!visorchannel_signalremove(devdata->dev->visorchannel,
+					  IOCHAN_FROM_IOPART,
+					  cmdrsp))
 		;
 }
 
@@ -1565,9 +1565,9 @@ service_resp_queue(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata,
 	/* TODO: CLIENT ACQUIRE -- Don't really need this at the
 	 * moment
 	 */
-		if (!visorchannel_signalremove(devdata->dev->visorchannel,
-					       IOCHAN_FROM_IOPART,
-					       cmdrsp))
+		if (visorchannel_signalremove(devdata->dev->visorchannel,
+					      IOCHAN_FROM_IOPART,
+					      cmdrsp))
 			break; /* queue empty */
 
 		switch (cmdrsp->net.type) {
-- 
1.9.1

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

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

* [PATCH 9/9] staging: unisys: visorbus: Convert visorchannel_signalinsert() return val
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
                   ` (7 preceding siblings ...)
  2016-09-26 15:03 ` [PATCH 8/9] staging: unisys: visorbus: Convert visorchannel_signalremove() return val David Kershner
@ 2016-09-26 15:03 ` David Kershner
  2016-09-27  9:55 ` [PATCH 0/9] staging: unisys: Remove version information Dan Carpenter
  9 siblings, 0 replies; 11+ messages in thread
From: David Kershner @ 2016-09-26 15:03 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen
  Cc: David Binder, David Kershner

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

Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer. This commit converts the
visorbus API function, visorchannel_signalinsert(), to returning integer
values. All uses of this function are updated accordingly.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h       |  4 ++--
 drivers/staging/unisys/visorbus/visorchannel.c  |  8 ++++----
 drivers/staging/unisys/visorbus/visorchipset.c  | 16 ++++++++--------
 drivers/staging/unisys/visorhba/visorhba_main.c | 12 ++++++------
 drivers/staging/unisys/visornic/visornic_main.c | 16 ++++++++--------
 5 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index a4442c3..677627c 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -202,8 +202,8 @@ enum diag_severity {
 
 int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
 			      void *msg);
-bool visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
-			       void *msg);
+int visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
+			      void *msg);
 bool visorchannel_signalempty(struct visorchannel *channel, u32 queue);
 uuid_le visorchannel_get_uuid(struct visorchannel *channel);
 
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 70fcd1f..300a65d 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -493,12 +493,12 @@ visorchannel_create_with_lock(u64 physaddr, unsigned long channel_bytes,
  * @queue:   the queue the message will be added to
  * @msg:     the message to insert
  *
- * Return: boolean indicating whether the insertion succeeded or failed
+ * Return: integer error code indicating the status of the insertion
  */
-bool
+int
 visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 {
-	bool rc;
+	int rc;
 	unsigned long flags;
 
 	if (channel->needs_lock) {
@@ -509,6 +509,6 @@ visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 		rc = signalinsert_inner(channel, queue, msg);
 	}
 
-	return !rc;
+	return rc;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalinsert);
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index ed4eced..5987149 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -508,8 +508,8 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr,
 
 	controlvm_init_response(&outmsg, msg_hdr, response);
 	outmsg.cmd.init_chipset.features = features;
-	if (!visorchannel_signalinsert(controlvm_channel,
-				       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
+	if (visorchannel_signalinsert(controlvm_channel,
+				      CONTROLVM_QUEUE_REQUEST, &outmsg)) {
 		return;
 	}
 }
@@ -557,8 +557,8 @@ controlvm_respond(struct controlvm_message_header *msg_hdr, int response)
 	if (outmsg.hdr.flags.test_message == 1)
 		return;
 
-	if (!visorchannel_signalinsert(controlvm_channel,
-				       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
+	if (visorchannel_signalinsert(controlvm_channel,
+				      CONTROLVM_QUEUE_REQUEST, &outmsg)) {
 		return;
 	}
 }
@@ -572,8 +572,8 @@ static void controlvm_respond_physdev_changestate(
 	controlvm_init_response(&outmsg, msg_hdr, response);
 	outmsg.cmd.device_change_state.state = state;
 	outmsg.cmd.device_change_state.flags.phys_device = 1;
-	if (!visorchannel_signalinsert(controlvm_channel,
-				       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
+	if (visorchannel_signalinsert(controlvm_channel,
+				      CONTROLVM_QUEUE_REQUEST, &outmsg)) {
 		return;
 	}
 }
@@ -670,8 +670,8 @@ device_changestate_responder(enum controlvm_id cmd_id,
 	outmsg.cmd.device_change_state.dev_no = dev_no;
 	outmsg.cmd.device_change_state.state = response_state;
 
-	if (!visorchannel_signalinsert(controlvm_channel,
-				       CONTROLVM_QUEUE_REQUEST, &outmsg))
+	if (visorchannel_signalinsert(controlvm_channel,
+				      CONTROLVM_QUEUE_REQUEST, &outmsg))
 		return;
 }
 
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index e968f33..5a7a87e 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -335,9 +335,9 @@ static int forward_taskmgmt_command(enum task_mgmt_types tasktype,
 
 	dev_dbg(&scsidev->sdev_gendev,
 		"visorhba: initiating type=%d taskmgmt command\n", tasktype);
-	if (!visorchannel_signalinsert(devdata->dev->visorchannel,
-				       IOCHAN_TO_IOPART,
-				       cmdrsp))
+	if (visorchannel_signalinsert(devdata->dev->visorchannel,
+				      IOCHAN_TO_IOPART,
+				      cmdrsp))
 		goto err_del_scsipending_ent;
 
 	/* It can take the Service Partition up to 35 seconds to complete
@@ -538,9 +538,9 @@ visorhba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	}
 	cmdrsp->scsi.guest_phys_entries = scsi_sg_count(scsicmd);
 
-	if (!visorchannel_signalinsert(devdata->dev->visorchannel,
-				       IOCHAN_TO_IOPART,
-				       cmdrsp))
+	if (visorchannel_signalinsert(devdata->dev->visorchannel,
+				      IOCHAN_TO_IOPART,
+				      cmdrsp))
 		/* queue must be full and we aren't going to wait */
 		goto err_del_scsipending_ent;
 
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 8e70b36..1367007 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -386,9 +386,9 @@ post_skb(struct uiscmdrsp *cmdrsp,
 	if ((cmdrsp->net.rcvpost.frag.pi_off + skb->len) <= PI_PAGE_SIZE) {
 		cmdrsp->net.type = NET_RCV_POST;
 		cmdrsp->cmdtype = CMD_NET_TYPE;
-		if (visorchannel_signalinsert(devdata->dev->visorchannel,
-					      IOCHAN_TO_IOPART,
-					      cmdrsp)) {
+		if (!visorchannel_signalinsert(devdata->dev->visorchannel,
+					       IOCHAN_TO_IOPART,
+					       cmdrsp)) {
 			atomic_inc(&devdata->num_rcvbuf_in_iovm);
 			devdata->chstat.sent_post++;
 		} else {
@@ -415,9 +415,9 @@ send_enbdis(struct net_device *netdev, int state,
 	devdata->cmdrsp_rcv->net.enbdis.context = netdev;
 	devdata->cmdrsp_rcv->net.type = NET_RCV_ENBDIS;
 	devdata->cmdrsp_rcv->cmdtype = CMD_NET_TYPE;
-	if (visorchannel_signalinsert(devdata->dev->visorchannel,
-				      IOCHAN_TO_IOPART,
-				      devdata->cmdrsp_rcv))
+	if (!visorchannel_signalinsert(devdata->dev->visorchannel,
+				       IOCHAN_TO_IOPART,
+				       devdata->cmdrsp_rcv))
 		devdata->chstat.sent_enbdis++;
 }
 
@@ -881,8 +881,8 @@ visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
 		return NETDEV_TX_OK;
 	}
 
-	if (!visorchannel_signalinsert(devdata->dev->visorchannel,
-				       IOCHAN_TO_IOPART, cmdrsp)) {
+	if (visorchannel_signalinsert(devdata->dev->visorchannel,
+				      IOCHAN_TO_IOPART, cmdrsp)) {
 		netif_stop_queue(netdev);
 		spin_unlock_irqrestore(&devdata->priv_lock, flags);
 		devdata->busy_cnt++;
-- 
1.9.1

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

* Re: [PATCH 0/9] staging: unisys: Remove version information
  2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
                   ` (8 preceding siblings ...)
  2016-09-26 15:03 ` [PATCH 9/9] staging: unisys: visorbus: Convert visorchannel_signalinsert() " David Kershner
@ 2016-09-27  9:55 ` Dan Carpenter
  9 siblings, 0 replies; 11+ messages in thread
From: Dan Carpenter @ 2016-09-27  9:55 UTC (permalink / raw)
  To: David Kershner; +Cc: gregkh, sparmaintainer, driverdev-devel, jes.sorensen

You guys are sending good patches these days.  You seem to have the
process down.

regards,
dan carpenter

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

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

end of thread, other threads:[~2016-09-27  9:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-26 15:03 [PATCH 0/9] staging: unisys: Remove version information David Kershner
2016-09-26 15:03 ` [PATCH 1/9] staging: unisys: remove driver version from struct visor_driver David Kershner
2016-09-26 15:03 ` [PATCH 2/9] staging: unisys: visorbus: remove driver version from visorchipset.c David Kershner
2016-09-26 15:03 ` [PATCH 3/9] staging: unisys: visorinput: remove driver version from visorinput.c David Kershner
2016-09-26 15:03 ` [PATCH 4/9] staging: unisys: visornic: remove driver version from visornic_main.c David Kershner
2016-09-26 15:03 ` [PATCH 5/9] staging: unisys: remove version.h David Kershner
2016-09-26 15:03 ` [PATCH 6/9] staging: unisys: make MODULE_DESCRIPTIONs consistent David Kershner
2016-09-26 15:03 ` [PATCH 7/9] staging: unisys: visorbus: Change support functions to integer return vals David Kershner
2016-09-26 15:03 ` [PATCH 8/9] staging: unisys: visorbus: Convert visorchannel_signalremove() return val David Kershner
2016-09-26 15:03 ` [PATCH 9/9] staging: unisys: visorbus: Convert visorchannel_signalinsert() " David Kershner
2016-09-27  9:55 ` [PATCH 0/9] staging: unisys: Remove version information Dan Carpenter

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