All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/45] staging: unisys: more updates to clean up the code.
@ 2017-09-27 17:14 David Kershner
  2017-09-27 17:14 ` [PATCH 01/45] staging: unisys: visorbus: simplify commenting in controlvm_init David Kershner
                   ` (44 more replies)
  0 siblings, 45 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Here are some more updates to clean up the code.

David Binder (3):
  staging: unisys: include: Rename channel.h to visorchannel.h
  staging: unisys: include: Remove unnecessary macro to generate
    signature
  staging: unisys: include: Remove unused enum

David Kershner (37):
  staging: unisys: visorbus: simplify commenting in controlvm_init
  staging: unisys: visorbus: don't need local variable cmd
  staging: unisys: visorbus: clean up parser_string_get function
  staging: unisys: visorbus: visorchannel: use 80 characters for
    comments
  staging: unisys; visorbus: visorchipset.c: remove extraneous newline
  staging: unisys: visorbus: fix alignment of paranethesis
  staging: unisys: visorbus: visorbus_private.h  remove extra blank
    lines
  staging: unisys: visorbus: visorbus_main.c: cleanup and consolidate
    comments
  staging: unisys: visorbus: use guid_is_equal instead of memcmp
  staging: unisys: visorbus: don't put code in declaration.
  staging: unisys: visorbus: NULL pending_msg_hdr not an error
  staging: unisys: fix up device_destroy
  staging: unisys; visorbus: visorbus_main.c: remove extraneous newline
  staging: unisys: visorbus: clean up initializations
  staging: unisys: visorbus: keep the success path on the left
  staging: unisys: shrink the name of a variable
  staging: unisys: visorbus: clean up formatting of function definitions
  staging: unisys: visorbus: simplify debugfs print statment
  staging: unisys: visorbus: Remove unneeded initialization
  staging: unisys: visorbus: fix newlines for visorchannel
  staging: unisys: visorbus: visorchipset: clean up blank lines in
    visorchipset
  staging: unisys: visorbus: visorbus_main.c: remove blank lines
  staging: unisys: visorbus: to_visor_device/to_visor_driver move up
  staging: unisys: only include a file where it is used.
  staging: unisys: include: remove io.h from channel.h
  staging: unisys: visorbus: vbuschannel doesn't use ctypes
  staging: unisys: include: reorder to avoid forward declaration
  staging: unisys: include: remove signature_32
  staging: unisys: include: consolidate a comment
  staging: unisys: visorbus: keep the success path on the left side
  staging: unisys: remove visorbus_type extern
  staging: unisys: visorbus: visorchipset.c: Remove useless
    initializations
  staging: unisys: visorbus: shrink name of
    POLLJIFFIES_CONTROLVMCHANNEL_XXX
  staging: unisys: visorbus: clean up parameter formatting
  staging: unisys: visorbus: Fix extraneous parenthesis
  staging: unisys: visorhba: clean up parenthesis
  staging: unisys: visornic: clean up parenthesis

Sameer Wadgaonkar (5):
  staging: unisys: check the whole channel instead of just guid for
    match
  staging: unisys: visorbus: simplify visorchannel_create_guts
  staging: unisys: visorbus: fix line over 80 characters checkpatch
    warning
  staging: unisys: include: fix comments and spacing issues in
    visorbus.h
  staging: unisys: visorbus: fix comments in vbuschannel.h

 drivers/staging/unisys/include/iochannel.h         |   9 +-
 drivers/staging/unisys/include/visorbus.h          | 159 +++++------
 .../unisys/include/{channel.h => visorchannel.h}   |  12 +-
 drivers/staging/unisys/visorbus/controlvmchannel.h |   3 +-
 drivers/staging/unisys/visorbus/vbuschannel.h      |  12 +-
 drivers/staging/unisys/visorbus/visorbus_main.c    | 269 +++++++++----------
 drivers/staging/unisys/visorbus/visorbus_private.h |   8 +-
 drivers/staging/unisys/visorbus/visorchannel.c     |  81 ++----
 drivers/staging/unisys/visorbus/visorchipset.c     | 298 +++++----------------
 drivers/staging/unisys/visorhba/visorhba_main.c    |  12 +-
 drivers/staging/unisys/visorinput/visorinput.c     |   6 +-
 drivers/staging/unisys/visornic/visornic_main.c    |  10 +-
 12 files changed, 318 insertions(+), 561 deletions(-)
 rename drivers/staging/unisys/include/{channel.h => visorchannel.h} (95%)

-- 
1.9.1

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

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

* [PATCH 01/45] staging: unisys: visorbus: simplify commenting in controlvm_init
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 02/45] staging: unisys: visorbus: don't need local variable cmd David Kershner
                   ` (43 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

During the process of udpating the features bits, put a block comment for
all updates instead of a separate comment for each one.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 74cce4f..315000f 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -377,15 +377,11 @@ static int chipset_init(struct controlvm_message *inmsg)
 
 	/*
 	 * Set features to indicate we support parahotplug (if Command also
-	 * supports it).
+	 * supports it). Set the "reply" bit so Command knows this is a
+	 * features-aware driver.
 	 */
 	features = inmsg->cmd.init_chipset.features &
 		   VISOR_CHIPSET_FEATURE_PARA_HOTPLUG;
-
-	/*
-	 * Set the "reply" bit so Command knows this is a features-aware
-	 * driver.
-	 */
 	features |= VISOR_CHIPSET_FEATURE_REPLY;
 
 out_respond:
-- 
1.9.1

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

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

* [PATCH 02/45] staging: unisys: visorbus: don't need local variable cmd
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
  2017-09-27 17:14 ` [PATCH 01/45] staging: unisys: visorbus: simplify commenting in controlvm_init David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 03/45] staging: unisys: visorbus: clean up parser_string_get function David Kershner
                   ` (42 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The local variable cmd was just being used to dereference a field inside
of it. Get rid of the variable and just derefernce the parameter being
passed in.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 315000f..b7865b1 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -595,9 +595,8 @@ static int visorbus_create(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;
-	u32 bus_no = cmd->destroy_bus.bus_no;
+	u32 bus_no = inmsg->cmd.destroy_bus.bus_no;
 	struct visor_device *bus_info;
 	int err;
 
-- 
1.9.1

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

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

* [PATCH 03/45] staging: unisys: visorbus: clean up parser_string_get function
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
  2017-09-27 17:14 ` [PATCH 01/45] staging: unisys: visorbus: simplify commenting in controlvm_init David Kershner
  2017-09-27 17:14 ` [PATCH 02/45] staging: unisys: visorbus: don't need local variable cmd David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 04/45] staging: unisys: visorbus: visorchannel: use 80 characters for comments David Kershner
                   ` (41 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The function parser_string_get was writing its own strnlen function, use
the kernel version instead.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 24 ++++--------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index b7865b1..ff275d0 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -641,36 +641,20 @@ static const guid_t *parser_id_get(struct parser_context *ctx)
 	return &ctx->data.id;
 }
 
-static void *parser_string_get(struct parser_context *ctx)
+static void *parser_string_get(u8 *pscan, int nscan)
 {
-	u8 *pscan;
-	unsigned long nscan;
 	int value_length;
 	void *value;
-	int i;
 
-	pscan = ctx->curr;
-	if (!pscan)
-		return NULL;
-	nscan = ctx->bytes_remaining;
 	if (nscan == 0)
 		return NULL;
 
-	for (i = 0, value_length = -1; i < nscan; i++)
-		if (pscan[i] == '\0') {
-			value_length = i;
-			break;
-		}
-	/* '\0' was not included in the length */
-	if (value_length < 0)
-		value_length = nscan;
-
-	value = kmalloc(value_length + 1, GFP_KERNEL);
+	value_length = strnlen(pscan, nscan);
+	value = kzalloc(value_length + 1, GFP_KERNEL);
 	if (!value)
 		return NULL;
 	if (value_length > 0)
 		memcpy(value, pscan, value_length);
-	((u8 *)(value))[value_length] = '\0';
 	return value;
 }
 
@@ -685,7 +669,7 @@ static void *parser_name_get(struct parser_context *ctx)
 
 	ctx->curr = (char *)&phdr + phdr->name_offset;
 	ctx->bytes_remaining = phdr->name_length;
-	return parser_string_get(ctx);
+	return parser_string_get(ctx->curr, phdr->name_length);
 }
 
 static int visorbus_configure(struct controlvm_message *inmsg,
-- 
1.9.1

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

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

* [PATCH 04/45] staging: unisys: visorbus: visorchannel: use 80 characters for comments
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (2 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 03/45] staging: unisys: visorbus: clean up parser_string_get function David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 05/45] staging: unisys; visorbus: visorchipset.c: remove extraneous newline David Kershner
                   ` (40 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

In the file visorhcannel.c use all 80 characters for comments instead of
shortening them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchannel.c | 35 +++++++++++++-------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 2a000fe..7665858 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -41,8 +41,8 @@ struct visorchannel {
 	struct channel_header chan_hdr;
 	guid_t guid;
 	/*
-	 * channel creator knows if more than one
-	 * thread will be inserting or removing
+	 * channel creator knows if more than one thread will be inserting or
+	 * removing
 	 */
 	bool needs_lock;
 	/* protect head writes in chan_hdr */
@@ -173,8 +173,8 @@ static int sig_data_offset(struct channel_header *chan_hdr, int q,
 }
 
 /*
- * Write the contents of a specific field within a SIGNAL_QUEUE_HEADER back
- * into host memory
+ * Write the contents of a specific field within a SIGNAL_QUEUE_HEADER back into
+ * host memory
  */
 #define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD) \
 	visorchannel_write(channel, \
@@ -240,8 +240,8 @@ static int signalremove_inner(struct visorchannel *channel, u32 queue,
 	sig_hdr.num_received++;
 
 	/*
-	 * For each data field in SIGNAL_QUEUE_HEADER that was modified,
-	 * update host memory. Required for channel sync.
+	 * For each data field in SIGNAL_QUEUE_HEADER that was modified, update
+	 * host memory. Required for channel sync.
 	 */
 	mb();
 
@@ -293,8 +293,8 @@ static bool queue_empty(struct visorchannel *channel, u32 queue)
 }
 
 /**
- * visorchannel_signalempty() - checks if the designated channel/queue
- *                              contains any messages
+ * visorchannel_signalempty() - checks if the designated channel/queue contains
+ *				any messages
  * @channel: the channel to query
  * @queue:   the queue in the channel to query
  *
@@ -343,8 +343,8 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue,
 	sig_hdr.num_sent++;
 
 	/*
-	 * For each data field in SIGNAL_QUEUE_HEADER that was modified,
-	 * update host memory. Required for channel sync.
+	 * For each data field in SIGNAL_QUEUE_HEADER that was modified, update
+	 * host memory. Required for channel sync.
 	 */
 	mb();
 
@@ -359,9 +359,9 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue,
 }
 
 /*
- * visorchannel_create_guts() - creates the struct visorchannel abstraction
- *                              for a data area in memory, but does NOT modify
- *                              this data area
+ * visorchannel_create_guts() - creates the struct visorchannel abstraction for
+ *				a data area in memory, but does NOT modify this
+ *				data area
  * @physaddr:      physical address of start of channel
  * @gfp:           gfp_t to use when allocating memory for the data struct
  * @guid:          GUID that identifies channel type;
@@ -392,11 +392,10 @@ static struct visorchannel *visorchannel_create_guts(u64 physaddr, gfp_t gfp,
 	spin_lock_init(&channel->remove_lock);
 
 	/*
-	 * Video driver constains the efi framebuffer so it will get a
-	 * conflict resource when requesting its full mem region. Since
-	 * we are only using the efi framebuffer for video we can ignore
-	 * this. Remember that we haven't requested it so we don't try to
-	 * release later on.
+	 * Video driver constains the efi framebuffer so it will get a conflict
+	 * resource when requesting its full mem region. Since we are only
+	 * using the efi framebuffer for video we can ignore this. Remember that
+	 * we haven't requested it so we don't try to release later on.
 	 */
 	channel->requested = request_mem_region(physaddr, size, VISOR_DRV_NAME);
 	if (!channel->requested && !guid_equal(guid, &visor_video_guid))
-- 
1.9.1

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

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

* [PATCH 05/45] staging: unisys; visorbus: visorchipset.c: remove extraneous newline
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (3 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 04/45] staging: unisys: visorbus: visorchannel: use 80 characters for comments David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 06/45] staging: unisys: visorbus: fix alignment of paranethesis David Kershner
                   ` (39 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Use all 80 characters when calling functions.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 31 ++++++++++----------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index ff275d0..7e494e1 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -392,8 +392,7 @@ static int chipset_init(struct controlvm_message *inmsg)
 }
 
 static int controlvm_respond(struct controlvm_message_header *msg_hdr,
-			     int response,
-			     struct visor_segment_state *state)
+			     int response, struct visor_segment_state *state)
 {
 	struct controlvm_message outmsg;
 
@@ -452,8 +451,7 @@ static int save_crash_message(struct controlvm_message *msg,
 	case CRASH_DEV:
 		local_crash_msg_offset += sizeof(struct controlvm_message);
 		err = visorchannel_write(chipset_dev->controlvm_channel,
-					 local_crash_msg_offset,
-					 msg,
+					 local_crash_msg_offset, msg,
 					 sizeof(struct controlvm_message));
 		if (err) {
 			dev_err(&chipset_dev->acpi_device->dev,
@@ -463,8 +461,7 @@ static int save_crash_message(struct controlvm_message *msg,
 		break;
 	case CRASH_BUS:
 		err = visorchannel_write(chipset_dev->controlvm_channel,
-					 local_crash_msg_offset,
-					 msg,
+					 local_crash_msg_offset, msg,
 					 sizeof(struct controlvm_message));
 		if (err) {
 			dev_err(&chipset_dev->acpi_device->dev,
@@ -549,8 +546,7 @@ static int visorbus_create(struct controlvm_message *inmsg)
 	}
 
 	if (inmsg->hdr.flags.response_expected == 1) {
-		pmsg_hdr = kzalloc(sizeof(*pmsg_hdr),
-				   GFP_KERNEL);
+		pmsg_hdr = kzalloc(sizeof(*pmsg_hdr), GFP_KERNEL);
 		if (!pmsg_hdr) {
 			err = -ENOMEM;
 			goto err_free_bus_info;
@@ -1010,13 +1006,13 @@ static int parahotplug_request_complete(int id, u16 active)
 {
 	struct list_head *pos;
 	struct list_head *tmp;
+	struct parahotplug_request *req;
 
 	spin_lock(&parahotplug_request_list_lock);
 
 	/* Look for a request matching "id". */
 	list_for_each_safe(pos, tmp, &parahotplug_request_list) {
-		struct parahotplug_request *req =
-		    list_entry(pos, struct parahotplug_request, list);
+		req = list_entry(pos, struct parahotplug_request, list);
 		if (req->id == id) {
 			/*
 			 * Found a match. Remove it from the list and
@@ -1216,9 +1212,7 @@ static int chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
 {
 	int res;
 
-	res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj,
-			     KOBJ_ONLINE);
-
+	res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj, KOBJ_ONLINE);
 	if (msg_hdr->flags.response_expected)
 		controlvm_respond(msg_hdr, res, NULL);
 
@@ -1343,8 +1337,7 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
 	}
 
 	if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
-		dev_err(&chipset_dev->acpi_device->dev,
-			"invalid count\n");
+		dev_err(&chipset_dev->acpi_device->dev, "invalid count\n");
 		return;
 	}
 
@@ -1409,8 +1402,8 @@ void visorbus_device_changestate_response(struct visor_device *dev_info,
 					  int response,
 					  struct visor_segment_state state)
 {
-	device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
-				     dev_info, response, state);
+	device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE, dev_info,
+				     response, state);
 
 	kfree(dev_info->pending_msg_hdr);
 	dev_info->pending_msg_hdr = NULL;
@@ -1434,8 +1427,8 @@ static struct parser_context *parser_init_stream(u64 addr, u32 bytes,
 	/* alloc an extra byte to ensure payload is \0 terminated */
 	allocbytes = bytes + 1 + (sizeof(struct parser_context) -
 		     sizeof(struct visor_controlvm_parameters_header));
-	if ((chipset_dev->controlvm_payload_bytes_buffered + bytes)
-	    > MAX_CONTROLVM_PAYLOAD_BYTES) {
+	if ((chipset_dev->controlvm_payload_bytes_buffered + bytes) >
+	     MAX_CONTROLVM_PAYLOAD_BYTES) {
 		*retry = true;
 		return NULL;
 	}
-- 
1.9.1

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

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

* [PATCH 06/45] staging: unisys: visorbus: fix alignment of paranethesis
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (4 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 05/45] staging: unisys; visorbus: visorchipset.c: remove extraneous newline David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 07/45] staging: unisys: visorbus: visorbus_private.h remove extra blank lines David Kershner
                   ` (38 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Correct indenting of parameters when calling the functions in the file
visorchipset.c.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 7e494e1..14bc219 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -691,9 +691,8 @@ static int visorbus_configure(struct controlvm_message *inmsg,
 		goto err_respond;
 	}
 
-	err = visorchannel_set_clientpartition
-		(bus_info->visorchannel,
-		 cmd->configure_bus.guest_handle);
+	err = visorchannel_set_clientpartition(bus_info->visorchannel,
+					       cmd->configure_bus.guest_handle);
 	if (err)
 		goto err_respond;
 
@@ -1252,7 +1251,7 @@ static int chipset_selftest_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);
+				 KOBJ_OFFLINE);
 
 	if (msg_hdr->flags.response_expected)
 		controlvm_respond(msg_hdr, res, NULL);
@@ -1275,7 +1274,7 @@ static int unisys_vmcall(unsigned long tuple, unsigned long param)
 		return -EPERM;
 
 	__asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
-		"a"(tuple), "b"(reg_ebx), "c"(reg_ecx));
+			     "a"(tuple), "b"(reg_ebx), "c"(reg_ecx));
 	if (result)
 		goto error;
 
-- 
1.9.1

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

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

* [PATCH 07/45] staging: unisys: visorbus: visorbus_private.h remove extra blank lines
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (5 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 06/45] staging: unisys: visorbus: fix alignment of paranethesis David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 08/45] staging: unisys: visorbus: visorbus_main.c: cleanup and consolidate comments David Kershner
                   ` (37 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Remvoe several unneeded blank lines.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_private.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h
index e878d65..91f788a 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/staging/unisys/visorbus/visorbus_private.h
@@ -29,11 +29,9 @@
 void remove_visor_device(struct visor_device *dev_info);
 int visorchipset_device_pause(struct visor_device *dev_info);
 int visorchipset_device_resume(struct visor_device *dev_info);
-
 void visorbus_response(struct visor_device *p, int response, int controlvm_id);
 void visorbus_device_changestate_response(struct visor_device *p, int response,
 					  struct visor_segment_state state);
-
 int visorbus_init(void);
 void visorbus_exit(void);
 
-- 
1.9.1

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

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

* [PATCH 08/45] staging: unisys: visorbus: visorbus_main.c: cleanup and consolidate comments
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (6 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 07/45] staging: unisys: visorbus: visorbus_private.h remove extra blank lines David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 09/45] staging: unisys: visorbus: use guid_is_equal instead of memcmp David Kershner
                   ` (36 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Use all 80 characters of the line for comments to help reduce the number
of extra lines in the code.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 44 +++++++++++--------------
 1 file changed, 19 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 2bc7ff7..f8236da 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -198,7 +198,7 @@ static void visorbus_release_device(struct device *xdev)
 }
 
 /*
- * begin implementation of specific channel attributes to appear under
+ * BUS specific channel attributes to appear under
  * /sys/bus/visorbus<x>/dev<y>/channel
  */
 
@@ -284,8 +284,6 @@ static ssize_t typename_show(struct device *dev, struct device_attribute *attr,
 
 ATTRIBUTE_GROUPS(channel);
 
-/* end implementation of specific channel attributes */
-
 /*
  *  BUS instance attributes
  *
@@ -546,8 +544,7 @@ void visorbus_unregister_visor_driver(struct visor_driver *drv)
  * @dest:   the destination buffer that is written into from the channel
  * @nbytes: the number of bytes to read from the channel
  *
- * If receiving a message, use the visorchannel_signalremove()
- * function instead.
+ * If receiving a message, use the visorchannel_signalremove() function instead.
  *
  * Return: integer indicating success (zero) or failure (non-zero)
  */
@@ -566,8 +563,7 @@ int visorbus_read_channel(struct visor_device *dev, unsigned long offset,
  * @src:    the source buffer that is written into the channel
  * @nbytes: the number of bytes to write into the channel
  *
- * If sending a message, use the visorchannel_signalinsert()
- * function instead.
+ * If sending a message, use the visorchannel_signalinsert() function instead.
  *
  * Return: integer indicating success (zero) or failure (non-zero)
  */
@@ -618,17 +614,16 @@ void visorbus_disable_channel_interrupts(struct visor_device *dev)
  *
  * This is how everything starts from the device end.
  * This function is called when a channel first appears via a ControlVM
- * message.  In response, this function allocates a visor_device to
- * correspond to the new channel, and attempts to connect it the appropriate
- * driver.  If the appropriate driver is found, the visor_driver.probe()
- * function for that driver will be called, and will be passed the new
- * visor_device that we just created.
+ * message.  In response, this function allocates a visor_device to correspond
+ * to the new channel, and attempts to connect it the appropriate * driver. If
+ * the appropriate driver is found, the visor_driver.probe() function for that
+ * driver will be called, and will be passed the new * visor_device that we
+ * just created.
  *
  * It's ok if the appropriate driver is not yet loaded, because in that case
  * the new device struct will just stick around in the bus' list of devices.
  * When the appropriate driver calls visorbus_register_visor_driver(), the
- * visor_driver.probe() for the new driver will be called with the new
- * device.
+ * visor_driver.probe() for the new driver will be called with the new device.
  *
  * Return: 0 if successful, otherwise the negative value returned by
  *         device_add() indicating the reason for failure
@@ -649,9 +644,9 @@ int create_visor_device(struct visor_device *dev)
 	setup_timer(&dev->timer, dev_periodic_work, (unsigned long)dev);
 
 	/*
-	 * bus_id must be a unique name with respect to this bus TYPE
-	 * (NOT bus instance).  That's why we need to include the bus
-	 * number within the name.
+	 * bus_id must be a unique name with respect to this bus TYPE (NOT bus
+	 * instance).  That's why we need to include the bus number within the
+	 * name.
 	 */
 	err = dev_set_name(&dev->device, "vbus%u:dev%u",
 			   chipset_bus_no, chipset_dev_no);
@@ -671,9 +666,9 @@ int create_visor_device(struct visor_device *dev)
 	 *              if (!drv.probe(dev))  [visordriver_probe_device]
 	 *                dev.drv = NULL
 	 *
-	 *  Note that device_add does NOT fail if no driver failed to
-	 *  claim the device.  The device will be linked onto
-	 *  bus_type.klist_devices regardless (use bus_for_each_dev).
+	 * Note that device_add does NOT fail if no driver failed to claim the
+	 * device.  The device will be linked onto bus_type.klist_devices
+	 * regardless (use bus_for_each_dev).
 	 */
 	err = device_add(&dev->device);
 	if (err < 0)
@@ -914,14 +909,13 @@ static int visordriver_probe_device(struct device *xdev)
 }
 
 /*
- * visorbus_register_visor_driver() - registers the provided visor driver
- *                                    for handling one or more visor device
+ * visorbus_register_visor_driver() - registers the provided visor driver for
+ *				      handling one or more visor device
  *                                    types (channel_types)
  * @drv: the driver to register
  *
- * A visor function driver calls this function to register
- * the driver.  The caller MUST fill in the following fields within the
- * #drv structure:
+ * A visor function driver calls this function to register the driver. The
+ * caller MUST fill in the following fields within the #drv structure:
  *     name, version, owner, channel_types, probe, remove
  *
  * Here's how the whole Linux bus / driver / device model works.
-- 
1.9.1

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

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

* [PATCH 09/45] staging: unisys: visorbus: use guid_is_equal instead of memcmp
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (7 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 08/45] staging: unisys: visorbus: visorbus_main.c: cleanup and consolidate comments David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 10/45] staging: unisys: visorbus: don't put code in declaration David Kershner
                   ` (35 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The function publish_vbus_dev_info was doing a memcmp of guids. It should
be using the kernel provided guid_equal function instead.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index f8236da..b187581 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -855,9 +855,8 @@ static void publish_vbus_dev_info(struct visor_device *visordev)
 	 * type name
 	 */
 	for (i = 0; visordrv->channel_types[i].name; i++) {
-		if (memcmp(&visordrv->channel_types[i].guid,
-			   &visordev->channel_type_guid,
-			   sizeof(visordrv->channel_types[i].guid)) == 0) {
+		if (guid_equal(&visordrv->channel_types[i].guid,
+			       &visordev->channel_type_guid)) {
 			chan_type_name = visordrv->channel_types[i].name;
 			break;
 		}
-- 
1.9.1

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

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

* [PATCH 10/45] staging: unisys: visorbus: don't put code in declaration.
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (8 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 09/45] staging: unisys: visorbus: use guid_is_equal instead of memcmp David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 11/45] staging: unisys: visorbus: NULL pending_msg_hdr not an error David Kershner
                   ` (34 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Simplify the code by not putting the assignment in the declaration. Define
it and then assign it, so the function doesn't get bunched up on the
right.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index b187581..7bfccc8 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -1083,9 +1083,9 @@ static void remove_all_visor_devices(void)
 	struct list_head *listentry, *listtmp;
 
 	list_for_each_safe(listentry, listtmp, &list_all_device_instances) {
-		struct visor_device *dev = list_entry(listentry,
-						      struct visor_device,
-						      list_all);
+		struct visor_device *dev;
+
+		dev = list_entry(listentry, struct visor_device, list_all);
 		remove_visor_device(dev);
 	}
 }
@@ -1170,7 +1170,6 @@ static int visorchipset_initiate_device_pause_resume(struct visor_device *dev,
 		dev->resuming = true;
 		err = drv->resume(dev, resume_state_change_complete);
 	}
-
 	return err;
 }
 
@@ -1191,7 +1190,6 @@ int visorchipset_device_pause(struct visor_device *dev_info)
 		dev_info->pausing = false;
 		return err;
 	}
-
 	return 0;
 }
 
@@ -1243,9 +1241,9 @@ void visorbus_exit(void)
 	remove_all_visor_devices();
 
 	list_for_each_safe(listentry, listtmp, &list_all_bus_instances) {
-		struct visor_device *dev = list_entry(listentry,
-						      struct visor_device,
-						      list_all);
+		struct visor_device *dev;
+
+		dev = list_entry(listentry, struct visor_device, list_all);
 		visorbus_remove_instance(dev);
 	}
 
-- 
1.9.1

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

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

* [PATCH 11/45] staging: unisys: visorbus: NULL pending_msg_hdr not an error
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (9 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 10/45] staging: unisys: visorbus: don't put code in declaration David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 12/45] staging: unisys: fix up device_destroy David Kershner
                   ` (33 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

A NULL pending_msg_hdr is not an error, it just means that the firmware
does not want an error response for that message.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c |  3 ++-
 drivers/staging/unisys/visorbus/visorchipset.c  | 13 ++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 7bfccc8..b35b8a6 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -690,8 +690,9 @@ void remove_visor_device(struct visor_device *dev)
 {
 	list_del(&dev->list_all);
 	put_device(&dev->device);
+	if (dev->pending_msg_hdr)
+		visorbus_response(dev, 0, CONTROLVM_DEVICE_DESTROY);
 	device_unregister(&dev->device);
-	visorbus_response(dev, 0, CONTROLVM_DEVICE_DESTROY);
 }
 
 static int get_vbus_header_info(struct visorchannel *chan,
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 14bc219..df7429d 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -481,9 +481,6 @@ static int controlvm_responder(enum controlvm_id cmd_id,
 			       struct controlvm_message_header *pending_msg_hdr,
 			       int response)
 {
-	if (!pending_msg_hdr)
-		return -EIO;
-
 	if (pending_msg_hdr->id != (u32)cmd_id)
 		return -EINVAL;
 
@@ -497,8 +494,6 @@ static int device_changestate_responder(
 {
 	struct controlvm_message outmsg;
 
-	if (!p->pending_msg_hdr)
-		return -EIO;
 	if (p->pending_msg_hdr->id != cmd_id)
 		return -EINVAL;
 
@@ -1391,8 +1386,10 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
 void visorbus_response(struct visor_device *bus_info, int response,
 		       int controlvm_id)
 {
-	controlvm_responder(controlvm_id, bus_info->pending_msg_hdr, response);
+	if (!bus_info->pending_msg_hdr)
+		return;
 
+	controlvm_responder(controlvm_id, bus_info->pending_msg_hdr, response);
 	kfree(bus_info->pending_msg_hdr);
 	bus_info->pending_msg_hdr = NULL;
 }
@@ -1401,9 +1398,11 @@ void visorbus_device_changestate_response(struct visor_device *dev_info,
 					  int response,
 					  struct visor_segment_state state)
 {
+	if (!dev_info->pending_msg_hdr)
+		return;
+
 	device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE, dev_info,
 				     response, state);
-
 	kfree(dev_info->pending_msg_hdr);
 	dev_info->pending_msg_hdr = NULL;
 }
-- 
1.9.1

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

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

* [PATCH 12/45] staging: unisys: fix up device_destroy
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (10 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 11/45] staging: unisys: visorbus: NULL pending_msg_hdr not an error David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 13/45] staging: unisys; visorbus: visorbus_main.c: remove extraneous newline David Kershner
                   ` (32 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Visorbus_remove_instance calls device_unregister which in turn will call
visorbus_release_busdevice. The function visorbus_release_busdevice was
freeing the visor_device. The code in visorbus_remove_instance was then
trying to reference the visor_device. This patch cleans up the code so
the visor_device is not referenced after the unregister.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index b35b8a6..aa82508 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -181,6 +181,7 @@ static void visorbus_release_busdevice(struct device *xdev)
 
 	debugfs_remove(dev->debugfs_client_bus_info);
 	debugfs_remove_recursive(dev->debugfs_dir);
+	visorchannel_destroy(dev->visorchannel);
 	kfree(dev);
 }
 
@@ -1069,11 +1070,11 @@ void 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.
 	 */
-	visorchannel_destroy(dev->visorchannel);
 	kfree(dev->vbus_hdr_info);
 	list_del(&dev->list_all);
+	if (dev->pending_msg_hdr)
+		visorbus_response(dev, 0, CONTROLVM_BUS_DESTROY);
 	device_unregister(&dev->device);
-	visorbus_response(dev, 0, CONTROLVM_BUS_DESTROY);
 }
 
 /*
-- 
1.9.1

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

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

* [PATCH 13/45] staging: unisys; visorbus: visorbus_main.c: remove extraneous newline
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (11 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 12/45] staging: unisys: fix up device_destroy David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 14/45] staging: unisys: visorbus: clean up initializations David Kershner
                   ` (31 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Use all 80 characters when calling functions.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index aa82508..589dff3 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -1023,9 +1023,8 @@ int visorbus_create_instance(struct visor_device *dev)
 	dev->debugfs_dir = debugfs_create_dir(dev_name(&dev->device),
 					      visorbus_debugfs_dir);
 	dev->debugfs_client_bus_info =
-		debugfs_create_file("client_bus_info", 0440,
-				    dev->debugfs_dir, dev,
-				    &client_bus_info_debugfs_fops);
+		debugfs_create_file("client_bus_info", 0440, dev->debugfs_dir,
+				    dev, &client_bus_info_debugfs_fops);
 
 	dev_set_drvdata(&dev->device, dev);
 	err = get_vbus_header_info(dev->visorchannel, &dev->device, hdr_info);
@@ -1040,10 +1039,8 @@ int visorbus_create_instance(struct visor_device *dev)
 
 	dev->state.created = 1;
 	dev->vbus_hdr_info = (void *)hdr_info;
-	write_vbus_chp_info(dev->visorchannel, hdr_info,
-			    &chipset_driverinfo);
-	write_vbus_bus_info(dev->visorchannel, hdr_info,
-			    &clientbus_driverinfo);
+	write_vbus_chp_info(dev->visorchannel, hdr_info, &chipset_driverinfo);
+	write_vbus_bus_info(dev->visorchannel, hdr_info, &clientbus_driverinfo);
 
 	visorbus_response(dev, err, CONTROLVM_BUS_CREATE);
 
@@ -1126,7 +1123,6 @@ static void resume_state_change_complete(struct visor_device *dev, int status)
 		return;
 
 	dev->resuming = false;
-
 	/*
 	 * Notify the chipset driver that the resume is complete,
 	 * which will presumably want to send some sort of response to
-- 
1.9.1

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

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

* [PATCH 14/45] staging: unisys: visorbus: clean up initializations
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (12 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 13/45] staging: unisys; visorbus: visorbus_main.c: remove extraneous newline David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 15/45] staging: unisys: visorbus: keep the success path on the left David Kershner
                   ` (30 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Don't compute value of offset during initialization. Assigning a value to
offset should happen after we have verified all of its components.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 589dff3..ea12499 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -743,11 +743,12 @@ 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;
+	int off;
 
 	if (hdr_info->chp_info_offset == 0)
 		return;
 
+	off = sizeof(struct channel_header) + hdr_info->chp_info_offset;
 	visorchannel_write(chan, off, info, sizeof(*info));
 }
 
@@ -768,11 +769,11 @@ 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;
+	int off;
 
 	if (hdr_info->bus_info_offset == 0)
 		return;
-
+	off = sizeof(struct channel_header) + hdr_info->bus_info_offset;
 	visorchannel_write(chan, off, info, sizeof(*info));
 }
 
@@ -795,13 +796,12 @@ static void write_vbus_dev_info(struct visorchannel *chan,
 				struct visor_vbus_deviceinfo *info,
 				unsigned int devix)
 {
-	int off =
-	    (sizeof(struct channel_header) + hdr_info->dev_info_offset) +
-	    (hdr_info->device_info_struct_bytes * devix);
+	int off;
 
 	if (hdr_info->dev_info_offset == 0)
 		return;
-
+	off = (sizeof(struct channel_header) + hdr_info->dev_info_offset) +
+	      (hdr_info->device_info_struct_bytes * devix);
 	visorchannel_write(chan, off, info, sizeof(*info));
 }
 
-- 
1.9.1

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

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

* [PATCH 15/45] staging: unisys: visorbus: keep the success path on the left
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (13 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 14/45] staging: unisys: visorbus: clean up initializations David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 16/45] staging: unisys: shrink the name of a variable David Kershner
                   ` (29 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The code was indenting for the successful path and then combining the
error and success path for the rest of the function. Correct it so the
success path is not indented.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index ea12499..308372e 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -888,7 +888,7 @@ static void publish_vbus_dev_info(struct visor_device *visordev)
  */
 static int visordriver_probe_device(struct device *xdev)
 {
-	int res;
+	int err;
 	struct visor_driver *drv;
 	struct visor_device *dev;
 
@@ -898,15 +898,17 @@ static int visordriver_probe_device(struct device *xdev)
 	mutex_lock(&dev->visordriver_callback_lock);
 	dev->being_removed = false;
 
-	res = drv->probe(dev);
-	if (res >= 0) {
-		/* success: reference kept via unmatched get_device() */
-		get_device(&dev->device);
-		publish_vbus_dev_info(dev);
+	err = drv->probe(dev);
+	if (err) {
+		mutex_unlock(&dev->visordriver_callback_lock);
+		return err;
 	}
 
+	/* success: reference kept via unmatched get_device() */
+	get_device(&dev->device);
+	publish_vbus_dev_info(dev);
 	mutex_unlock(&dev->visordriver_callback_lock);
-	return res;
+	return 0;
 }
 
 /*
-- 
1.9.1

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

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

* [PATCH 16/45] staging: unisys: shrink the name of a variable
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (14 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 15/45] staging: unisys: visorbus: keep the success path on the left David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 17/45] staging: unisys: visorbus: clean up formatting of function definitions David Kershner
                   ` (28 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The field debugfs_client_bus_info can be reduced to debugfs_bus_info.
The word client is extraneous in this context.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h       |  2 +-
 drivers/staging/unisys/visorbus/visorbus_main.c | 20 +++++++++-----------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index e4ee38c..ea01a21 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -161,7 +161,7 @@ struct visor_device {
 	void *vbus_hdr_info;
 	guid_t partition_guid;
 	struct dentry *debugfs_dir;
-	struct dentry *debugfs_client_bus_info;
+	struct dentry *debugfs_bus_info;
 };
 
 #define to_visor_device(x) container_of(x, struct visor_device, device)
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 308372e..4a128dc 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -179,7 +179,7 @@ static void visorbus_release_busdevice(struct device *xdev)
 {
 	struct visor_device *dev = dev_get_drvdata(xdev);
 
-	debugfs_remove(dev->debugfs_client_bus_info);
+	debugfs_remove(dev->debugfs_bus_info);
 	debugfs_remove_recursive(dev->debugfs_dir);
 	visorchannel_destroy(dev->visorchannel);
 	kfree(dev);
@@ -414,7 +414,7 @@ static void vbuschannel_print_devinfo(struct visor_vbus_deviceinfo *devinfo,
 		   devinfo->infostrs);
 }
 
-static int client_bus_info_debugfs_show(struct seq_file *seq, void *v)
+static int bus_info_debugfs_show(struct seq_file *seq, void *v)
 {
 	int i = 0;
 	unsigned long off;
@@ -451,15 +451,14 @@ static int client_bus_info_debugfs_show(struct seq_file *seq, void *v)
 	return 0;
 }
 
-static int client_bus_info_debugfs_open(struct inode *inode, struct file *file)
+static int bus_info_debugfs_open(struct inode *inode, struct file *file)
 {
-	return single_open(file, client_bus_info_debugfs_show,
-			   inode->i_private);
+	return single_open(file, bus_info_debugfs_show, inode->i_private);
 }
 
-static const struct file_operations client_bus_info_debugfs_fops = {
+static const struct file_operations bus_info_debugfs_fops = {
 	.owner = THIS_MODULE,
-	.open = client_bus_info_debugfs_open,
+	.open = bus_info_debugfs_open,
 	.read = seq_read,
 	.llseek = seq_lseek,
 	.release = single_release,
@@ -1024,10 +1023,9 @@ int visorbus_create_instance(struct visor_device *dev)
 
 	dev->debugfs_dir = debugfs_create_dir(dev_name(&dev->device),
 					      visorbus_debugfs_dir);
-	dev->debugfs_client_bus_info =
-		debugfs_create_file("client_bus_info", 0440, dev->debugfs_dir,
-				    dev, &client_bus_info_debugfs_fops);
-
+	dev->debugfs_bus_info = debugfs_create_file("client_bus_info", 0440,
+						    dev->debugfs_dir, dev,
+						    &bus_info_debugfs_fops);
 	dev_set_drvdata(&dev->device, dev);
 	err = get_vbus_header_info(dev->visorchannel, &dev->device, hdr_info);
 	if (err < 0)
-- 
1.9.1

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

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

* [PATCH 17/45] staging: unisys: visorbus: clean up formatting of function definitions
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (15 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 16/45] staging: unisys: shrink the name of a variable David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 18/45] staging: unisys: visorbus: simplify debugfs print statment David Kershner
                   ` (27 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Consolidate function parameters onto the same line if they can fit.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 27 +++++++++----------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 4a128dc..a085713 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -69,12 +69,9 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
  * 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,
-			struct device *dev,
-			const guid_t *expected_guid,
-			char *chname,
-			u64 expected_min_bytes,
-			u32 expected_version,
+int visor_check_channel(struct channel_header *ch, struct device *dev,
+			const guid_t *expected_guid, char *chname,
+			u64 expected_min_bytes, u32 expected_version,
 			u64 expected_signature)
 {
 	if (!guid_is_null(expected_guid)) {
@@ -293,8 +290,7 @@ static ssize_t typename_show(struct device *dev, struct device_attribute *attr,
  */
 
 static ssize_t partition_handle_show(struct device *dev,
-				     struct device_attribute *attr,
-				     char *buf)
+				     struct device_attribute *attr, char *buf)
 {
 	struct visor_device *vdev = to_visor_device(dev);
 	u64 handle = visorchannel_get_clientpartition(vdev->visorchannel);
@@ -304,8 +300,7 @@ static ssize_t partition_handle_show(struct device *dev,
 static DEVICE_ATTR_RO(partition_handle);
 
 static ssize_t partition_guid_show(struct device *dev,
-				   struct device_attribute *attr,
-				   char *buf)
+				   struct device_attribute *attr, char *buf)
 {
 	struct visor_device *vdev = to_visor_device(dev);
 
@@ -314,8 +309,7 @@ static ssize_t partition_guid_show(struct device *dev,
 static DEVICE_ATTR_RO(partition_guid);
 
 static ssize_t partition_name_show(struct device *dev,
-				   struct device_attribute *attr,
-				   char *buf)
+				   struct device_attribute *attr, char *buf)
 {
 	struct visor_device *vdev = to_visor_device(dev);
 
@@ -324,8 +318,7 @@ static ssize_t partition_name_show(struct device *dev,
 static DEVICE_ATTR_RO(partition_name);
 
 static ssize_t channel_addr_show(struct device *dev,
-				 struct device_attribute *attr,
-				 char *buf)
+				 struct device_attribute *attr, char *buf)
 {
 	struct visor_device *vdev = to_visor_device(dev);
 	u64 addr = visorchannel_get_physaddr(vdev->visorchannel);
@@ -335,8 +328,7 @@ static ssize_t channel_addr_show(struct device *dev,
 static DEVICE_ATTR_RO(channel_addr);
 
 static ssize_t channel_bytes_show(struct device *dev,
-				  struct device_attribute *attr,
-				  char *buf)
+				  struct device_attribute *attr, char *buf)
 {
 	struct visor_device *vdev = to_visor_device(dev);
 	u64 nbytes = visorchannel_get_nbytes(vdev->visorchannel);
@@ -346,8 +338,7 @@ static ssize_t channel_bytes_show(struct device *dev,
 static DEVICE_ATTR_RO(channel_bytes);
 
 static ssize_t channel_id_show(struct device *dev,
-			       struct device_attribute *attr,
-			       char *buf)
+			       struct device_attribute *attr, char *buf)
 {
 	struct visor_device *vdev = to_visor_device(dev);
 	int len = 0;
-- 
1.9.1

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

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

* [PATCH 18/45] staging: unisys: visorbus: simplify debugfs print statment
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (16 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 17/45] staging: unisys: visorbus: clean up formatting of function definitions David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 19/45] staging: unisys: visorbus: Remove unneeded initialization David Kershner
                   ` (26 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Simplify debugfs statement so it is clearer and more compact.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@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 a085713..d10af23 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -417,7 +417,7 @@ static int bus_info_debugfs_show(struct seq_file *seq, void *v)
 		return 0;
 
 	seq_printf(seq,
-		   "Client device / client driver info for %s partition (vbus #%u):\n",
+		   "Client device/driver info for %s partition (vbus #%u):\n",
 		   ((vdev->name) ? (char *)(vdev->name) : ""),
 		   vdev->chipset_bus_no);
 
-- 
1.9.1

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

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

* [PATCH 19/45] staging: unisys: visorbus: Remove unneeded initialization
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (17 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 18/45] staging: unisys: visorbus: simplify debugfs print statment David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 20/45] staging: unisys: visorbus: fix newlines for visorchannel David Kershner
                   ` (25 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

No need to set drv to NULL.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@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 d10af23..56d1c16 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -1138,7 +1138,7 @@ static int visorchipset_initiate_device_pause_resume(struct visor_device *dev,
 						     bool is_pause)
 {
 	int err;
-	struct visor_driver *drv = NULL;
+	struct visor_driver *drv;
 
 	/* If no driver associated with the device nothing to pause/resume */
 	if (!dev->device.driver)
-- 
1.9.1

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

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

* [PATCH 20/45] staging: unisys: visorbus: fix newlines for visorchannel
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (18 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 19/45] staging: unisys: visorbus: Remove unneeded initialization David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 21/45] staging: unisys: visorbus: visorchipset: clean up blank lines in visorchipset David Kershner
                   ` (24 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Remove extraneous blank lines and add some lines that are needed. General
philosophy -- declaration, space, pre-conditions (if needed), space, then
rest of function.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchannel.c | 28 +-------------------------
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 7665858..44eab70 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -57,6 +57,7 @@ void visorchannel_destroy(struct visorchannel *channel)
 {
 	if (!channel)
 		return;
+
 	if (channel->mapped) {
 		memunmap(channel->mapped);
 		if (channel->requested)
@@ -122,7 +123,6 @@ int visorchannel_read(struct visorchannel *channel, ulong offset, void *dest,
 		return -EIO;
 
 	memcpy(dest, channel->mapped + offset, nbytes);
-
 	return 0;
 }
 
@@ -140,9 +140,7 @@ int visorchannel_write(struct visorchannel *channel, ulong offset, void *dest,
 		memcpy(((char *)(&channel->chan_hdr)) + offset,
 		       dest, copy_size);
 	}
-
 	memcpy(channel->mapped + offset, dest, nbytes);
-
 	return 0;
 }
 
@@ -226,32 +224,25 @@ static int signalremove_inner(struct visorchannel *channel, u32 queue,
 	error = sig_read_header(channel, queue, &sig_hdr);
 	if (error)
 		return error;
-
 	/* No signals to remove; have caller try again. */
 	if (sig_hdr.head == sig_hdr.tail)
 		return -EAGAIN;
-
 	sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots;
-
 	error = sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg);
 	if (error)
 		return error;
-
 	sig_hdr.num_received++;
-
 	/*
 	 * For each data field in SIGNAL_QUEUE_HEADER that was modified, update
 	 * host memory. Required for channel sync.
 	 */
 	mb();
-
 	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;
 }
 
@@ -288,7 +279,6 @@ static bool queue_empty(struct visorchannel *channel, u32 queue)
 
 	if (sig_read_header(channel, queue, &sig_hdr))
 		return true;
-
 	return (sig_hdr.head == sig_hdr.tail);
 }
 
@@ -308,11 +298,9 @@ bool visorchannel_signalempty(struct visorchannel *channel, u32 queue)
 
 	if (!channel->needs_lock)
 		return queue_empty(channel, queue);
-
 	spin_lock_irqsave(&channel->remove_lock, flags);
 	rc = queue_empty(channel, queue);
 	spin_unlock_irqrestore(&channel->remove_lock, flags);
-
 	return rc;
 }
 EXPORT_SYMBOL_GPL(visorchannel_signalempty);
@@ -326,7 +314,6 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue,
 	err = sig_read_header(channel, queue, &sig_hdr);
 	if (err)
 		return err;
-
 	sig_hdr.head = (sig_hdr.head + 1) % sig_hdr.max_slots;
 	if (sig_hdr.head == sig_hdr.tail) {
 		sig_hdr.num_overflows++;
@@ -335,26 +322,21 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue,
 			return err;
 		return -EIO;
 	}
-
 	err = sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg);
 	if (err)
 		return err;
-
 	sig_hdr.num_sent++;
-
 	/*
 	 * For each data field in SIGNAL_QUEUE_HEADER that was modified, update
 	 * host memory. Required for channel sync.
 	 */
 	mb();
-
 	err = SIG_WRITE_FIELD(channel, queue, &sig_hdr, head);
 	if (err)
 		return err;
 	err = SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent);
 	if (err)
 		return err;
-
 	return 0;
 }
 
@@ -386,11 +368,9 @@ static struct visorchannel *visorchannel_create_guts(u64 physaddr, gfp_t gfp,
 	channel = kzalloc(sizeof(*channel), gfp);
 	if (!channel)
 		return NULL;
-
 	channel->needs_lock = needs_lock;
 	spin_lock_init(&channel->insert_lock);
 	spin_lock_init(&channel->remove_lock);
-
 	/*
 	 * Video driver constains the efi framebuffer so it will get a conflict
 	 * resource when requesting its full mem region. Since we are only
@@ -401,21 +381,17 @@ static struct visorchannel *visorchannel_create_guts(u64 physaddr, gfp_t gfp,
 	if (!channel->requested && !guid_equal(guid, &visor_video_guid))
 		/* we only care about errors if this is not the video channel */
 		goto err_destroy_channel;
-
 	channel->mapped = memremap(physaddr, size, MEMREMAP_WB);
 	if (!channel->mapped) {
 		release_mem_region(physaddr, size);
 		goto err_destroy_channel;
 	}
-
 	channel->physaddr = physaddr;
 	channel->nbytes = size;
-
 	err = visorchannel_read(channel, 0, &channel->chan_hdr, size);
 	if (err)
 		goto err_destroy_channel;
 	size = (ulong)channel->chan_hdr.size;
-
 	memunmap(channel->mapped);
 	if (channel->requested)
 		release_mem_region(channel->physaddr, channel->nbytes);
@@ -425,13 +401,11 @@ static struct visorchannel *visorchannel_create_guts(u64 physaddr, gfp_t gfp,
 	if (!channel->requested && !guid_equal(guid, &visor_video_guid))
 		/* we only care about errors if this is not the video channel */
 		goto err_destroy_channel;
-
 	channel->mapped = memremap(channel->physaddr, size, MEMREMAP_WB);
 	if (!channel->mapped) {
 		release_mem_region(channel->physaddr, size);
 		goto err_destroy_channel;
 	}
-
 	channel->nbytes = size;
 	guid_copy(&channel->guid, guid);
 	return channel;
-- 
1.9.1

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

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

* [PATCH 21/45] staging: unisys: visorbus: visorchipset: clean up blank lines in visorchipset
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (19 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 20/45] staging: unisys: visorbus: fix newlines for visorchannel David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 22/45] staging: unisys: visorbus: visorbus_main.c: remove blank lines David Kershner
                   ` (23 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Remove extraneous blank lines and get consistency of blank lines.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 98 +-------------------------
 1 file changed, 3 insertions(+), 95 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index df7429d..416e741 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -128,7 +128,6 @@ static ssize_t toolaction_show(struct device *dev,
 				&tool_action, sizeof(u8));
 	if (err)
 		return err;
-
 	return sprintf(buf, "%u\n", tool_action);
 }
 
@@ -141,7 +140,6 @@ static ssize_t toolaction_store(struct device *dev,
 
 	if (kstrtou8(buf, 10, &tool_action))
 		return -EINVAL;
-
 	err = visorchannel_write(chipset_dev->controlvm_channel,
 				 offsetof(struct visor_controlvm_channel,
 					  tool_action),
@@ -178,7 +176,6 @@ static ssize_t boottotool_store(struct device *dev,
 
 	if (kstrtoint(buf, 10, &val))
 		return -EINVAL;
-
 	efi_visor_indication.boot_to_tool = val;
 	err = visorchannel_write(chipset_dev->controlvm_channel,
 				 offsetof(struct visor_controlvm_channel,
@@ -214,7 +211,6 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr,
 
 	if (kstrtou32(buf, 10, &error))
 		return -EINVAL;
-
 	err = visorchannel_write(chipset_dev->controlvm_channel,
 				 offsetof(struct visor_controlvm_channel,
 					  installation_error),
@@ -237,7 +233,6 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
 				&text_id, sizeof(u32));
 	if (err)
 		return err;
-
 	return sprintf(buf, "%u\n", text_id);
 }
 
@@ -249,7 +244,6 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr,
 
 	if (kstrtou32(buf, 10, &text_id))
 		return -EINVAL;
-
 	err = visorchannel_write(chipset_dev->controlvm_channel,
 				 offsetof(struct visor_controlvm_channel,
 					  installation_text_id),
@@ -272,7 +266,6 @@ static ssize_t remaining_steps_show(struct device *dev,
 				&remaining_steps, sizeof(u16));
 	if (err)
 		return err;
-
 	return sprintf(buf, "%hu\n", remaining_steps);
 }
 
@@ -285,7 +278,6 @@ static ssize_t remaining_steps_store(struct device *dev,
 
 	if (kstrtou16(buf, 10, &remaining_steps))
 		return -EINVAL;
-
 	err = visorchannel_write(chipset_dev->controlvm_channel,
 				 offsetof(struct visor_controlvm_channel,
 					  installation_remaining_steps),
@@ -309,7 +301,6 @@ static int match_visorbus_dev_by_id(struct device *dev, void *data)
 	if ((vdev->chipset_bus_no == id->bus_no) &&
 	    (vdev->chipset_dev_no == id->dev_no))
 		return 1;
-
 	return 0;
 }
 
@@ -374,7 +365,6 @@ static int chipset_init(struct controlvm_message *inmsg)
 		goto out_respond;
 	}
 	chipset_inited = 1;
-
 	/*
 	 * Set features to indicate we support parahotplug (if Command also
 	 * supports it). Set the "reply" bit so Command knows this is a
@@ -399,12 +389,10 @@ static int controlvm_respond(struct controlvm_message_header *msg_hdr,
 	controlvm_init_response(&outmsg, msg_hdr, response);
 	if (outmsg.hdr.flags.test_message == 1)
 		return -EINVAL;
-
 	if (state) {
 		outmsg.cmd.device_change_state.state = *state;
 		outmsg.cmd.device_change_state.flags.phys_device = 1;
 	}
-
 	return visorchannel_signalinsert(chipset_dev->controlvm_channel,
 					 CONTROLVM_QUEUE_REQUEST, &outmsg);
 }
@@ -430,13 +418,11 @@ static int save_crash_message(struct controlvm_message *msg,
 			"failed to read message count\n");
 		return err;
 	}
-
 	if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
 		dev_err(&chipset_dev->acpi_device->dev,
 			"invalid number of messages\n");
 		return -EIO;
 	}
-
 	err = visorchannel_read(chipset_dev->controlvm_channel,
 				offsetof(struct visor_controlvm_channel,
 					 saved_crash_message_offset),
@@ -446,7 +432,6 @@ static int save_crash_message(struct controlvm_message *msg,
 			"failed to read offset\n");
 		return err;
 	}
-
 	switch (cr_type) {
 	case CRASH_DEV:
 		local_crash_msg_offset += sizeof(struct controlvm_message);
@@ -498,11 +483,9 @@ static int device_changestate_responder(
 		return -EINVAL;
 
 	controlvm_init_response(&outmsg, p->pending_msg_hdr, response);
-
 	outmsg.cmd.device_change_state.bus_no = p->chipset_bus_no;
 	outmsg.cmd.device_change_state.dev_no = p->chipset_dev_no;
 	outmsg.cmd.device_change_state.state = response_state;
-
 	return visorchannel_signalinsert(chipset_dev->controlvm_channel,
 					 CONTROLVM_QUEUE_REQUEST, &outmsg);
 }
@@ -523,35 +506,29 @@ static int visorbus_create(struct controlvm_message *inmsg)
 		err = -EEXIST;
 		goto err_respond;
 	}
-
 	bus_info = kzalloc(sizeof(*bus_info), GFP_KERNEL);
 	if (!bus_info) {
 		err = -ENOMEM;
 		goto err_respond;
 	}
-
 	INIT_LIST_HEAD(&bus_info->list_all);
 	bus_info->chipset_bus_no = bus_no;
 	bus_info->chipset_dev_no = BUS_ROOT_DEVICE;
-
 	if (guid_equal(&cmd->create_bus.bus_inst_guid, &visor_siovm_guid)) {
 		err = save_crash_message(inmsg, CRASH_BUS);
 		if (err)
 			goto err_free_bus_info;
 	}
-
 	if (inmsg->hdr.flags.response_expected == 1) {
 		pmsg_hdr = kzalloc(sizeof(*pmsg_hdr), GFP_KERNEL);
 		if (!pmsg_hdr) {
 			err = -ENOMEM;
 			goto err_free_bus_info;
 		}
-
 		memcpy(pmsg_hdr, &inmsg->hdr,
 		       sizeof(struct controlvm_message_header));
 		bus_info->pending_msg_hdr = pmsg_hdr;
 	}
-
 	visorchannel = visorchannel_create(cmd->create_bus.channel_addr,
 					   GFP_KERNEL,
 					   &cmd->create_bus.bus_data_type_guid);
@@ -559,14 +536,11 @@ static int visorbus_create(struct controlvm_message *inmsg)
 		err = -ENOMEM;
 		goto err_free_pending_msg;
 	}
-
 	bus_info->visorchannel = visorchannel;
-
 	/* Response will be handled by visorbus_create_instance on success */
 	err = visorbus_create_instance(bus_info);
 	if (err)
 		goto err_destroy_channel;
-
 	return 0;
 
 err_destroy_channel:
@@ -611,12 +585,10 @@ static int visorbus_destroy(struct controlvm_message *inmsg)
 			err = -ENOMEM;
 			goto err_respond;
 		}
-
 		memcpy(pmsg_hdr, &inmsg->hdr,
 		       sizeof(struct controlvm_message_header));
 		bus_info->pending_msg_hdr = pmsg_hdr;
 	}
-
 	/* Response will be handled by visorbus_remove_instance */
 	visorbus_remove_instance(bus_info);
 	return 0;
@@ -654,10 +626,8 @@ static void *parser_name_get(struct parser_context *ctx)
 	struct visor_controlvm_parameters_header *phdr = NULL;
 
 	phdr = &ctx->data;
-
 	if (phdr->name_offset + phdr->name_length > ctx->param_bytes)
 		return NULL;
-
 	ctx->curr = (char *)&phdr + phdr->name_offset;
 	ctx->bytes_remaining = phdr->name_length;
 	return parser_string_get(ctx->curr, phdr->name_length);
@@ -685,19 +655,16 @@ static int visorbus_configure(struct controlvm_message *inmsg,
 		err = -EIO;
 		goto err_respond;
 	}
-
 	err = visorchannel_set_clientpartition(bus_info->visorchannel,
 					       cmd->configure_bus.guest_handle);
 	if (err)
 		goto err_respond;
-
 	if (parser_ctx) {
 		const guid_t *partition_guid = parser_id_get(parser_ctx);
 
 		guid_copy(&bus_info->partition_guid, partition_guid);
 		bus_info->name = parser_name_get(parser_ctx);
 	}
-
 	if (inmsg->hdr.flags.response_expected == 1)
 		controlvm_responder(inmsg->hdr.id, &inmsg->hdr, err);
 	return 0;
@@ -734,7 +701,6 @@ static int visorbus_device_create(struct controlvm_message *inmsg)
 		err = -EINVAL;
 		goto err_respond;
 	}
-
 	dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
 	if (dev_info && (dev_info->state.created == 1)) {
 		dev_err(&chipset_dev->acpi_device->dev,
@@ -748,12 +714,10 @@ static int visorbus_device_create(struct controlvm_message *inmsg)
 		err = -ENOMEM;
 		goto err_respond;
 	}
-
 	dev_info->chipset_bus_no = bus_no;
 	dev_info->chipset_dev_no = dev_no;
 	guid_copy(&dev_info->inst, &cmd->create_device.dev_inst_guid);
 	dev_info->device.parent = &bus_info->device;
-
 	visorchannel =
 	       visorchannel_create_with_lock(cmd->create_device.channel_addr,
 					     GFP_KERNEL,
@@ -772,14 +736,12 @@ static int visorbus_device_create(struct controlvm_message *inmsg)
 		if (err)
 			goto err_destroy_visorchannel;
 	}
-
 	if (inmsg->hdr.flags.response_expected == 1) {
 		pmsg_hdr = kzalloc(sizeof(*pmsg_hdr), GFP_KERNEL);
 		if (!pmsg_hdr) {
 			err = -ENOMEM;
 			goto err_destroy_visorchannel;
 		}
-
 		memcpy(pmsg_hdr, &inmsg->hdr,
 		       sizeof(struct controlvm_message_header));
 		dev_info->pending_msg_hdr = pmsg_hdr;
@@ -827,18 +789,17 @@ static int visorbus_device_changestate(struct controlvm_message *inmsg)
 		err = -EIO;
 		goto err_respond;
 	}
+
 	if (inmsg->hdr.flags.response_expected == 1) {
 		pmsg_hdr = kzalloc(sizeof(*pmsg_hdr), GFP_KERNEL);
 		if (!pmsg_hdr) {
 			err = -ENOMEM;
 			goto err_respond;
 		}
-
 		memcpy(pmsg_hdr, &inmsg->hdr,
 		       sizeof(struct controlvm_message_header));
 		dev_info->pending_msg_hdr = pmsg_hdr;
 	}
-
 	if (state.alive == segment_state_running.alive &&
 	    state.operating == segment_state_running.operating)
 		/* Response will be sent from visorchipset_device_resume */
@@ -853,7 +814,6 @@ static int visorbus_device_changestate(struct controlvm_message *inmsg)
 		err = visorchipset_device_pause(dev_info);
 	if (err)
 		goto err_respond;
-
 	return 0;
 
 err_respond:
@@ -897,7 +857,6 @@ static int visorbus_device_destroy(struct controlvm_message *inmsg)
 		       sizeof(struct controlvm_message_header));
 		dev_info->pending_msg_hdr = pmsg_hdr;
 	}
-
 	kfree(dev_info->name);
 	remove_visor_device(dev_info);
 	return 0;
@@ -964,11 +923,9 @@ static struct parahotplug_request *parahotplug_request_create(
 	req = kmalloc(sizeof(*req), GFP_KERNEL);
 	if (!req)
 		return NULL;
-
 	req->id = parahotplug_next_id();
 	req->expiration = parahotplug_next_expiration();
 	req->msg = *msg;
-
 	return req;
 }
 
@@ -1003,7 +960,6 @@ static int parahotplug_request_complete(int id, u16 active)
 	struct parahotplug_request *req;
 
 	spin_lock(&parahotplug_request_list_lock);
-
 	/* Look for a request matching "id". */
 	list_for_each_safe(pos, tmp, &parahotplug_request_list) {
 		req = list_entry(pos, struct parahotplug_request, list);
@@ -1023,7 +979,6 @@ static int parahotplug_request_complete(int id, u16 active)
 			return 0;
 		}
 	}
-
 	spin_unlock(&parahotplug_request_list_lock);
 	return -EINVAL;
 }
@@ -1050,7 +1005,6 @@ static ssize_t devicedisabled_store(struct device *dev,
 
 	if (kstrtouint(buf, 10, &id))
 		return -EINVAL;
-
 	err = parahotplug_request_complete(id, 0);
 	if (err < 0)
 		return err;
@@ -1079,7 +1033,6 @@ static ssize_t deviceenabled_store(struct device *dev,
 
 	if (kstrtouint(buf, 10, &id))
 		return -EINVAL;
-
 	parahotplug_request_complete(id, 1);
 	return count;
 }
@@ -1142,7 +1095,6 @@ static int parahotplug_request_kickoff(struct parahotplug_request *req)
 		cmd->device_change_state.dev_no >> 3);
 	sprintf(env_func, "VISOR_PARAHOTPLUG_FUNCTION=%d",
 		cmd->device_change_state.dev_no & 0x7);
-
 	return kobject_uevent_env(&chipset_dev->acpi_device->dev.kobj,
 				  KOBJ_CHANGE, envp);
 }
@@ -1160,7 +1112,6 @@ static int parahotplug_process_message(struct controlvm_message *inmsg)
 	req = parahotplug_request_create(inmsg);
 	if (!req)
 		return -ENOMEM;
-
 	/*
 	 * For enable messages, just respond with success right away, we don't
 	 * need to wait to see if the enable was successful.
@@ -1174,7 +1125,6 @@ static int parahotplug_process_message(struct controlvm_message *inmsg)
 		parahotplug_request_destroy(req);
 		return 0;
 	}
-
 	/*
 	 * For disable messages, add the request to the request list before
 	 * kicking off the udev script. It won't get responded to until the
@@ -1183,7 +1133,6 @@ static int parahotplug_process_message(struct controlvm_message *inmsg)
 	spin_lock(&parahotplug_request_list_lock);
 	list_add_tail(&req->list, &parahotplug_request_list);
 	spin_unlock(&parahotplug_request_list_lock);
-
 	err = parahotplug_request_kickoff(req);
 	if (err)
 		goto err_respond;
@@ -1209,7 +1158,6 @@ static int chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
 	res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj, KOBJ_ONLINE);
 	if (msg_hdr->flags.response_expected)
 		controlvm_respond(msg_hdr, res, NULL);
-
 	return res;
 }
 
@@ -1229,10 +1177,8 @@ static int chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
 	sprintf(env_selftest, "SPARSP_SELFTEST=%d", 1);
 	res = kobject_uevent_env(&chipset_dev->acpi_device->dev.kobj,
 				 KOBJ_CHANGE, envp);
-
 	if (msg_hdr->flags.response_expected)
 		controlvm_respond(msg_hdr, res, NULL);
-
 	return res;
 }
 
@@ -1250,7 +1196,6 @@ static int chipset_notready_uevent(struct controlvm_message_header *msg_hdr)
 
 	if (msg_hdr->flags.response_expected)
 		controlvm_respond(msg_hdr, res, NULL);
-
 	return res;
 }
 
@@ -1263,17 +1208,15 @@ static int unisys_vmcall(unsigned long tuple, unsigned long param)
 
 	reg_ebx = param & 0xFFFFFFFF;
 	reg_ecx = param >> 32;
-
 	cpuid(0x00000001, &cpuid_eax, &cpuid_ebx, &cpuid_ecx, &cpuid_edx);
 	if (!(cpuid_ecx & 0x80000000))
 		return -EPERM;
-
 	__asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) :
 			     "a"(tuple), "b"(reg_ebx), "c"(reg_ecx));
 	if (result)
 		goto error;
-
 	return 0;
+
 /* Need to convert from VMCALL error codes to Linux */
 error:
 	switch (result) {
@@ -1317,9 +1260,7 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
 	msg.hdr.id = CONTROLVM_CHIPSET_INIT;
 	msg.cmd.init_chipset.bus_count = 23;
 	msg.cmd.init_chipset.switch_count = 0;
-
 	chipset_init(&msg);
-
 	/* get saved message count */
 	if (visorchannel_read(chipset_dev->controlvm_channel,
 			      offsetof(struct visor_controlvm_channel,
@@ -1329,12 +1270,10 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
 			"failed to read channel\n");
 		return;
 	}
-
 	if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
 		dev_err(&chipset_dev->acpi_device->dev, "invalid count\n");
 		return;
 	}
-
 	/* get saved crash message offset */
 	if (visorchannel_read(chipset_dev->controlvm_channel,
 			      offsetof(struct visor_controlvm_channel,
@@ -1344,7 +1283,6 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
 			"failed to read channel\n");
 		return;
 	}
-
 	/* read create device message for storage bus offset */
 	if (visorchannel_read(chipset_dev->controlvm_channel,
 			      local_crash_msg_offset,
@@ -1354,7 +1292,6 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
 			"failed to read channel\n");
 		return;
 	}
-
 	/* read create device message for storage device */
 	if (visorchannel_read(chipset_dev->controlvm_channel,
 			      local_crash_msg_offset +
@@ -1365,7 +1302,6 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
 			"failed to read channel\n");
 		return;
 	}
-
 	/* reuse IOVM create bus message */
 	if (!local_crash_bus_msg.cmd.create_bus.channel_addr) {
 		dev_err(&chipset_dev->acpi_device->dev,
@@ -1373,7 +1309,6 @@ static void setup_crash_devices_work_queue(struct work_struct *work)
 		return;
 	}
 	visorbus_create(&local_crash_bus_msg);
-
 	/* reuse create device message for storage device */
 	if (!local_crash_dev_msg.cmd.create_device.channel_addr) {
 		dev_err(&chipset_dev->acpi_device->dev,
@@ -1421,7 +1356,6 @@ static struct parser_context *parser_init_stream(u64 addr, u32 bytes,
 	void *mapping;
 
 	*retry = false;
-
 	/* alloc an extra byte to ensure payload is \0 terminated */
 	allocbytes = bytes + 1 + (sizeof(struct parser_context) -
 		     sizeof(struct visor_controlvm_parameters_header));
@@ -1435,7 +1369,6 @@ static struct parser_context *parser_init_stream(u64 addr, u32 bytes,
 		*retry = true;
 		return NULL;
 	}
-
 	ctx->allocbytes = allocbytes;
 	ctx->param_bytes = bytes;
 	mapping = memremap(addr, bytes, MEMREMAP_WB);
@@ -1445,7 +1378,6 @@ static struct parser_context *parser_init_stream(u64 addr, u32 bytes,
 	memunmap(mapping);
 	ctx->byte_stream = true;
 	chipset_dev->controlvm_payload_bytes_buffered += ctx->param_bytes;
-
 	return ctx;
 
 err_finish_ctx:
@@ -1478,7 +1410,6 @@ static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
 	/* create parsing context if necessary */
 	parm_addr = channel_addr + inmsg.hdr.payload_vm_offset;
 	parm_bytes = inmsg.hdr.payload_bytes;
-
 	/*
 	 * Parameter and channel addresses within test messages actually lie
 	 * within our OS-controlled memory. We need to know that, because it
@@ -1496,7 +1427,6 @@ static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
 					CONTROLVM_QUEUE_ACK, &ackmsg);
 	if (err)
 		return err;
-
 	switch (inmsg.hdr.id) {
 	case CONTROLVM_CHIPSET_INIT:
 		err = chipset_init(&inmsg);
@@ -1550,7 +1480,6 @@ static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
 					  -CONTROLVM_RESP_ID_UNKNOWN, NULL);
 		break;
 	}
-
 	if (parser_ctx) {
 		parser_done(parser_ctx);
 		parser_ctx = NULL;
@@ -1570,13 +1499,12 @@ static int read_controlvm_event(struct controlvm_message *msg)
 {
 	int err = visorchannel_signalremove(chipset_dev->controlvm_channel,
 					CONTROLVM_QUEUE_EVENT, msg);
+
 	if (err)
 		return err;
-
 	/* got a message */
 	if (msg->hdr.flags.test_message == 1)
 		return -EINVAL;
-
 	return 0;
 }
 
@@ -1590,14 +1518,12 @@ static void parahotplug_process_list(void)
 	struct list_head *tmp;
 
 	spin_lock(&parahotplug_request_list_lock);
-
 	list_for_each_safe(pos, tmp, &parahotplug_request_list) {
 		struct parahotplug_request *req =
 		    list_entry(pos, struct parahotplug_request, list);
 
 		if (!time_after_eq(jiffies, req->expiration))
 			continue;
-
 		list_del(pos);
 		if (req->msg.hdr.flags.response_expected)
 			controlvm_respond(
@@ -1606,7 +1532,6 @@ static void parahotplug_process_list(void)
 				&req->msg.cmd.device_change_state.state);
 		parahotplug_request_destroy(req);
 	}
-
 	spin_unlock(&parahotplug_request_list_lock);
 }
 
@@ -1622,10 +1547,8 @@ static void controlvm_periodic_work(struct work_struct *work)
 						CONTROLVM_QUEUE_RESPONSE,
 						&inmsg);
 	} while ((!err) && (++count < CONTROLVM_MESSAGE_MAX));
-
 	if (err != -EAGAIN)
 		goto schedule_out;
-
 	if (chipset_dev->controlvm_pending_msg_valid) {
 		/*
 		 * we throttled processing of a prior msg, so try to process
@@ -1637,7 +1560,6 @@ static void controlvm_periodic_work(struct work_struct *work)
 	} else {
 		err = read_controlvm_event(&inmsg);
 	}
-
 	while (!err) {
 		chipset_dev->most_recent_message_jiffies = jiffies;
 		err = handle_command(inmsg,
@@ -1651,7 +1573,6 @@ static void controlvm_periodic_work(struct work_struct *work)
 
 		err = read_controlvm_event(&inmsg);
 	}
-
 	/* parahotplug_worker */
 	parahotplug_process_list();
 
@@ -1677,7 +1598,6 @@ static void controlvm_periodic_work(struct work_struct *work)
 			chipset_dev->poll_jiffies =
 					      POLLJIFFIES_CONTROLVMCHANNEL_FAST;
 	}
-
 	schedule_delayed_work(&chipset_dev->periodic_controlvm_work,
 			      chipset_dev->poll_jiffies);
 }
@@ -1690,20 +1610,16 @@ static int visorchipset_init(struct acpi_device *acpi_device)
 	chipset_dev = kzalloc(sizeof(*chipset_dev), GFP_KERNEL);
 	if (!chipset_dev)
 		goto error;
-
 	err = controlvm_channel_create(chipset_dev);
 	if (err)
 		goto error_free_chipset_dev;
-
 	acpi_device->driver_data = chipset_dev;
 	chipset_dev->acpi_device = acpi_device;
 	chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
-
 	err = sysfs_create_groups(&chipset_dev->acpi_device->dev.kobj,
 				  visorchipset_dev_groups);
 	if (err < 0)
 		goto error_destroy_channel;
-
 	controlvm_channel = chipset_dev->controlvm_channel;
 	if (!visor_check_channel(visorchannel_get_header(controlvm_channel),
 				 &chipset_dev->acpi_device->dev,
@@ -1713,7 +1629,6 @@ static int visorchipset_init(struct acpi_device *acpi_device)
 				 VISOR_CONTROLVM_CHANNEL_VERSIONID,
 				 VISOR_CHANNEL_SIGNATURE))
 		goto error_delete_groups;
-
 	/* if booting in a crash kernel */
 	if (is_kdump_kernel())
 		INIT_DELAYED_WORK(&chipset_dev->periodic_controlvm_work,
@@ -1721,16 +1636,13 @@ static int visorchipset_init(struct acpi_device *acpi_device)
 	else
 		INIT_DELAYED_WORK(&chipset_dev->periodic_controlvm_work,
 				  controlvm_periodic_work);
-
 	chipset_dev->most_recent_message_jiffies = jiffies;
 	chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
 	schedule_delayed_work(&chipset_dev->periodic_controlvm_work,
 			      chipset_dev->poll_jiffies);
-
 	err = visorbus_init();
 	if (err < 0)
 		goto error_cancel_work;
-
 	return 0;
 
 error_cancel_work:
@@ -1757,10 +1669,8 @@ static int visorchipset_exit(struct acpi_device *acpi_device)
 	cancel_delayed_work_sync(&chipset_dev->periodic_controlvm_work);
 	sysfs_remove_groups(&chipset_dev->acpi_device->dev.kobj,
 			    visorchipset_dev_groups);
-
 	visorchannel_destroy(chipset_dev->controlvm_channel);
 	kfree(chipset_dev);
-
 	return 0;
 }
 
@@ -1802,11 +1712,9 @@ static int init_unisys(void)
 
 	if (!visorutil_spar_detect())
 		return -ENODEV;
-
 	result = acpi_bus_register_driver(&unisys_acpi_driver);
 	if (result)
 		return -ENODEV;
-
 	pr_info("Unisys Visorchipset Driver Loaded.\n");
 	return 0;
 };
-- 
1.9.1

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

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

* [PATCH 22/45] staging: unisys: visorbus: visorbus_main.c: remove blank lines
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (20 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 21/45] staging: unisys: visorbus: visorchipset: clean up blank lines in visorchipset David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 23/45] staging: unisys: visorbus: to_visor_device/to_visor_driver move up David Kershner
                   ` (22 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Removes several extraneous blank lines in visorbus_main.c.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 44 ++-----------------------
 1 file changed, 3 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 56d1c16..740a36a 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -122,7 +122,6 @@ static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env)
 
 	dev = to_visor_device(xdev);
 	guid = visorchannel_get_guid(dev->visorchannel);
-
 	return add_uevent_var(env, "MODALIAS=visorbus:%pUl", guid);
 }
 
@@ -147,11 +146,9 @@ static int visorbus_match(struct device *xdev, struct device_driver *xdrv)
 	drv = to_visor_driver(xdrv);
 	if (!drv->channel_types)
 		return 0;
-
 	for (i = 0; !guid_is_null(&drv->channel_types[i].guid); i++)
 		if (guid_equal(&drv->channel_types[i].guid, channel_type))
 			return i + 1;
-
 	return 0;
 }
 
@@ -288,7 +285,6 @@ static ssize_t typename_show(struct device *dev, struct device_attribute *attr,
  *  define & implement display of bus attributes under
  *  /sys/bus/visorbus/devices/visorbus<n>.
  */
-
 static ssize_t partition_handle_show(struct device *dev,
 				     struct device_attribute *attr, char *buf)
 {
@@ -346,7 +342,6 @@ static ssize_t channel_id_show(struct device *dev,
 	visorchannel_id(vdev->visorchannel, buf);
 	len = strlen(buf);
 	buf[len++] = '\n';
-
 	return len;
 }
 static DEVICE_ATTR_RO(channel_id);
@@ -386,13 +381,11 @@ static void vbuschannel_print_devinfo(struct visor_vbus_deviceinfo *devinfo,
 	/* uninitialized vbus device entry */
 	if (!isprint(devinfo->devtype[0]))
 		return;
-
 	if (devix >= 0)
 		seq_printf(seq, "[%d]", devix);
 	else
 		/* vbus device entry is for bus or chipset */
 		seq_puts(seq, "   ");
-
 	/*
 	 * Note: because the s-Par back-end is free to scribble in this area,
 	 * we never assume '\0'-termination.
@@ -420,7 +413,6 @@ static int bus_info_debugfs_show(struct seq_file *seq, void *v)
 		   "Client device/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)
@@ -438,7 +430,6 @@ static int bus_info_debugfs_show(struct seq_file *seq, void *v)
 		off += sizeof(dev_info);
 		i++;
 	}
-
 	return 0;
 }
 
@@ -468,6 +459,7 @@ static int dev_start_periodic_work(struct visor_device *dev)
 {
 	if (dev->being_removed || dev->timer_active)
 		return -EINVAL;
+
 	/* now up by at least 2 */
 	get_device(&dev->device);
 	dev->timer.expires = jiffies + POLLJIFFIES_NORMALCHANNEL;
@@ -480,6 +472,7 @@ static void dev_stop_periodic_work(struct visor_device *dev)
 {
 	if (!dev->timer_active)
 		return;
+
 	del_timer_sync(&dev->timer);
 	dev->timer_active = false;
 	put_device(&dev->device);
@@ -507,10 +500,8 @@ static int visordriver_remove_device(struct device *xdev)
 	dev->being_removed = true;
 	drv->remove(dev);
 	mutex_unlock(&dev->visordriver_callback_lock);
-
 	dev_stop_periodic_work(dev);
 	put_device(&dev->device);
-
 	return 0;
 }
 
@@ -633,7 +624,6 @@ int create_visor_device(struct visor_device *dev)
 	/* keep a reference just for us (now 2) */
 	get_device(&dev->device);
 	setup_timer(&dev->timer, dev_periodic_work, (unsigned long)dev);
-
 	/*
 	 * bus_id must be a unique name with respect to this bus TYPE (NOT bus
 	 * instance).  That's why we need to include the bus number within the
@@ -643,7 +633,6 @@ int create_visor_device(struct visor_device *dev)
 			   chipset_bus_no, chipset_dev_no);
 	if (err)
 		goto err_put;
-
 	/*
 	 * device_add does this:
 	 *    bus_add_device(dev)
@@ -664,7 +653,6 @@ int create_visor_device(struct visor_device *dev)
 	err = device_add(&dev->device);
 	if (err < 0)
 		goto err_put;
-
 	list_add_tail(&dev->list_all, &list_all_device_instances);
 	dev->state.created = 1;
 	visorbus_response(dev, err, CONTROLVM_DEVICE_CREATE);
@@ -705,14 +693,11 @@ static int get_vbus_header_info(struct visorchannel *chan,
 				sizeof(*hdr_info));
 	if (err < 0)
 		return err;
-
 	if (hdr_info->struct_bytes < sizeof(struct visor_vbus_headerinfo))
 		return -EINVAL;
-
 	if (hdr_info->device_info_struct_bytes <
 	    sizeof(struct visor_vbus_deviceinfo))
 		return -EINVAL;
-
 	return 0;
 }
 
@@ -763,6 +748,7 @@ static void write_vbus_bus_info(struct visorchannel *chan,
 
 	if (hdr_info->bus_info_offset == 0)
 		return;
+
 	off = sizeof(struct channel_header) + hdr_info->bus_info_offset;
 	visorchannel_write(chan, off, info, sizeof(*info));
 }
@@ -831,7 +817,6 @@ static void publish_vbus_dev_info(struct visor_device *visordev)
 
 	if (!visordev->device.driver)
 		return;
-
 	bdev = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
 	if (!bdev)
 		return;
@@ -853,7 +838,6 @@ static void publish_vbus_dev_info(struct visor_device *visordev)
 			break;
 		}
 	}
-
 	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);
@@ -887,13 +871,11 @@ static int visordriver_probe_device(struct device *xdev)
 
 	mutex_lock(&dev->visordriver_callback_lock);
 	dev->being_removed = false;
-
 	err = drv->probe(dev);
 	if (err) {
 		mutex_unlock(&dev->visordriver_callback_lock);
 		return err;
 	}
-
 	/* success: reference kept via unmatched get_device() */
 	get_device(&dev->device);
 	publish_vbus_dev_info(dev);
@@ -954,16 +936,12 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
 	/* can't register on a nonexistent bus */
 	if (!initialized)
 		return -ENODEV;
-
 	if (!drv->probe)
 		return -EINVAL;
-
 	if (!drv->remove)
 		return -EINVAL;
-
 	if (!drv->pause)
 		return -EINVAL;
-
 	if (!drv->resume)
 		return -EINVAL;
 
@@ -972,7 +950,6 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
 	drv->driver.probe = visordriver_probe_device;
 	drv->driver.remove = visordriver_remove_device;
 	drv->driver.owner = drv->owner;
-
 	/*
 	 * driver_register does this:
 	 *   bus_add_driver(drv)
@@ -985,7 +962,6 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
 	 *               if (!drv.probe(dev))   [visordriver_probe_device]
 	 *                 dev.drv = NULL
 	 */
-
 	return driver_register(&drv->driver);
 }
 EXPORT_SYMBOL_GPL(visorbus_register_visor_driver);
@@ -1006,12 +982,10 @@ int visorbus_create_instance(struct visor_device *dev)
 	hdr_info = kzalloc(sizeof(*hdr_info), GFP_KERNEL);
 	if (!hdr_info)
 		return -ENOMEM;
-
 	dev_set_name(&dev->device, "visorbus%d", id);
 	dev->device.bus = &visorbus_type;
 	dev->device.groups = visorbus_groups;
 	dev->device.release = visorbus_release_busdevice;
-
 	dev->debugfs_dir = debugfs_create_dir(dev_name(&dev->device),
 					      visorbus_debugfs_dir);
 	dev->debugfs_bus_info = debugfs_create_file("client_bus_info", 0440,
@@ -1021,20 +995,15 @@ int visorbus_create_instance(struct visor_device *dev)
 	err = get_vbus_header_info(dev->visorchannel, &dev->device, hdr_info);
 	if (err < 0)
 		goto err_debugfs_dir;
-
 	err = device_register(&dev->device);
 	if (err < 0)
 		goto err_debugfs_dir;
-
 	list_add_tail(&dev->list_all, &list_all_bus_instances);
-
 	dev->state.created = 1;
 	dev->vbus_hdr_info = (void *)hdr_info;
 	write_vbus_chp_info(dev->visorchannel, hdr_info, &chipset_driverinfo);
 	write_vbus_bus_info(dev->visorchannel, hdr_info, &clientbus_driverinfo);
-
 	visorbus_response(dev, err, CONTROLVM_BUS_CREATE);
-
 	return 0;
 
 err_debugfs_dir:
@@ -1199,7 +1168,6 @@ int visorchipset_device_resume(struct visor_device *dev_info)
 		dev_info->resuming = false;
 		return err;
 	}
-
 	return 0;
 }
 
@@ -1210,16 +1178,12 @@ int visorbus_init(void)
 	visorbus_debugfs_dir = debugfs_create_dir("visorbus", NULL);
 	if (!visorbus_debugfs_dir)
 		return -ENOMEM;
-
 	bus_device_info_init(&clientbus_driverinfo, "clientbus", "visorbus");
-
 	err = bus_register(&visorbus_type);
 	if (err < 0)
 		return err;
-
 	initialized = true;
 	bus_device_info_init(&chipset_driverinfo, "chipset", "visorchipset");
-
 	return 0;
 }
 
@@ -1228,14 +1192,12 @@ void visorbus_exit(void)
 	struct list_head *listentry, *listtmp;
 
 	remove_all_visor_devices();
-
 	list_for_each_safe(listentry, listtmp, &list_all_bus_instances) {
 		struct visor_device *dev;
 
 		dev = list_entry(listentry, struct visor_device, list_all);
 		visorbus_remove_instance(dev);
 	}
-
 	bus_unregister(&visorbus_type);
 	initialized = false;
 	debugfs_remove_recursive(visorbus_debugfs_dir);
-- 
1.9.1

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

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

* [PATCH 23/45] staging: unisys: visorbus: to_visor_device/to_visor_driver move up
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (21 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 22/45] staging: unisys: visorbus: visorbus_main.c: remove blank lines David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 24/45] staging: unisys: only include a file where it is used David Kershner
                   ` (21 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The macros to_visor_device and to_visor_driver are fairly small; move them
up to the declaration block to save some space.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 740a36a..46e6a4c 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -490,11 +490,8 @@ static void dev_stop_periodic_work(struct visor_device *dev)
  */
 static int visordriver_remove_device(struct device *xdev)
 {
-	struct visor_device *dev;
-	struct visor_driver *drv;
-
-	dev = to_visor_device(xdev);
-	drv = to_visor_driver(xdev->driver);
+	struct visor_device *dev = to_visor_device(xdev);
+	struct visor_driver *drv = to_visor_driver(xdev->driver);
 
 	mutex_lock(&dev->visordriver_callback_lock);
 	dev->being_removed = true;
@@ -863,11 +860,8 @@ static void publish_vbus_dev_info(struct visor_device *visordev)
 static int visordriver_probe_device(struct device *xdev)
 {
 	int err;
-	struct visor_driver *drv;
-	struct visor_device *dev;
-
-	dev = to_visor_device(xdev);
-	drv = to_visor_driver(xdev->driver);
+	struct visor_driver *drv = to_visor_driver(xdev->driver);
+	struct visor_device *dev = to_visor_device(xdev);
 
 	mutex_lock(&dev->visordriver_callback_lock);
 	dev->being_removed = false;
-- 
1.9.1

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

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

* [PATCH 24/45] staging: unisys: only include a file where it is used.
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (22 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 23/45] staging: unisys: visorbus: to_visor_device/to_visor_driver move up David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 25/45] staging: unisys: include: remove io.h from channel.h David Kershner
                   ` (20 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The header file visorbus.h included several linux headers that were
used by the source files that include it. Move the includes to the
files that actually use them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h       | 2 --
 drivers/staging/unisys/visorbus/visorbus_main.c | 2 ++
 drivers/staging/unisys/visorbus/visorchannel.c  | 1 +
 drivers/staging/unisys/visorhba/visorhba_main.c | 1 +
 drivers/staging/unisys/visorinput/visorinput.c  | 1 +
 drivers/staging/unisys/visornic/visornic_main.c | 1 +
 6 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index ea01a21..6666163 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -28,8 +28,6 @@
 #define __VISORBUS_H__
 
 #include <linux/device.h>
-#include <linux/module.h>
-#include <linux/slab.h>
 
 #include "channel.h"
 
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 46e6a4c..baae38f 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -14,6 +14,8 @@
  */
 
 #include <linux/debugfs.h>
+#include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/uuid.h>
 
 #include "visorbus.h"
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 44eab70..68cfd95 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -20,6 +20,7 @@
 
 #include <linux/uuid.h>
 #include <linux/io.h>
+#include <linux/slab.h>
 
 #include "visorbus.h"
 #include "visorbus_private.h"
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 419dba8..b84b40e 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -17,6 +17,7 @@
 #include <linux/debugfs.h>
 #include <linux/kthread.h>
 #include <linux/idr.h>
+#include <linux/module.h>
 #include <linux/seq_file.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_host.h>
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index 9d8cbc5..1b58663 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -23,6 +23,7 @@
 #include <linux/fb.h>
 #include <linux/input.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/uuid.h>
 
 #include "visorbus.h"
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index dc390ea..c5f0b01 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -20,6 +20,7 @@
 
 #include <linux/debugfs.h>
 #include <linux/etherdevice.h>
+#include <linux/module.h>
 #include <linux/netdevice.h>
 #include <linux/kthread.h>
 #include <linux/skbuff.h>
-- 
1.9.1

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

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

* [PATCH 25/45] staging: unisys: include: remove io.h from channel.h
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (23 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 24/45] staging: unisys: only include a file where it is used David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 26/45] staging: unisys: visorbus: vbuschannel doesn't use ctypes David Kershner
                   ` (19 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Channel.h was including io.h and not using it. Remove the #include.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/channel.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h
index 2babe93..59b71a6 100644
--- a/drivers/staging/unisys/include/channel.h
+++ b/drivers/staging/unisys/include/channel.h
@@ -18,7 +18,6 @@
 #define __CHANNEL_H__
 
 #include <linux/types.h>
-#include <linux/io.h>
 #include <linux/uuid.h>
 
 #define SIGNATURE_16(A, B) ((A) | ((B) << 8))
-- 
1.9.1

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

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

* [PATCH 26/45] staging: unisys: visorbus: vbuschannel doesn't use ctypes
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (24 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 25/45] staging: unisys: include: remove io.h from channel.h David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 27/45] staging: unisys: include: reorder to avoid forward declaration David Kershner
                   ` (18 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Don't include ctypes in vbuschannel.h, it isn't used by ctypes, but it is
used by visorbus_main.c so include it there.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/controlvmchannel.h | 1 +
 drivers/staging/unisys/visorbus/vbuschannel.h      | 1 -
 drivers/staging/unisys/visorbus/visorbus_main.c    | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h b/drivers/staging/unisys/visorbus/controlvmchannel.h
index 32ff5c1..4735ed8 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -17,6 +17,7 @@
 #define __CONTROLVMCHANNEL_H__
 
 #include <linux/uuid.h>
+
 #include "channel.h"
 
 /* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */
diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h
index 27e04de..6eae58d 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/staging/unisys/visorbus/vbuschannel.h
@@ -26,7 +26,6 @@
  */
 
 #include <linux/uuid.h>
-#include <linux/ctype.h>
 #include "channel.h"
 
 /* {193b331b-c58f-11da-95a9-00e08161165f} */
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index baae38f..c455784 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -13,6 +13,7 @@
  * details.
  */
 
+#include <linux/ctype.h>
 #include <linux/debugfs.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-- 
1.9.1

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

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

* [PATCH 27/45] staging: unisys: include: reorder to avoid forward declaration
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (25 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 26/45] staging: unisys: visorbus: vbuschannel doesn't use ctypes David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 28/45] staging: unisys: include: remove signature_32 David Kershner
                   ` (17 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The include file visorbus.h has a forward declaration of visor_device.
A simple reorder of the file removed the need for the forward
declaration.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h | 125 +++++++++++++++---------------
 1 file changed, 63 insertions(+), 62 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 6666163..6f27e00 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -31,12 +31,8 @@
 
 #include "channel.h"
 
-struct visor_device;
 extern struct bus_type visorbus_type;
 
-typedef void (*visorbus_state_complete_func) (struct visor_device *dev,
-					      int status);
-
 struct visorchipset_state {
 	u32 created:1;
 	u32 attached:1;
@@ -46,64 +42,6 @@ struct visorchipset_state {
 	/* Remaining bits in this 32-bit word are unused. */
 };
 
-/*
- * This struct describes a specific Supervisor channel, by providing its
- * GUID, name, and sizes.
- */
-struct visor_channeltype_descriptor {
-	const guid_t guid;
-	const char *name;
-};
-
-/**
- * struct visor_driver - Information provided by each visor driver when it
- * registers with the visorbus driver.
- * @name:		Name of the visor driver.
- * @owner:		The module owner.
- * @channel_types:	Types of channels handled by this driver, ending with
- *			a zero GUID. Our specialized BUS.match() method knows
- *			about this list, and uses it to determine whether this
- *			driver will in fact handle a new device that it has
- *			detected.
- * @probe:		Called when a new device comes online, by our probe()
- *			function specified by driver.probe() (triggered
- *			ultimately by some call to driver_register(),
- *			bus_add_driver(), or driver_attach()).
- * @remove:		Called when a new device is removed, by our remove()
- *			function specified by driver.remove() (triggered
- *			ultimately by some call to device_release_driver()).
- * @channel_interrupt:	Called periodically, whenever there is a possiblity
- *			that "something interesting" may have happened to the
- *			channel.
- * @pause:		Called to initiate a change of the device's state.  If
- *			the return valu`e is < 0, there was an error and the
- *			state transition will NOT occur.  If the return value
- *			is >= 0, then the state transition was INITIATED
- *			successfully, and complete_func() will be called (or
- *			was just called) with the final status when either the
- *			state transition fails or completes successfully.
- * @resume:		Behaves similar to pause.
- * @driver:		Private reference to the device driver. For use by bus
- *			driver only.
- */
-struct visor_driver {
-	const char *name;
-	struct module *owner;
-	struct visor_channeltype_descriptor *channel_types;
-	int (*probe)(struct visor_device *dev);
-	void (*remove)(struct visor_device *dev);
-	void (*channel_interrupt)(struct visor_device *dev);
-	int (*pause)(struct visor_device *dev,
-		     visorbus_state_complete_func complete_func);
-	int (*resume)(struct visor_device *dev,
-		      visorbus_state_complete_func complete_func);
-
-	/* These fields are for private use by the bus driver only. */
-	struct device_driver driver;
-};
-
-#define to_visor_driver(x) (container_of(x, struct visor_driver, driver))
-
 /**
  * struct visor_device - A device type for things "plugged" into the visorbus
  * bus
@@ -164,6 +102,69 @@ struct visor_device {
 
 #define to_visor_device(x) container_of(x, struct visor_device, device)
 
+typedef void (*visorbus_state_complete_func) (struct visor_device *dev,
+					      int status);
+
+/*
+ * This struct describes a specific Supervisor channel, by providing its
+ * GUID, name, and sizes.
+ */
+struct visor_channeltype_descriptor {
+	const guid_t guid;
+	const char *name;
+	u64 min_bytes;
+	u32 version;
+};
+
+/**
+ * struct visor_driver - Information provided by each visor driver when it
+ * registers with the visorbus driver.
+ * @name:		Name of the visor driver.
+ * @owner:		The module owner.
+ * @channel_types:	Types of channels handled by this driver, ending with
+ *			a zero GUID. Our specialized BUS.match() method knows
+ *			about this list, and uses it to determine whether this
+ *			driver will in fact handle a new device that it has
+ *			detected.
+ * @probe:		Called when a new device comes online, by our probe()
+ *			function specified by driver.probe() (triggered
+ *			ultimately by some call to driver_register(),
+ *			bus_add_driver(), or driver_attach()).
+ * @remove:		Called when a new device is removed, by our remove()
+ *			function specified by driver.remove() (triggered
+ *			ultimately by some call to device_release_driver()).
+ * @channel_interrupt:	Called periodically, whenever there is a possiblity
+ *			that "something interesting" may have happened to the
+ *			channel.
+ * @pause:		Called to initiate a change of the device's state.  If
+ *			the return valu`e is < 0, there was an error and the
+ *			state transition will NOT occur.  If the return value
+ *			is >= 0, then the state transition was INITIATED
+ *			successfully, and complete_func() will be called (or
+ *			was just called) with the final status when either the
+ *			state transition fails or completes successfully.
+ * @resume:		Behaves similar to pause.
+ * @driver:		Private reference to the device driver. For use by bus
+ *			driver only.
+ */
+struct visor_driver {
+	const char *name;
+	struct module *owner;
+	struct visor_channeltype_descriptor *channel_types;
+	int (*probe)(struct visor_device *dev);
+	void (*remove)(struct visor_device *dev);
+	void (*channel_interrupt)(struct visor_device *dev);
+	int (*pause)(struct visor_device *dev,
+		     visorbus_state_complete_func complete_func);
+	int (*resume)(struct visor_device *dev,
+		      visorbus_state_complete_func complete_func);
+
+	/* These fields are for private use by the bus driver only. */
+	struct device_driver driver;
+};
+
+#define to_visor_driver(x) (container_of(x, struct visor_driver, driver))
+
 int visor_check_channel(struct channel_header *ch, struct device *dev,
 			const guid_t *expected_uuid, char *chname,
 			u64 expected_min_bytes,	u32 expected_version,
-- 
1.9.1

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

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

* [PATCH 28/45] staging: unisys: include: remove signature_32
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (26 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 27/45] staging: unisys: include: reorder to avoid forward declaration David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 29/45] staging: unisys: include: consolidate a comment David Kershner
                   ` (16 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Remove signature_32 since it was only being referenced in one location.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/channel.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h
index 59b71a6..6cb8b4d 100644
--- a/drivers/staging/unisys/include/channel.h
+++ b/drivers/staging/unisys/include/channel.h
@@ -21,9 +21,8 @@
 #include <linux/uuid.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 VISOR_CHANNEL_SIGNATURE SIGNATURE_32('E', 'C', 'N', 'L')
+#define VISOR_CHANNEL_SIGNATURE \
+	(SIGNATURE_16('E', 'C') | (SIGNATURE_16('N', 'L') << 16))
 
 /*
  * enum channel_serverstate
-- 
1.9.1

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

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

* [PATCH 29/45] staging: unisys: include: consolidate a comment
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (27 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 28/45] staging: unisys: include: remove signature_32 David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 30/45] staging: unisys: visorbus: keep the success path on the left side David Kershner
                   ` (15 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Use all 80 characters of the line to consolidate a comment.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/iochannel.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index a70760f..69dd9c3 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -348,10 +348,9 @@ struct sense_data {
  *		    the start of the NETWORK LAYER HEADER.
  *
  * NOTE:
- * The full packet is described in frags but the ethernet header is
- * separately kept in ethhdr so that uisnic doesn't have "MAP" the
- * guest memory to get to the header. uisnic needs ethhdr to
- * determine how to route the packet.
+ * The full packet is described in frags but the ethernet header is separately
+ * kept in ethhdr so that uisnic doesn't have "MAP" the guest memory to get to
+ * the header. uisnic needs ethhdr to determine how to route the packet.
  */
 struct net_pkt_xmt {
 	int len;
-- 
1.9.1

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

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

* [PATCH 30/45] staging: unisys: visorbus: keep the success path on the left side
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (28 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 29/45] staging: unisys: include: consolidate a comment David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 31/45] staging: unisys: remove visorbus_type extern David Kershner
                   ` (14 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

If you can't find the dev, it is an error. Indent for the error, instead
of the success.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 416e741..80a0781 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -309,7 +309,6 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
 {
 	struct device *dev;
 	struct device *dev_start = NULL;
-	struct visor_device *vdev = NULL;
 	struct visor_busdev id = {
 		.bus_no = bus_no,
 		.dev_no = dev_no
@@ -319,9 +318,9 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
 		dev_start = &from->device;
 	dev = bus_find_device(&visorbus_type, dev_start, (void *)&id,
 			      match_visorbus_dev_by_id);
-	if (dev)
-		vdev = to_visor_device(dev);
-	return vdev;
+	if (!dev)
+		return NULL;
+	return to_visor_device(dev);
 }
 
 static void controlvm_init_response(struct controlvm_message *msg,
-- 
1.9.1

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

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

* [PATCH 31/45] staging: unisys: remove visorbus_type extern
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (29 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 30/45] staging: unisys: visorbus: keep the success path on the left side David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 32/45] staging: unisys: visorbus: visorchipset.c: Remove useless initializations David Kershner
                   ` (13 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

The variable visorbus_type could be contained to the visorbus_main.c
file by moving the two functions that referenced it visorchipset.c. This
allowed us to remove the incorrect extern from the include file visorbus.h.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h          |  2 --
 drivers/staging/unisys/visorbus/visorbus_main.c    | 37 +++++++++++++++++++++-
 drivers/staging/unisys/visorbus/visorbus_private.h |  2 ++
 drivers/staging/unisys/visorbus/visorchipset.c     | 35 --------------------
 4 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 6f27e00..6d379e6 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -31,8 +31,6 @@
 
 #include "channel.h"
 
-extern struct bus_type visorbus_type;
-
 struct visorchipset_state {
 	u32 created:1;
 	u32 attached:1;
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index c455784..3b11fb0 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -159,13 +159,48 @@ static int visorbus_match(struct device *xdev, struct device_driver *xdrv)
  * This describes the TYPE of bus.
  * (Don't confuse this with an INSTANCE of the bus.)
  */
-struct bus_type visorbus_type = {
+static struct bus_type visorbus_type = {
 	.name = "visorbus",
 	.match = visorbus_match,
 	.uevent = visorbus_uevent,
 	.dev_groups = visorbus_dev_groups,
 };
 
+struct visor_busdev {
+	u32 bus_no;
+	u32 dev_no;
+};
+
+static int match_visorbus_dev_by_id(struct device *dev, void *data)
+{
+	struct visor_device *vdev = to_visor_device(dev);
+	struct visor_busdev *id = data;
+
+	if ((vdev->chipset_bus_no == id->bus_no) &&
+	    (vdev->chipset_dev_no == id->dev_no))
+		return 1;
+	return 0;
+}
+
+struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
+					       struct visor_device *from)
+{
+	struct device *dev;
+	struct device *dev_start = NULL;
+	struct visor_busdev id = {
+		.bus_no = bus_no,
+		.dev_no = dev_no
+	};
+
+	if (from)
+		dev_start = &from->device;
+	dev = bus_find_device(&visorbus_type, dev_start, (void *)&id,
+			      match_visorbus_dev_by_id);
+	if (!dev)
+		return NULL;
+	return to_visor_device(dev);
+}
+
 /*
  * visorbus_release_busdevice() - called when device_unregister() is called for
  *                                the bus device instance, after all other tasks
diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h
index 91f788a..841437f 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/staging/unisys/visorbus/visorbus_private.h
@@ -23,6 +23,8 @@
 #include "vbuschannel.h"
 #include "visorbus.h"
 
+struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
+					       struct visor_device *from);
 int visorbus_create_instance(struct visor_device *dev);
 void visorbus_remove_instance(struct visor_device *bus_info);
 int create_visor_device(struct visor_device *dev_info);
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 80a0781..ab5c5c2 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -288,41 +288,6 @@ static ssize_t remaining_steps_store(struct device *dev,
 }
 static DEVICE_ATTR_RW(remaining_steps);
 
-struct visor_busdev {
-	u32 bus_no;
-	u32 dev_no;
-};
-
-static int match_visorbus_dev_by_id(struct device *dev, void *data)
-{
-	struct visor_device *vdev = to_visor_device(dev);
-	struct visor_busdev *id = data;
-
-	if ((vdev->chipset_bus_no == id->bus_no) &&
-	    (vdev->chipset_dev_no == id->dev_no))
-		return 1;
-	return 0;
-}
-
-struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
-					       struct visor_device *from)
-{
-	struct device *dev;
-	struct device *dev_start = NULL;
-	struct visor_busdev id = {
-		.bus_no = bus_no,
-		.dev_no = dev_no
-	};
-
-	if (from)
-		dev_start = &from->device;
-	dev = bus_find_device(&visorbus_type, dev_start, (void *)&id,
-			      match_visorbus_dev_by_id);
-	if (!dev)
-		return NULL;
-	return to_visor_device(dev);
-}
-
 static void controlvm_init_response(struct controlvm_message *msg,
 				    struct controlvm_message_header *msg_hdr,
 				    int response)
-- 
1.9.1

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

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

* [PATCH 32/45] staging: unisys: visorbus: visorchipset.c: Remove useless initializations
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (30 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 31/45] staging: unisys: remove visorbus_type extern David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 33/45] staging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX David Kershner
                   ` (12 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Found several more useless initializations in visorchipset.c get rid of
them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index ab5c5c2..ac218f3 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -457,7 +457,7 @@ static int device_changestate_responder(
 static int visorbus_create(struct controlvm_message *inmsg)
 {
 	struct controlvm_message_packet *cmd = &inmsg->cmd;
-	struct controlvm_message_header *pmsg_hdr = NULL;
+	struct controlvm_message_header *pmsg_hdr;
 	u32 bus_no = cmd->create_bus.bus_no;
 	struct visor_device *bus_info;
 	struct visorchannel *visorchannel;
@@ -524,7 +524,7 @@ static int visorbus_create(struct controlvm_message *inmsg)
 
 static int visorbus_destroy(struct controlvm_message *inmsg)
 {
-	struct controlvm_message_header *pmsg_hdr = NULL;
+	struct controlvm_message_header *pmsg_hdr;
 	u32 bus_no = inmsg->cmd.destroy_bus.bus_no;
 	struct visor_device *bus_info;
 	int err;
@@ -587,7 +587,7 @@ static void *parser_string_get(u8 *pscan, int nscan)
 
 static void *parser_name_get(struct parser_context *ctx)
 {
-	struct visor_controlvm_parameters_header *phdr = NULL;
+	struct visor_controlvm_parameters_header *phdr;
 
 	phdr = &ctx->data;
 	if (phdr->name_offset + phdr->name_length > ctx->param_bytes)
@@ -644,10 +644,10 @@ static int visorbus_configure(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;
+	struct controlvm_message_header *pmsg_hdr;
 	u32 bus_no = cmd->create_device.bus_no;
 	u32 dev_no = cmd->create_device.dev_no;
-	struct visor_device *dev_info = NULL;
+	struct visor_device *dev_info;
 	struct visor_device *bus_info;
 	struct visorchannel *visorchannel;
 	int err;
@@ -732,7 +732,7 @@ static int visorbus_device_create(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;
+	struct controlvm_message_header *pmsg_hdr;
 	u32 bus_no = cmd->device_change_state.bus_no;
 	u32 dev_no = cmd->device_change_state.dev_no;
 	struct visor_segment_state state = cmd->device_change_state.state;
@@ -790,7 +790,7 @@ static int visorbus_device_changestate(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;
+	struct controlvm_message_header *pmsg_hdr;
 	u32 bus_no = cmd->destroy_device.bus_no;
 	u32 dev_no = cmd->destroy_device.dev_no;
 	struct visor_device *dev_info;
@@ -1380,7 +1380,7 @@ static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
 	 * makes a difference in how we compute the virtual address.
 	 */
 	if (parm_bytes) {
-		bool retry = false;
+		bool retry;
 
 		parser_ctx = parser_init_stream(parm_addr, parm_bytes, &retry);
 		if (!parser_ctx && retry)
-- 
1.9.1

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

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

* [PATCH 33/45] staging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (31 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 32/45] staging: unisys: visorbus: visorchipset.c: Remove useless initializations David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-28 13:33   ` Dan Carpenter
  2017-09-27 17:14 ` [PATCH 34/45] staging: unisys: visorbus: clean up parameter formatting David Kershner
                   ` (11 subsequent siblings)
  44 siblings, 1 reply; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Shrinks the name of POLLJIFFIES_CONTORLVMCHANNEL_FAST and
POLLJIFFIES_CONTROLVMCHANNEL_SLOW to just POLLJIFFIES_CONTROLVM_XXXX.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index ac218f3..d808bbc 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -27,8 +27,8 @@
 static const guid_t visor_siovm_guid = VISOR_SIOVM_GUID;
 static const guid_t visor_controlvm_channel_guid = VISOR_CONTROLVM_CHANNEL_GUID;
 
-#define POLLJIFFIES_CONTROLVMCHANNEL_FAST 1
-#define POLLJIFFIES_CONTROLVMCHANNEL_SLOW 100
+#define POLLJIFFIES_CONTROLVM_FAST 1
+#define POLLJIFFIES_CONTROLVM_SLOW 100
 
 #define MAX_CONTROLVM_PAYLOAD_BYTES (1024 * 128)
 
@@ -1552,15 +1552,11 @@ static void controlvm_periodic_work(struct work_struct *work)
 		 * it's been longer than MIN_IDLE_SECONDS since we processed
 		 * our last controlvm message; slow down the polling
 		 */
-		if (chipset_dev->poll_jiffies !=
-					      POLLJIFFIES_CONTROLVMCHANNEL_SLOW)
-			chipset_dev->poll_jiffies =
-					      POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
+		if (chipset_dev->poll_jiffies != POLLJIFFIES_CONTROLVM_SLOW)
+			chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVM_SLOW;
 	} else {
-		if (chipset_dev->poll_jiffies !=
-					      POLLJIFFIES_CONTROLVMCHANNEL_FAST)
-			chipset_dev->poll_jiffies =
-					      POLLJIFFIES_CONTROLVMCHANNEL_FAST;
+		if (chipset_dev->poll_jiffies != POLLJIFFIES_CONTROLVM_FAST)
+			chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVM_FAST;
 	}
 	schedule_delayed_work(&chipset_dev->periodic_controlvm_work,
 			      chipset_dev->poll_jiffies);
@@ -1579,7 +1575,7 @@ static int visorchipset_init(struct acpi_device *acpi_device)
 		goto error_free_chipset_dev;
 	acpi_device->driver_data = chipset_dev;
 	chipset_dev->acpi_device = acpi_device;
-	chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
+	chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVM_FAST;
 	err = sysfs_create_groups(&chipset_dev->acpi_device->dev.kobj,
 				  visorchipset_dev_groups);
 	if (err < 0)
@@ -1601,7 +1597,7 @@ static int visorchipset_init(struct acpi_device *acpi_device)
 		INIT_DELAYED_WORK(&chipset_dev->periodic_controlvm_work,
 				  controlvm_periodic_work);
 	chipset_dev->most_recent_message_jiffies = jiffies;
-	chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
+	chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVM_FAST;
 	schedule_delayed_work(&chipset_dev->periodic_controlvm_work,
 			      chipset_dev->poll_jiffies);
 	err = visorbus_init();
-- 
1.9.1

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

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

* [PATCH 34/45] staging: unisys: visorbus: clean up parameter formatting
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (32 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 33/45] staging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 35/45] staging: unisys: include: Rename channel.h to visorchannel.h David Kershner
                   ` (10 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Cleans up parameter formatting in visorbus.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c |  2 +-
 drivers/staging/unisys/visorbus/visorchipset.c  | 17 ++++++++---------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 3b11fb0..7df06f1 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -251,7 +251,7 @@ static ssize_t nbytes_show(struct device *dev, struct device_attribute *attr,
 	struct visor_device *vdev = to_visor_device(dev);
 
 	return sprintf(buf, "0x%lx\n",
-			visorchannel_get_nbytes(vdev->visorchannel));
+		       visorchannel_get_nbytes(vdev->visorchannel));
 }
 static DEVICE_ATTR_RO(nbytes);
 
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index d808bbc..c876e54 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -436,10 +436,9 @@ static int 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 state)
 {
 	struct controlvm_message outmsg;
 
@@ -449,7 +448,7 @@ static int device_changestate_responder(
 	controlvm_init_response(&outmsg, p->pending_msg_hdr, response);
 	outmsg.cmd.device_change_state.bus_no = p->chipset_bus_no;
 	outmsg.cmd.device_change_state.dev_no = p->chipset_dev_no;
-	outmsg.cmd.device_change_state.state = response_state;
+	outmsg.cmd.device_change_state.state = state;
 	return visorchannel_signalinsert(chipset_dev->controlvm_channel,
 					 CONTROLVM_QUEUE_REQUEST, &outmsg);
 }
@@ -1044,9 +1043,9 @@ 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],
-	    env_func[40];
-	char *envp[] = {
-		env_cmd, env_id, env_state, env_bus, env_dev, env_func, NULL
+	     env_func[40];
+	char *envp[] = { env_cmd, env_id, env_state, env_bus, env_dev,
+			 env_func, NULL
 	};
 
 	sprintf(env_cmd, "VISOR_PARAHOTPLUG=1");
@@ -1462,7 +1461,7 @@ static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
 static int read_controlvm_event(struct controlvm_message *msg)
 {
 	int err = visorchannel_signalremove(chipset_dev->controlvm_channel,
-					CONTROLVM_QUEUE_EVENT, msg);
+					    CONTROLVM_QUEUE_EVENT, msg);
 
 	if (err)
 		return err;
-- 
1.9.1

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

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

* [PATCH 35/45] staging: unisys: include: Rename channel.h to visorchannel.h
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (33 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 34/45] staging: unisys: visorbus: clean up parameter formatting David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 36/45] staging: unisys: include: Remove unnecessary macro to generate signature David Kershner
                   ` (9 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

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

In order to avoid a potential conflict with other drivers that define a
channel.h file, the s-Par channel.h file is renamed in accordance with the
surrounding driver-set namespace.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/iochannel.h                   | 2 +-
 drivers/staging/unisys/include/visorbus.h                    | 2 +-
 drivers/staging/unisys/include/{channel.h => visorchannel.h} | 6 +++---
 drivers/staging/unisys/visorbus/controlvmchannel.h           | 2 +-
 drivers/staging/unisys/visorbus/vbuschannel.h                | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
 rename drivers/staging/unisys/include/{channel.h => visorchannel.h} (98%)

diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 69dd9c3..5cd407c 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -44,7 +44,7 @@
 #include <linux/uuid.h>
 #include <linux/skbuff.h>
 
-#include "channel.h"
+#include "visorchannel.h"
 
 /*
  * Must increment these whenever you insert or delete fields within this channel
diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 6d379e6..8e75c8b 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -29,7 +29,7 @@
 
 #include <linux/device.h>
 
-#include "channel.h"
+#include "visorchannel.h"
 
 struct visorchipset_state {
 	u32 created:1;
diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/visorchannel.h
similarity index 98%
rename from drivers/staging/unisys/include/channel.h
rename to drivers/staging/unisys/include/visorchannel.h
index 6cb8b4d..1f4a7b1 100644
--- a/drivers/staging/unisys/include/channel.h
+++ b/drivers/staging/unisys/include/visorchannel.h
@@ -14,8 +14,8 @@
  * details.
  */
 
-#ifndef __CHANNEL_H__
-#define __CHANNEL_H__
+#ifndef __VISORCHANNEL_H__
+#define __VISORCHANNEL_H__
 
 #include <linux/types.h>
 #include <linux/uuid.h>
@@ -181,7 +181,7 @@ struct signal_queue_header {
 	u8 filler[12];
 } __packed;
 
-/* CHANNEL Guids */
+/* VISORCHANNEL Guids */
 /* {414815ed-c58c-11da-95a9-00e08161165f} */
 #define VISOR_VHBA_CHANNEL_GUID \
 	GUID_INIT(0x414815ed, 0xc58c, 0x11da, \
diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h b/drivers/staging/unisys/visorbus/controlvmchannel.h
index 4735ed8..9ee9886 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -18,7 +18,7 @@
 
 #include <linux/uuid.h>
 
-#include "channel.h"
+#include "visorchannel.h"
 
 /* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */
 #define VISOR_CONTROLVM_CHANNEL_GUID \
diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h
index 6eae58d..9623911 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/staging/unisys/visorbus/vbuschannel.h
@@ -26,7 +26,7 @@
  */
 
 #include <linux/uuid.h>
-#include "channel.h"
+#include "visorchannel.h"
 
 /* {193b331b-c58f-11da-95a9-00e08161165f} */
 #define VISOR_VBUS_CHANNEL_GUID						\
-- 
1.9.1

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

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

* [PATCH 36/45] staging: unisys: include: Remove unnecessary macro to generate signature
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (34 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 35/45] staging: unisys: include: Rename channel.h to visorchannel.h David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 37/45] staging: unisys: include: Remove unused enum David Kershner
                   ` (8 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

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

Removes unnecessary SIGNATURE_16 macro used to generate a simple 32-bit
signature.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/visorchannel.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/include/visorchannel.h b/drivers/staging/unisys/include/visorchannel.h
index 1f4a7b1..3394574 100644
--- a/drivers/staging/unisys/include/visorchannel.h
+++ b/drivers/staging/unisys/include/visorchannel.h
@@ -20,9 +20,7 @@
 #include <linux/types.h>
 #include <linux/uuid.h>
 
-#define SIGNATURE_16(A, B) ((A) | ((B) << 8))
-#define VISOR_CHANNEL_SIGNATURE \
-	(SIGNATURE_16('E', 'C') | (SIGNATURE_16('N', 'L') << 16))
+#define VISOR_CHANNEL_SIGNATURE ('L' << 24 | 'N' << 16 | 'C' << 8 | 'E')
 
 /*
  * enum channel_serverstate
-- 
1.9.1

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

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

* [PATCH 37/45] staging: unisys: include: Remove unused enum
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (35 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 36/45] staging: unisys: include: Remove unnecessary macro to generate signature David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 38/45] staging: unisys: check the whole channel instead of just guid for match David Kershner
                   ` (7 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: David Binder

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

Removes unused enum that pertains to s-Par diagnostics capabilities.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 8e75c8b..dc1546e 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -179,26 +179,6 @@ int visorbus_write_channel(struct visor_device *dev,
 int visorbus_enable_channel_interrupts(struct visor_device *dev);
 void visorbus_disable_channel_interrupts(struct visor_device *dev);
 
-/*
- * Levels of severity for diagnostic events, in order from lowest severity to
- * highest (i.e. fatal errors are the most severe, and should always be logged,
- * but info events rarely need to be logged except during debugging). The
- * values DIAG_SEVERITY_ENUM_BEGIN and DIAG_SEVERITY_ENUM_END are not valid
- * severity values.  They exist merely to dilineate the list, so that future
- * additions won't require changes to the driver (i.e. when checking for
- * out-of-range severities in SetSeverity). The values DIAG_SEVERITY_OVERRIDE
- * and DIAG_SEVERITY_SHUTOFF are not valid severity values for logging events
- * but they are valid for controlling the amount of event data. Changes made
- * to the enum, need to be reflected in s-Par.
- */
-enum diag_severity {
-	DIAG_SEVERITY_VERBOSE = 0,
-	DIAG_SEVERITY_INFO = 1,
-	DIAG_SEVERITY_WARNING = 2,
-	DIAG_SEVERITY_ERR = 3,
-	DIAG_SEVERITY_PRINT = 4,
-};
-
 int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
 			      void *msg);
 int visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
-- 
1.9.1

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

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

* [PATCH 38/45] staging: unisys: check the whole channel instead of just guid for match
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (36 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 37/45] staging: unisys: include: Remove unused enum David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-28 13:34   ` Dan Carpenter
  2017-09-27 17:14 ` [PATCH 39/45] staging: unisys: visorbus: simplify visorchannel_create_guts David Kershner
                   ` (6 subsequent siblings)
  44 siblings, 1 reply; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

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

Validate that the channel contents match the channel type that we are
matching.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 11 ++++++++++-
 drivers/staging/unisys/visorhba/visorhba_main.c |  3 ++-
 drivers/staging/unisys/visorinput/visorinput.c  |  5 +++--
 drivers/staging/unisys/visornic/visornic_main.c |  3 ++-
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 7df06f1..cc6a9d8 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -143,14 +143,23 @@ static int visorbus_match(struct device *xdev, struct device_driver *xdrv)
 	int i;
 	struct visor_device *dev;
 	struct visor_driver *drv;
+	struct visorchannel *chan;
 
 	dev = to_visor_device(xdev);
 	channel_type = visorchannel_get_guid(dev->visorchannel);
 	drv = to_visor_driver(xdrv);
+	chan = dev->visorchannel;
 	if (!drv->channel_types)
 		return 0;
 	for (i = 0; !guid_is_null(&drv->channel_types[i].guid); i++)
-		if (guid_equal(&drv->channel_types[i].guid, channel_type))
+		if (guid_equal(&drv->channel_types[i].guid, channel_type) &&
+		    visor_check_channel(visorchannel_get_header(chan),
+					xdev,
+					&drv->channel_types[i].guid,
+					(char *)drv->channel_types[i].name,
+					drv->channel_types[i].min_bytes,
+					drv->channel_types[i].version,
+					VISOR_CHANNEL_SIGNATURE))
 			return i + 1;
 	return 0;
 }
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index b84b40e..91e6e35 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -40,7 +40,8 @@
 	/* Note that the only channel type we expect to be reported by the
 	 * bus driver is the VISOR_VHBA channel.
 	 */
-	{ VISOR_VHBA_CHANNEL_GUID, "sparvhba" },
+	{ VISOR_VHBA_CHANNEL_GUID, "sparvhba", sizeof(struct channel_header),
+	  VISOR_VHBA_CHANNEL_VERSIONID },
 	{}
 };
 
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index 1b58663..450f003 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -712,8 +712,9 @@ static int visorinput_resume(struct visor_device *dev,
 
 /* GUIDS for all channel types supported by this driver. */
 static struct visor_channeltype_descriptor visorinput_channel_types[] = {
-	{ VISOR_KEYBOARD_CHANNEL_GUID, "keyboard"},
-	{ VISOR_MOUSE_CHANNEL_GUID, "mouse"},
+	{ VISOR_KEYBOARD_CHANNEL_GUID, "keyboard",
+	  sizeof(struct channel_header), 0 },
+	{ VISOR_MOUSE_CHANNEL_GUID, "mouse", sizeof(struct channel_header), 0 },
 	{}
 };
 
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index c5f0b01..f318888 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -49,7 +49,8 @@
 	/* Note that the only channel type we expect to be reported by the
 	 * bus driver is the VISOR_VNIC channel.
 	 */
-	{ VISOR_VNIC_CHANNEL_GUID, "ultravnic" },
+	{ VISOR_VNIC_CHANNEL_GUID, "ultravnic", sizeof(struct channel_header),
+	  VISOR_VNIC_CHANNEL_VERSIONID },
 	{}
 };
 MODULE_DEVICE_TABLE(visorbus, visornic_channel_types);
-- 
1.9.1

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

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

* [PATCH 39/45] staging: unisys: visorbus: simplify visorchannel_create_guts
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (37 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 38/45] staging: unisys: check the whole channel instead of just guid for match David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 40/45] staging: unisys: visorbus: fix line over 80 characters checkpatch warning David Kershner
                   ` (5 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

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

Removing the two wrapper functions dealing with visorchannel_create() and
instead just always use a new version of visorchannel_create() with an
additional parameter.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_private.h |  4 +---
 drivers/staging/unisys/visorbus/visorchannel.c     | 23 +++++-----------------
 drivers/staging/unisys/visorbus/visorchipset.c     | 15 +++++++-------
 3 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h b/drivers/staging/unisys/visorbus/visorbus_private.h
index 841437f..4a8b12d 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/staging/unisys/visorbus/visorbus_private.h
@@ -39,9 +39,7 @@ void visorbus_device_changestate_response(struct visor_device *p, int response,
 
 /* visorchannel access functions */
 struct visorchannel *visorchannel_create(u64 physaddr, gfp_t gfp,
-					 const guid_t *guid);
-struct visorchannel *visorchannel_create_with_lock(u64 physaddr, gfp_t gfp,
-						   const guid_t *guid);
+					 const guid_t *guid, bool needs_lock);
 void visorchannel_destroy(struct visorchannel *channel);
 int visorchannel_read(struct visorchannel *channel, ulong offset,
 		      void *dest, ulong nbytes);
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 68cfd95..aae1607 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -342,9 +342,9 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue,
 }
 
 /*
- * visorchannel_create_guts() - creates the struct visorchannel abstraction for
- *				a data area in memory, but does NOT modify this
- *				data area
+ * visorchannel_create() - creates the struct visorchannel abstraction for a
+ *                         data area in memory, but does NOT modify this data
+ *                         area
  * @physaddr:      physical address of start of channel
  * @gfp:           gfp_t to use when allocating memory for the data struct
  * @guid:          GUID that identifies channel type;
@@ -355,9 +355,8 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue,
  * Return: pointer to visorchannel that was created if successful,
  *         otherwise NULL
  */
-static struct visorchannel *visorchannel_create_guts(u64 physaddr, gfp_t gfp,
-						     const guid_t *guid,
-						     bool needs_lock)
+struct visorchannel *visorchannel_create(u64 physaddr, gfp_t gfp,
+					 const guid_t *guid, bool needs_lock)
 {
 	struct visorchannel *channel;
 	int err;
@@ -416,18 +415,6 @@ static struct visorchannel *visorchannel_create_guts(u64 physaddr, gfp_t gfp,
 	return NULL;
 }
 
-struct visorchannel *visorchannel_create(u64 physaddr, gfp_t gfp,
-					 const guid_t *guid)
-{
-	return visorchannel_create_guts(physaddr, gfp, guid, false);
-}
-
-struct visorchannel *visorchannel_create_with_lock(u64 physaddr, gfp_t gfp,
-						   const guid_t *guid)
-{
-	return visorchannel_create_guts(physaddr, gfp, guid, true);
-}
-
 /**
  * visorchannel_signalinsert() - inserts a message into the designated
  *                               channel/queue
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index c876e54..027e10f 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -494,7 +494,8 @@ static int visorbus_create(struct controlvm_message *inmsg)
 	}
 	visorchannel = visorchannel_create(cmd->create_bus.channel_addr,
 					   GFP_KERNEL,
-					   &cmd->create_bus.bus_data_type_guid);
+					   &cmd->create_bus.bus_data_type_guid,
+					   false);
 	if (!visorchannel) {
 		err = -ENOMEM;
 		goto err_free_pending_msg;
@@ -681,10 +682,10 @@ static int visorbus_device_create(struct controlvm_message *inmsg)
 	dev_info->chipset_dev_no = dev_no;
 	guid_copy(&dev_info->inst, &cmd->create_device.dev_inst_guid);
 	dev_info->device.parent = &bus_info->device;
-	visorchannel =
-	       visorchannel_create_with_lock(cmd->create_device.channel_addr,
-					     GFP_KERNEL,
-					     &cmd->create_device.data_type_guid);
+	visorchannel = visorchannel_create(cmd->create_device.channel_addr,
+					   GFP_KERNEL,
+					   &cmd->create_device.data_type_guid,
+					   true);
 	if (!visorchannel) {
 		dev_err(&chipset_dev->acpi_device->dev,
 			"failed to create visorchannel: %d/%d\n",
@@ -1203,8 +1204,8 @@ static int controlvm_channel_create(struct visorchipset_device *dev)
 	if (err)
 		return err;
 	addr = dev->controlvm_params.address;
-	chan = visorchannel_create_with_lock(addr, GFP_KERNEL,
-					     &visor_controlvm_channel_guid);
+	chan = visorchannel_create(addr, GFP_KERNEL,
+				   &visor_controlvm_channel_guid, true);
 	if (!chan)
 		return -ENOMEM;
 	dev->controlvm_channel = chan;
-- 
1.9.1

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

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

* [PATCH 40/45] staging: unisys: visorbus: fix line over 80 characters checkpatch warning
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (38 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 39/45] staging: unisys: visorbus: simplify visorchannel_create_guts David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 41/45] staging: unisys: include: fix comments and spacing issues in visorbus.h David Kershner
                   ` (4 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

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

This patch fixes two checkpatch issues of line over 80 characters
in visorchipset.c.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 027e10f..6165602 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -694,8 +694,10 @@ static int visorbus_device_create(struct controlvm_message *inmsg)
 		goto err_free_dev_info;
 	}
 	dev_info->visorchannel = visorchannel;
-	guid_copy(&dev_info->channel_type_guid, &cmd->create_device.data_type_guid);
-	if (guid_equal(&cmd->create_device.data_type_guid, &visor_vhba_channel_guid)) {
+	guid_copy(&dev_info->channel_type_guid,
+		  &cmd->create_device.data_type_guid);
+	if (guid_equal(&cmd->create_device.data_type_guid,
+		       &visor_vhba_channel_guid)) {
 		err = save_crash_message(inmsg, CRASH_DEV);
 		if (err)
 			goto err_destroy_visorchannel;
-- 
1.9.1

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

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

* [PATCH 41/45] staging: unisys: include: fix comments and spacing issues in visorbus.h
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (39 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 40/45] staging: unisys: visorbus: fix line over 80 characters checkpatch warning David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 42/45] staging: unisys: visorbus: fix comments in vbuschannel.h David Kershner
                   ` (3 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

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

This patch fixes some comments and spacings in the file visorbus.h
to make it more uniform.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/include/visorbus.h | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index dc1546e..1a0986b 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -36,13 +36,12 @@ struct visorchipset_state {
 	u32 attached:1;
 	u32 configured:1;
 	u32 running:1;
-	/* Add new fields above. */
-	/* Remaining bits in this 32-bit word are unused. */
+	/* Remaining bits in this 32-bit word are reserved. */
 };
 
 /**
  * struct visor_device - A device type for things "plugged" into the visorbus
- * bus
+ *                       bus
  * @visorchannel:		Points to the channel that the device is
  *				associated with.
  * @channel_type_guid:		Identifies the channel type to the bus driver.
@@ -73,7 +72,6 @@ struct visorchipset_state {
  *				same across all visor_devices in the current
  *				guest. Private use by bus driver only.
  */
-
 struct visor_device {
 	struct visorchannel *visorchannel;
 	guid_t channel_type_guid;
@@ -104,8 +102,8 @@ typedef void (*visorbus_state_complete_func) (struct visor_device *dev,
 					      int status);
 
 /*
- * This struct describes a specific Supervisor channel, by providing its
- * GUID, name, and sizes.
+ * This struct describes a specific visor channel, by providing its GUID, name,
+ * and sizes.
  */
 struct visor_channeltype_descriptor {
 	const guid_t guid;
@@ -116,7 +114,7 @@ struct visor_channeltype_descriptor {
 
 /**
  * struct visor_driver - Information provided by each visor driver when it
- * registers with the visorbus driver.
+ *                       registers with the visorbus driver
  * @name:		Name of the visor driver.
  * @owner:		The module owner.
  * @channel_types:	Types of channels handled by this driver, ending with
-- 
1.9.1

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

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

* [PATCH 42/45] staging: unisys: visorbus: fix comments in vbuschannel.h
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (40 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 41/45] staging: unisys: include: fix comments and spacing issues in visorbus.h David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 43/45] staging: unisys: visorbus: Fix extraneous parenthesis David Kershner
                   ` (2 subsequent siblings)
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen; +Cc: Sameer Wadgaonkar

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

This patch fixes some comments in the file vbuschannel.h to make
it more uniform.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/vbuschannel.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h b/drivers/staging/unisys/visorbus/vbuschannel.h
index 9623911..981b180 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/staging/unisys/visorbus/vbuschannel.h
@@ -49,9 +49,9 @@
  * @infostrs: Kernel vversion.
  * @reserved: Pad size to 256 bytes.
  *
- * An array of this struct is present in the channel area for each vbus.
- * (See vbuschannel.h.). It is filled in by the client side to provide info
- * about the device and driver from the client's perspective.
+ * An array of this struct is present in the channel area for each vbus. It is
+ * filled in by the client side to provide info about the device and driver from
+ * the client's perspective.
  */
 struct visor_vbus_deviceinfo {
 	u8 devtype[16];
@@ -72,7 +72,7 @@ struct visor_vbus_deviceinfo {
  *			      BusInfo struct.
  * @dev_info_offset:	      Byte offset from beginning of this struct to the
  *			      DevInfo array.
- * @reserved:		      Natural Alignment
+ * @reserved:		      Natural alignment.
  */
 struct visor_vbus_headerinfo {
 	u32 struct_bytes;
@@ -96,7 +96,6 @@ struct visor_vbus_headerinfo {
 struct visor_vbus_channel {
 	struct channel_header channel_header;
 	struct visor_vbus_headerinfo hdr_info;
-	/* The remainder of this channel is filled in by the client */
 	struct visor_vbus_deviceinfo chp_info;
 	struct visor_vbus_deviceinfo bus_info;
 	struct visor_vbus_deviceinfo dev_info[0];
-- 
1.9.1

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

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

* [PATCH 43/45] staging: unisys: visorbus: Fix extraneous parenthesis
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (41 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 42/45] staging: unisys: visorbus: fix comments in vbuschannel.h David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-27 17:14 ` [PATCH 44/45] staging: unisys: visorhba: clean up parenthesis David Kershner
  2017-09-27 17:14 ` [PATCH 45/45] staging: unisys: visornic: " David Kershner
  44 siblings, 0 replies; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Clean up unneeded () that are being reported by checkpatch.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++--
 drivers/staging/unisys/visorbus/visorchipset.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index cc6a9d8..2f1e8d3 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -185,8 +185,8 @@ static int match_visorbus_dev_by_id(struct device *dev, void *data)
 	struct visor_device *vdev = to_visor_device(dev);
 	struct visor_busdev *id = data;
 
-	if ((vdev->chipset_bus_no == id->bus_no) &&
-	    (vdev->chipset_dev_no == id->dev_no))
+	if (vdev->chipset_bus_no == id->bus_no &&
+	    vdev->chipset_dev_no == id->dev_no)
 		return 1;
 	return 0;
 }
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 6165602..d9045a4 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -463,7 +463,7 @@ static int visorbus_create(struct controlvm_message *inmsg)
 	int err;
 
 	bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
-	if (bus_info && (bus_info->state.created == 1)) {
+	if (bus_info && bus_info->state.created == 1) {
 		dev_err(&chipset_dev->acpi_device->dev,
 			"failed %s: already exists\n", __func__);
 		err = -EEXIST;
@@ -666,7 +666,7 @@ static int visorbus_device_create(struct controlvm_message *inmsg)
 		goto err_respond;
 	}
 	dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
-	if (dev_info && (dev_info->state.created == 1)) {
+	if (dev_info && dev_info->state.created == 1) {
 		dev_err(&chipset_dev->acpi_device->dev,
 			"failed to get bus by id: %d/%d\n", bus_no, dev_no);
 		err = -EEXIST;
-- 
1.9.1

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

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

* [PATCH 44/45] staging: unisys: visorhba: clean up parenthesis
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (42 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 43/45] staging: unisys: visorbus: Fix extraneous parenthesis David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-28 13:34   ` Dan Carpenter
  2017-09-27 17:14 ` [PATCH 45/45] staging: unisys: visornic: " David Kershner
  44 siblings, 1 reply; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Clean up unneeded parenthesis reported by checkpatch.pl.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visorhba/visorhba_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 91e6e35..0bcd3ac 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -820,9 +820,9 @@ static void do_scsi_linuxstat(struct uiscmdrsp *cmdrsp,
 	memcpy(scsicmd->sense_buffer, cmdrsp->scsi.sensebuf, MAX_SENSE_SIZE);
 
 	/* Do not log errors for disk-not-present inquiries */
-	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
+	if (cmdrsp->scsi.cmnd[0] == INQUIRY &&
 	    (host_byte(cmdrsp->scsi.linuxstat) == DID_NO_CONNECT) &&
-	    (cmdrsp->scsi.addlstat == ADDL_SEL_TIMEOUT))
+	    cmdrsp->scsi.addlstat == ADDL_SEL_TIMEOUT)
 		return;
 	/* Okay see what our error_count is here.... */
 	vdisk = scsidev->hostdata;
@@ -870,8 +870,8 @@ static void do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp,
 	struct visordisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
-	    (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
+	if (cmdrsp->scsi.cmnd[0] == INQUIRY &&
+	    cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN) {
 		if (cmdrsp->scsi.no_disk_result == 0)
 			return;
 
-- 
1.9.1

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

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

* [PATCH 45/45] staging: unisys: visornic: clean up parenthesis
  2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
                   ` (43 preceding siblings ...)
  2017-09-27 17:14 ` [PATCH 44/45] staging: unisys: visorhba: clean up parenthesis David Kershner
@ 2017-09-27 17:14 ` David Kershner
  2017-09-28 13:57   ` Dan Carpenter
  44 siblings, 1 reply; 50+ messages in thread
From: David Kershner @ 2017-09-27 17:14 UTC (permalink / raw)
  To: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

Clean up unneeded parenthesis reported by checkpatch.pl.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
---
 drivers/staging/unisys/visornic/visornic_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index f318888..735d7e5 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -901,7 +901,7 @@ static int visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
 		return NETDEV_TX_OK;
 	}
 
-	if ((len < ETH_MIN_PACKET_SIZE) &&
+	if (len < ETH_MIN_PACKET_SIZE &&
 	    ((skb_end_pointer(skb) - skb->data) >= ETH_MIN_PACKET_SIZE)) {
 		/* pad the packet out to minimum size */
 		padlen = ETH_MIN_PACKET_SIZE - len;
@@ -1452,7 +1452,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
 	rcu_read_lock();
 	for_each_netdev_rcu(current->nsproxy->net_ns, dev) {
 		/* Only consider netdevs that are visornic, and are open */
-		if ((dev->netdev_ops != &visornic_dev_ops) ||
+		if (dev->netdev_ops != &visornic_dev_ops ||
 		    (!netif_queue_stopped(dev)))
 			continue;
 
@@ -1682,7 +1682,7 @@ static void service_resp_queue(struct uiscmdrsp *cmdrsp,
 			/* only call queue wake if we stopped it */
 			netdev = ((struct sk_buff *)cmdrsp->net.buf)->dev;
 			/* ASSERT netdev == vnicinfo->netdev; */
-			if ((netdev == devdata->netdev) &&
+			if (netdev == devdata->netdev &&
 			    netif_queue_stopped(netdev)) {
 				/* check if we have crossed the lower watermark
 				 * for netif_wake_queue()
-- 
1.9.1

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

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

* Re: [PATCH 33/45] staging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX
  2017-09-27 17:14 ` [PATCH 33/45] staging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX David Kershner
@ 2017-09-28 13:33   ` Dan Carpenter
  0 siblings, 0 replies; 50+ messages in thread
From: Dan Carpenter @ 2017-09-28 13:33 UTC (permalink / raw)
  To: David Kershner; +Cc: gregkh, sparmaintainer, driverdev-devel, jes.sorensen

On Wed, Sep 27, 2017 at 01:14:38PM -0400, David Kershner wrote:
> +             if (chipset_dev->poll_jiffies != POLLJIFFIES_CONTROLVM_SLOW)
> +                     chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVM_SLOW;
> +     } else {
> +             if (chipset_dev->poll_jiffies != POLLJIFFIES_CONTROLVM_FAST)
> +                     chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVM_FAST;


If you want, in a later patch you could just remove the conditions here
and say:

		chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVM_SLOW;
	} else {
		chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVM_FAST;
	}

Btw, I'm loving this patchset.  Thank you!

regards,
dan carpenter


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

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

* Re: [PATCH 38/45] staging: unisys: check the whole channel instead of just guid for match
  2017-09-27 17:14 ` [PATCH 38/45] staging: unisys: check the whole channel instead of just guid for match David Kershner
@ 2017-09-28 13:34   ` Dan Carpenter
  0 siblings, 0 replies; 50+ messages in thread
From: Dan Carpenter @ 2017-09-28 13:34 UTC (permalink / raw)
  To: David Kershner
  Cc: gregkh, driverdev-devel, sparmaintainer, jes.sorensen, Sameer Wadgaonkar

On Wed, Sep 27, 2017 at 01:14:43PM -0400, David Kershner wrote:
> From: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
> 
> Validate that the channel contents match the channel type that we are
> matching.
> 

What are the user visible effects of this change?  Does it have security
implications?  Does it prevent a crash?  Is it just a sanity check that
we expect will never be triggered?  The changelog should tell us.

regards,
dan carpenter

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

* Re: [PATCH 44/45] staging: unisys: visorhba: clean up parenthesis
  2017-09-27 17:14 ` [PATCH 44/45] staging: unisys: visorhba: clean up parenthesis David Kershner
@ 2017-09-28 13:34   ` Dan Carpenter
  0 siblings, 0 replies; 50+ messages in thread
From: Dan Carpenter @ 2017-09-28 13:34 UTC (permalink / raw)
  To: David Kershner; +Cc: gregkh, driverdev-devel, sparmaintainer, jes.sorensen

On Wed, Sep 27, 2017 at 01:14:49PM -0400, David Kershner wrote:
> Clean up unneeded parenthesis reported by checkpatch.pl.
> 
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: Tim Sell <timothy.sell@unisys.com>
> ---
>  drivers/staging/unisys/visorhba/visorhba_main.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
> index 91e6e35..0bcd3ac 100644
> --- a/drivers/staging/unisys/visorhba/visorhba_main.c
> +++ b/drivers/staging/unisys/visorhba/visorhba_main.c
> @@ -820,9 +820,9 @@ static void do_scsi_linuxstat(struct uiscmdrsp *cmdrsp,
>  	memcpy(scsicmd->sense_buffer, cmdrsp->scsi.sensebuf, MAX_SENSE_SIZE);
>  
>  	/* Do not log errors for disk-not-present inquiries */
> -	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
> +	if (cmdrsp->scsi.cmnd[0] == INQUIRY &&
>  	    (host_byte(cmdrsp->scsi.linuxstat) == DID_NO_CONNECT) &&
            ^                                                   ^
Let's remove these as well...  It can be done in a later patch.

> -	    (cmdrsp->scsi.addlstat == ADDL_SEL_TIMEOUT))
> +	    cmdrsp->scsi.addlstat == ADDL_SEL_TIMEOUT)
>  		return;

regards,
dan carpenter

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

* Re: [PATCH 45/45] staging: unisys: visornic: clean up parenthesis
  2017-09-27 17:14 ` [PATCH 45/45] staging: unisys: visornic: " David Kershner
@ 2017-09-28 13:57   ` Dan Carpenter
  0 siblings, 0 replies; 50+ messages in thread
From: Dan Carpenter @ 2017-09-28 13:57 UTC (permalink / raw)
  To: David Kershner; +Cc: gregkh, sparmaintainer, driverdev-devel, jes.sorensen

On Wed, Sep 27, 2017 at 01:14:50PM -0400, David Kershner wrote:
> Clean up unneeded parenthesis reported by checkpatch.pl.
> 
> Signed-off-by: David Kershner <david.kershner@unisys.com>
> Reviewed-by: Tim Sell <timothy.sell@unisys.com>
> ---
>  drivers/staging/unisys/visornic/visornic_main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
> index f318888..735d7e5 100644
> --- a/drivers/staging/unisys/visornic/visornic_main.c
> +++ b/drivers/staging/unisys/visornic/visornic_main.c
> @@ -901,7 +901,7 @@ static int visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
>  		return NETDEV_TX_OK;
>  	}
>  
> -	if ((len < ETH_MIN_PACKET_SIZE) &&
> +	if (len < ETH_MIN_PACKET_SIZE &&
>  	    ((skb_end_pointer(skb) - skb->data) >= ETH_MIN_PACKET_SIZE)) {
            ^                                                         ^
These parentheses don't add anything either.  This condition just seems
weird to me.  Shouldn't we just return -EINVAL if the size is
< ETH_MIN_PACKET_SIZE.  Or alternatively, can we just allocate more
memory?  (I know pants all about networking so I might be completely
wrong).

>  		/* pad the packet out to minimum size */
>  		padlen = ETH_MIN_PACKET_SIZE - len;
> @@ -1452,7 +1452,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
>  	rcu_read_lock();
>  	for_each_netdev_rcu(current->nsproxy->net_ns, dev) {
>  		/* Only consider netdevs that are visornic, and are open */
> -		if ((dev->netdev_ops != &visornic_dev_ops) ||
> +		if (dev->netdev_ops != &visornic_dev_ops ||
>  		    (!netif_queue_stopped(dev)))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Let's remove these parentheses as well.

regards,
dan carpenter


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

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

end of thread, other threads:[~2017-09-28 13:57 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 17:14 [PATCH 00/45] staging: unisys: more updates to clean up the code David Kershner
2017-09-27 17:14 ` [PATCH 01/45] staging: unisys: visorbus: simplify commenting in controlvm_init David Kershner
2017-09-27 17:14 ` [PATCH 02/45] staging: unisys: visorbus: don't need local variable cmd David Kershner
2017-09-27 17:14 ` [PATCH 03/45] staging: unisys: visorbus: clean up parser_string_get function David Kershner
2017-09-27 17:14 ` [PATCH 04/45] staging: unisys: visorbus: visorchannel: use 80 characters for comments David Kershner
2017-09-27 17:14 ` [PATCH 05/45] staging: unisys; visorbus: visorchipset.c: remove extraneous newline David Kershner
2017-09-27 17:14 ` [PATCH 06/45] staging: unisys: visorbus: fix alignment of paranethesis David Kershner
2017-09-27 17:14 ` [PATCH 07/45] staging: unisys: visorbus: visorbus_private.h remove extra blank lines David Kershner
2017-09-27 17:14 ` [PATCH 08/45] staging: unisys: visorbus: visorbus_main.c: cleanup and consolidate comments David Kershner
2017-09-27 17:14 ` [PATCH 09/45] staging: unisys: visorbus: use guid_is_equal instead of memcmp David Kershner
2017-09-27 17:14 ` [PATCH 10/45] staging: unisys: visorbus: don't put code in declaration David Kershner
2017-09-27 17:14 ` [PATCH 11/45] staging: unisys: visorbus: NULL pending_msg_hdr not an error David Kershner
2017-09-27 17:14 ` [PATCH 12/45] staging: unisys: fix up device_destroy David Kershner
2017-09-27 17:14 ` [PATCH 13/45] staging: unisys; visorbus: visorbus_main.c: remove extraneous newline David Kershner
2017-09-27 17:14 ` [PATCH 14/45] staging: unisys: visorbus: clean up initializations David Kershner
2017-09-27 17:14 ` [PATCH 15/45] staging: unisys: visorbus: keep the success path on the left David Kershner
2017-09-27 17:14 ` [PATCH 16/45] staging: unisys: shrink the name of a variable David Kershner
2017-09-27 17:14 ` [PATCH 17/45] staging: unisys: visorbus: clean up formatting of function definitions David Kershner
2017-09-27 17:14 ` [PATCH 18/45] staging: unisys: visorbus: simplify debugfs print statment David Kershner
2017-09-27 17:14 ` [PATCH 19/45] staging: unisys: visorbus: Remove unneeded initialization David Kershner
2017-09-27 17:14 ` [PATCH 20/45] staging: unisys: visorbus: fix newlines for visorchannel David Kershner
2017-09-27 17:14 ` [PATCH 21/45] staging: unisys: visorbus: visorchipset: clean up blank lines in visorchipset David Kershner
2017-09-27 17:14 ` [PATCH 22/45] staging: unisys: visorbus: visorbus_main.c: remove blank lines David Kershner
2017-09-27 17:14 ` [PATCH 23/45] staging: unisys: visorbus: to_visor_device/to_visor_driver move up David Kershner
2017-09-27 17:14 ` [PATCH 24/45] staging: unisys: only include a file where it is used David Kershner
2017-09-27 17:14 ` [PATCH 25/45] staging: unisys: include: remove io.h from channel.h David Kershner
2017-09-27 17:14 ` [PATCH 26/45] staging: unisys: visorbus: vbuschannel doesn't use ctypes David Kershner
2017-09-27 17:14 ` [PATCH 27/45] staging: unisys: include: reorder to avoid forward declaration David Kershner
2017-09-27 17:14 ` [PATCH 28/45] staging: unisys: include: remove signature_32 David Kershner
2017-09-27 17:14 ` [PATCH 29/45] staging: unisys: include: consolidate a comment David Kershner
2017-09-27 17:14 ` [PATCH 30/45] staging: unisys: visorbus: keep the success path on the left side David Kershner
2017-09-27 17:14 ` [PATCH 31/45] staging: unisys: remove visorbus_type extern David Kershner
2017-09-27 17:14 ` [PATCH 32/45] staging: unisys: visorbus: visorchipset.c: Remove useless initializations David Kershner
2017-09-27 17:14 ` [PATCH 33/45] staging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX David Kershner
2017-09-28 13:33   ` Dan Carpenter
2017-09-27 17:14 ` [PATCH 34/45] staging: unisys: visorbus: clean up parameter formatting David Kershner
2017-09-27 17:14 ` [PATCH 35/45] staging: unisys: include: Rename channel.h to visorchannel.h David Kershner
2017-09-27 17:14 ` [PATCH 36/45] staging: unisys: include: Remove unnecessary macro to generate signature David Kershner
2017-09-27 17:14 ` [PATCH 37/45] staging: unisys: include: Remove unused enum David Kershner
2017-09-27 17:14 ` [PATCH 38/45] staging: unisys: check the whole channel instead of just guid for match David Kershner
2017-09-28 13:34   ` Dan Carpenter
2017-09-27 17:14 ` [PATCH 39/45] staging: unisys: visorbus: simplify visorchannel_create_guts David Kershner
2017-09-27 17:14 ` [PATCH 40/45] staging: unisys: visorbus: fix line over 80 characters checkpatch warning David Kershner
2017-09-27 17:14 ` [PATCH 41/45] staging: unisys: include: fix comments and spacing issues in visorbus.h David Kershner
2017-09-27 17:14 ` [PATCH 42/45] staging: unisys: visorbus: fix comments in vbuschannel.h David Kershner
2017-09-27 17:14 ` [PATCH 43/45] staging: unisys: visorbus: Fix extraneous parenthesis David Kershner
2017-09-27 17:14 ` [PATCH 44/45] staging: unisys: visorhba: clean up parenthesis David Kershner
2017-09-28 13:34   ` Dan Carpenter
2017-09-27 17:14 ` [PATCH 45/45] staging: unisys: visornic: " David Kershner
2017-09-28 13:57   ` 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.