All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/69] checkpatch fix series for Unisys drivers
@ 2014-12-05 22:08 Benjamin Romer
  2014-12-05 22:08 ` [PATCH 01/69] staging: unisys: fix line spacing in visorchipset_umode.h Benjamin Romer
                   ` (68 more replies)
  0 siblings, 69 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

This patch series contains all of the previously-submitted patches in order and
reviewed individually. The patches contain fixes based on errors, warnings,
and checks generated by checkpatch.pl, removal of log message macros, and fixes
to remove unnecessary goto statements.

Benjamin Romer (51):
  staging: unisys: fix line spacing in visorchipset_umode.h
  staging: unisys: fix line spacing in globals.h
  staging: unisys: remove testing.h
  staging: unisys: get rid of channel stub
  staging: unisys: remove unused types from visorchipset.h
  staging: unisys: add comment to spinlock in struct charqueue
  staging: unisys: clean up typecasts in uislib.c
  staging: unisys: fix alignment in uislib.c
  staging: unisys: refactor create_bus()
  staging: unisys: fix strict checks in create_device()
  staging: unisys: remove extraneous blank lines in uislib.c
  staging: unisys: add missing brackets in info_debugfs_read()
  staging: unisys: add missing brackets in Process_Incoming()
  staging: unisys: remove extra parens from
    uislib_enable_channel_interrupts()
  staging: unisys: get rid of doubled assignment in uislib_mod_init()
  staging: unisys: fix CamelCase global variable names in uislib.c
  staging: unisys: refactor init_vbus_channel()
  staging: unisys: fix CamelCase in create_bus()
  staging: unisys: fix CamelCase in destroy_bus()
  staging: unisys: refactor create_device()
  staging: unisys: refactor pause_device()
  staging: unisys: refactor resume_device()
  staging: unisys: refactor destroy_device()
  staging: unisys: refactor delete_bus_glue()
  staging: unisys: refactor delete_device_glue()
  staging: unisys: refactor info_debugfs_read()
  staging: unisys: refactor find_dev()
  staging: unisys: rename Process_Incoming()
  staging: unisys: rename Initialize_incoming_thread()
  staging: unisys: fix CamelCase Work queue name in uislib.c
  staging: unisys: fix spacing in uisqueue.c
  staging: unisys: fix CamelCase names in do_locked_client_insert()
  staging: unisys: fix line spacing in uisthread.c
  staging: unisys: fix line spacing in uisutils.c
  staging: unisys: fix spacing in uisutils.c
  staging: unisys: fix brackets in uisctrl_register_req_handler_ex()
  staging: unisys: refactor uisctrl_register_req_handler_ex()
  staging: unisys: refactor uisctrl_unregister_req_handler_ex()
  staging: unisys: fix CamelCase globals in uisutils.c
  staging: unisys: refactor req_handler_add()
  staging: unisys: refactor visorchipset_file_init()
  staging: unisys: fix CamelCase global variables in file.c
  staging: unisys: get rid of HAVE_UNLOCKED_IOCTL code
  staging: unisys: get rid of goto in visorchipset_open()
  staging: unisys: fix CamelCase in visorchipset_mmap()
  staging: unisys: get rid of goto in visorchipset_ioctl()
  staging: unisys: remove ERRDRV and related macros
  staging: unisys: remove DBGINF() macros
  staging: unisys: get rid of LOGINFO() macros
  staging: unisys: remove LOGVER() macros
  staging: unisys: get rid of LOGWRN() macro and uisklog.h

Bryan Thompson (4):
  staging: unisys: visorchannel: Rename CamelCase variable channelBytes
  staging: unisys: visorchannel: Rename CamelCase variable nQueues
  staging: unisys: visorchannel: Describe spinlocks in VISORCHANNEL_Tag
    struct
  staging: unisys: Remove VISORCHANNEL typedef

Ken Depro (14):
  staging: unisys: virthba: Remove unneeded spaces after casts
  staging: unisys: virthba: Fix open parenthesis alignment checks
  staging: unisys: virthba: Fix logical continuation checks
  staging: unisys: virthba: Remove blank lines before/after braces
  staging: unisys: virthba: Fix missing braces at end of if-else
    statements
  staging: unisys: virthba: Change alloc calls to use var name instead
    of type
  staging: unisys: virthba: Fix a couple checkpatch problems
  staging: unisys: virthba: Fix "else not useful after return" warning
  staging: unisys: virthba: Fix warnings regarding lines over 80
    characters
  staging: unisys: virthba: Fix a couple open parenthesis alignment
    issues
  staging: unisys: virthba: Fix CamelCase for Disk Add/Remove global
    variables
  staging: unisys: virthba: Fix remaining CamelCase global variables
  staging: unisys: virthba: Fix CamelCase for a couple function names
  staging: unisys: virthba: Fix CamelCase for local variables

 drivers/staging/unisys/Kconfig                     |   1 -
 drivers/staging/unisys/Makefile                    |   1 -
 drivers/staging/unisys/channels/Kconfig            |  10 -
 drivers/staging/unisys/channels/Makefile           |  11 -
 drivers/staging/unisys/channels/channel.c          | 219 -----
 drivers/staging/unisys/channels/chanstub.c         |  75 --
 drivers/staging/unisys/channels/chanstub.h         |  23 -
 drivers/staging/unisys/include/procobjecttree.h    |   1 -
 drivers/staging/unisys/include/timskmod.h          |  22 +-
 drivers/staging/unisys/include/uisqueue.h          |   1 -
 drivers/staging/unisys/include/uisutils.h          |   4 +-
 drivers/staging/unisys/include/uniklog.h           | 191 -----
 drivers/staging/unisys/uislib/Kconfig              |   2 +-
 drivers/staging/unisys/uislib/uislib.c             | 888 ++++++++++-----------
 drivers/staging/unisys/uislib/uisqueue.c           | 219 ++++-
 drivers/staging/unisys/uislib/uisthread.c          |  12 +-
 drivers/staging/unisys/uislib/uisutils.c           | 129 ++-
 drivers/staging/unisys/virthba/Kconfig             |   2 +-
 drivers/staging/unisys/virthba/virthba.c           | 620 +++++++-------
 drivers/staging/unisys/virtpci/virtpci.c           | 185 +++--
 drivers/staging/unisys/visorchannel/globals.h      |   1 -
 drivers/staging/unisys/visorchannel/visorchannel.h |  69 +-
 .../unisys/visorchannel/visorchannel_funcs.c       | 148 ++--
 .../unisys/visorchannel/visorchannel_main.c        |   4 +-
 drivers/staging/unisys/visorchipset/file.c         | 156 ++--
 drivers/staging/unisys/visorchipset/file.h         |   3 +-
 drivers/staging/unisys/visorchipset/globals.h      |   3 -
 drivers/staging/unisys/visorchipset/parser.c       |  39 +-
 drivers/staging/unisys/visorchipset/parser.h       |   1 -
 drivers/staging/unisys/visorchipset/testing.h      |  43 -
 drivers/staging/unisys/visorchipset/visorchipset.h |  55 --
 .../unisys/visorchipset/visorchipset_main.c        | 244 +++---
 .../unisys/visorchipset/visorchipset_umode.h       |   2 -
 drivers/staging/unisys/visorutil/charqueue.c       |   4 +-
 drivers/staging/unisys/visorutil/charqueue.h       |   1 -
 drivers/staging/unisys/visorutil/easyproc.c        |  26 +-
 .../staging/unisys/visorutil/memregion_direct.c    |  19 +-
 drivers/staging/unisys/visorutil/periodic_work.c   |  12 +-
 drivers/staging/unisys/visorutil/procobjecttree.c  |  30 +-
 drivers/staging/unisys/visorutil/visorkmodutils.c  |   1 -
 40 files changed, 1457 insertions(+), 2020 deletions(-)
 delete mode 100644 drivers/staging/unisys/channels/Kconfig
 delete mode 100644 drivers/staging/unisys/channels/Makefile
 delete mode 100644 drivers/staging/unisys/channels/channel.c
 delete mode 100644 drivers/staging/unisys/channels/chanstub.c
 delete mode 100644 drivers/staging/unisys/channels/chanstub.h
 delete mode 100644 drivers/staging/unisys/include/uniklog.h
 delete mode 100644 drivers/staging/unisys/visorchipset/testing.h

-- 
2.1.0

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

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

* [PATCH 01/69] staging: unisys: fix line spacing in visorchipset_umode.h
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 02/69] staging: unisys: fix line spacing in globals.h Benjamin Romer
                   ` (67 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Just get rid of the extra blank lines in this file.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/visorchipset_umode.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/visorchipset_umode.h b/drivers/staging/unisys/visorchipset/visorchipset_umode.h
index 06ba5b7..6cf6eccb 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_umode.h
+++ b/drivers/staging/unisys/visorchipset/visorchipset_umode.h
@@ -26,8 +26,6 @@
 #ifndef __VISORCHIPSET_UMODE_H
 #define __VISORCHIPSET_UMODE_H
 
-
-
 /** The user-mode program can access the control channel buffer directly
  *  via this memory map.
  */
-- 
2.1.0

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

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

* [PATCH 02/69] staging: unisys: fix line spacing in globals.h
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
  2014-12-05 22:08 ` [PATCH 01/69] staging: unisys: fix line spacing in visorchipset_umode.h Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 03/69] staging: unisys: remove testing.h Benjamin Romer
                   ` (66 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Get rid of the extra blank lines in globals.h.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/globals.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/globals.h b/drivers/staging/unisys/visorchipset/globals.h
index 0fe1459..a1d35d4 100644
--- a/drivers/staging/unisys/visorchipset/globals.h
+++ b/drivers/staging/unisys/visorchipset/globals.h
@@ -15,7 +15,6 @@
  * details.
  */
 
-
 #ifndef __VISORCHIPSET_GLOBALS_H__
 #define __VISORCHIPSET_GLOBALS_H__
 
@@ -28,7 +27,6 @@
 
 #define MYDRVNAME "visorchipset"
 
-
 /* module parameters */
 
 extern int visorchipset_testvnic;
-- 
2.1.0

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

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

* [PATCH 03/69] staging: unisys: remove testing.h
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
  2014-12-05 22:08 ` [PATCH 01/69] staging: unisys: fix line spacing in visorchipset_umode.h Benjamin Romer
  2014-12-05 22:08 ` [PATCH 02/69] staging: unisys: fix line spacing in globals.h Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 04/69] staging: unisys: get rid of channel stub Benjamin Romer
                   ` (65 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Nobody is using this file so remove it and the reference to it in
visorchipset_main.c.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/testing.h      | 43 ----------------------
 .../unisys/visorchipset/visorchipset_main.c        |  1 -
 2 files changed, 44 deletions(-)
 delete mode 100644 drivers/staging/unisys/visorchipset/testing.h

diff --git a/drivers/staging/unisys/visorchipset/testing.h b/drivers/staging/unisys/visorchipset/testing.h
deleted file mode 100644
index 573aa8b..0000000
--- a/drivers/staging/unisys/visorchipset/testing.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* testing.h
- *
- * Copyright (C) 2010 - 2013 UNISYS CORPORATION
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- */
-
-#ifndef __VISORCHIPSET_TESTING_H__
-#define __VISORCHIPSET_TESTING_H__
-
-#define VISORCHIPSET_TEST_PROC
-#include <linux/uuid.h>
-#include "globals.h"
-#include "controlvmchannel.h"
-
-void test_produce_test_message(struct controlvm_message *msg,
-			       int isLocalTestAddr);
-BOOL test_consume_test_message(struct controlvm_message *msg);
-void test_manufacture_vnic_client_add(void *p);
-void test_manufacture_vnic_client_add_phys(HOSTADDRESS addr);
-void test_manufacture_preamble_messages(void);
-void test_manufacture_device_attach(ulong busNo, ulong devNo);
-void test_manufacture_device_add(ulong busNo, ulong devNo, uuid_le dataTypeGuid,
-				 void *pChannel);
-void test_manufacture_add_bus(ulong busNo, ulong maxDevices,
-			      uuid_le id, u8 *name, BOOL isServer);
-void test_manufacture_device_destroy(ulong busNo, ulong devNo);
-void test_manufacture_bus_destroy(ulong busNo);
-void test_manufacture_detach_externalPort(ulong switchNo, ulong externalPortNo);
-void test_manufacture_detach_internalPort(ulong switchNo, ulong internalPortNo);
-void test_cleanup(void);
-
-#endif
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 7e6be32..2651f89 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -20,7 +20,6 @@
 #include "procobjecttree.h"
 #include "visorchannel.h"
 #include "periodic_work.h"
-#include "testing.h"
 #include "file.h"
 #include "parser.h"
 #include "uniklog.h"
-- 
2.1.0

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

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

* [PATCH 04/69] staging: unisys: get rid of channel stub
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (2 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 03/69] staging: unisys: remove testing.h Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 05/69] staging: unisys: remove unused types from visorchipset.h Benjamin Romer
                   ` (64 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

The functions in channels/* aren't used in a lot of places. In fact, the
functions in channel.c can be moved to uislib/uisqueue.c, and the rest
of the files in channels can be eliminated.

This patch deletes the channels directory and files, removes it from all
Kconfigs that referenced them, removes the reference in the Makefile,
and moves the functions inside of channels.c to uislib/uisqueue.c.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/Kconfig             |   1 -
 drivers/staging/unisys/Makefile            |   1 -
 drivers/staging/unisys/channels/Kconfig    |  10 --
 drivers/staging/unisys/channels/Makefile   |  11 --
 drivers/staging/unisys/channels/channel.c  | 219 -----------------------------
 drivers/staging/unisys/channels/chanstub.c |  75 ----------
 drivers/staging/unisys/channels/chanstub.h |  23 ---
 drivers/staging/unisys/uislib/Kconfig      |   2 +-
 drivers/staging/unisys/uislib/uislib.c     |   1 -
 drivers/staging/unisys/uislib/uisqueue.c   | 195 ++++++++++++++++++++++++-
 drivers/staging/unisys/virthba/Kconfig     |   2 +-
 11 files changed, 195 insertions(+), 345 deletions(-)
 delete mode 100644 drivers/staging/unisys/channels/Kconfig
 delete mode 100644 drivers/staging/unisys/channels/Makefile
 delete mode 100644 drivers/staging/unisys/channels/channel.c
 delete mode 100644 drivers/staging/unisys/channels/chanstub.c
 delete mode 100644 drivers/staging/unisys/channels/chanstub.h

diff --git a/drivers/staging/unisys/Kconfig b/drivers/staging/unisys/Kconfig
index ac080c9..19fcb34 100644
--- a/drivers/staging/unisys/Kconfig
+++ b/drivers/staging/unisys/Kconfig
@@ -12,7 +12,6 @@ if UNISYSSPAR
 source "drivers/staging/unisys/visorutil/Kconfig"
 source "drivers/staging/unisys/visorchannel/Kconfig"
 source "drivers/staging/unisys/visorchipset/Kconfig"
-source "drivers/staging/unisys/channels/Kconfig"
 source "drivers/staging/unisys/uislib/Kconfig"
 source "drivers/staging/unisys/virtpci/Kconfig"
 source "drivers/staging/unisys/virthba/Kconfig"
diff --git a/drivers/staging/unisys/Makefile b/drivers/staging/unisys/Makefile
index b988d69..68b9925 100644
--- a/drivers/staging/unisys/Makefile
+++ b/drivers/staging/unisys/Makefile
@@ -4,7 +4,6 @@
 obj-$(CONFIG_UNISYS_VISORUTIL)		+= visorutil/
 obj-$(CONFIG_UNISYS_VISORCHANNEL)	+= visorchannel/
 obj-$(CONFIG_UNISYS_VISORCHIPSET)	+= visorchipset/
-obj-$(CONFIG_UNISYS_CHANNELSTUB)	+= channels/
 obj-$(CONFIG_UNISYS_UISLIB)		+= uislib/
 obj-$(CONFIG_UNISYS_VIRTPCI)		+= virtpci/
 obj-$(CONFIG_UNISYS_VIRTHBA)		+= virthba/
diff --git a/drivers/staging/unisys/channels/Kconfig b/drivers/staging/unisys/channels/Kconfig
deleted file mode 100644
index 179c6ce..0000000
--- a/drivers/staging/unisys/channels/Kconfig
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Unisys channels configuration
-#
-
-config UNISYS_CHANNELSTUB
-	tristate "Unisys channelstub driver"
-	depends on UNISYSSPAR && UNISYS_VISORUTIL
-	---help---
-	If you say Y here, you will enable the Unisys channels driver.
-
diff --git a/drivers/staging/unisys/channels/Makefile b/drivers/staging/unisys/channels/Makefile
deleted file mode 100644
index adc1842..0000000
--- a/drivers/staging/unisys/channels/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# Makefile for Unisys channelstub
-#
-
-obj-$(CONFIG_UNISYS_CHANNELSTUB)	+= visorchannelstub.o
-
-visorchannelstub-y := channel.o chanstub.o
-
-ccflags-y += -Idrivers/staging/unisys/include
-ccflags-y += -Idrivers/staging/unisys/common-spar/include
-ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
diff --git a/drivers/staging/unisys/channels/channel.c b/drivers/staging/unisys/channels/channel.c
deleted file mode 100644
index 74cc4d6..0000000
--- a/drivers/staging/unisys/channels/channel.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/* Copyright (C) 2010 - 2013 UNISYS CORPORATION
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- */
-
-#include <linux/kernel.h>
-#ifdef CONFIG_MODVERSIONS
-#include <config/modversions.h>
-#endif
-#include <linux/module.h>
-#include <linux/init.h>		/* for module_init and module_exit */
-#include <linux/slab.h>		/* for memcpy */
-#include <linux/types.h>
-
-/* Implementation of exported functions for Supervisor channels */
-#include "channel.h"
-
-/*
- * Routine Description:
- * Tries to insert the prebuilt signal pointed to by pSignal into the nth
- * Queue of the Channel pointed to by pChannel
- *
- * Parameters:
- * pChannel: (IN) points to the IO Channel
- * Queue: (IN) nth Queue of the IO Channel
- * pSignal: (IN) pointer to the signal
- *
- * Assumptions:
- * - pChannel, Queue and pSignal are valid.
- * - If insertion fails due to a full queue, the caller will determine the
- * retry policy (e.g. wait & try again, report an error, etc.).
- *
- * Return value:
- * 1 if the insertion succeeds, 0 if the queue was full.
- */
-unsigned char spar_signal_insert(struct channel_header __iomem *ch, u32 queue,
-				 void *sig)
-{
-	void __iomem *psignal;
-	unsigned int head, tail, nof;
-
-	struct signal_queue_header __iomem *pqhdr =
-	    (struct signal_queue_header __iomem *)
-		((char __iomem *)ch + readq(&ch->ch_space_offset))
-		+ queue;
-
-	/* capture current head and tail */
-	head = readl(&pqhdr->head);
-	tail = readl(&pqhdr->tail);
-
-	/* queue is full if (head + 1) % n equals tail */
-	if (((head + 1) % readl(&pqhdr->max_slots)) == tail) {
-		nof = readq(&pqhdr->num_overflows) + 1;
-		writeq(nof, &pqhdr->num_overflows);
-		return 0;
-	}
-
-	/* increment the head index */
-	head = (head + 1) % readl(&pqhdr->max_slots);
-
-	/* copy signal to the head location from the area pointed to
-	 * by pSignal
-	 */
-	psignal = (char __iomem *)pqhdr + readq(&pqhdr->sig_base_offset) +
-		(head * readl(&pqhdr->signal_size));
-	memcpy_toio(psignal, sig, readl(&pqhdr->signal_size));
-
-	mb(); /* channel synch */
-	writel(head, &pqhdr->head);
-
-	writeq(readq(&pqhdr->num_sent) + 1, &pqhdr->num_sent);
-	return 1;
-}
-EXPORT_SYMBOL_GPL(spar_signal_insert);
-
-/*
- * Routine Description:
- * Removes one signal from Channel pChannel's nth Queue at the
- * time of the call and copies it into the memory pointed to by
- * pSignal.
- *
- * Parameters:
- * pChannel: (IN) points to the IO Channel
- * Queue: (IN) nth Queue of the IO Channel
- * pSignal: (IN) pointer to where the signals are to be copied
- *
- * Assumptions:
- * - pChannel and Queue are valid.
- * - pSignal points to a memory area large enough to hold queue's SignalSize
- *
- * Return value:
- * 1 if the removal succeeds, 0 if the queue was empty.
- */
-unsigned char
-spar_signal_remove(struct channel_header __iomem *ch, u32 queue, void *sig)
-{
-	void __iomem *psource;
-	unsigned int head, tail;
-	struct signal_queue_header __iomem *pqhdr =
-	    (struct signal_queue_header __iomem *)((char __iomem *)ch +
-				    readq(&ch->ch_space_offset)) + queue;
-
-	/* capture current head and tail */
-	head = readl(&pqhdr->head);
-	tail = readl(&pqhdr->tail);
-
-	/* queue is empty if the head index equals the tail index */
-	if (head == tail) {
-		writeq(readq(&pqhdr->num_empty) + 1, &pqhdr->num_empty);
-		return 0;
-	}
-
-	/* advance past the 'empty' front slot */
-	tail = (tail + 1) % readl(&pqhdr->max_slots);
-
-	/* copy signal from tail location to the area pointed to by pSignal */
-	psource = (char __iomem *)pqhdr + readq(&pqhdr->sig_base_offset) +
-		(tail * readl(&pqhdr->signal_size));
-	memcpy_fromio(sig, psource, readl(&pqhdr->signal_size));
-
-	mb(); /* channel synch */
-	writel(tail, &pqhdr->tail);
-
-	writeq(readq(&pqhdr->num_received) + 1,
-	       &pqhdr->num_received);
-	return 1;
-}
-EXPORT_SYMBOL_GPL(spar_signal_remove);
-
-/*
- * Routine Description:
- * Removes all signals present in Channel pChannel's nth Queue at the
- * time of the call and copies them into the memory pointed to by
- * pSignal.  Returns the # of signals copied as the value of the routine.
- *
- * Parameters:
- * pChannel: (IN) points to the IO Channel
- * Queue: (IN) nth Queue of the IO Channel
- * pSignal: (IN) pointer to where the signals are to be copied
- *
- * Assumptions:
- * - pChannel and Queue are valid.
- * - pSignal points to a memory area large enough to hold Queue's MaxSignals
- * # of signals, each of which is Queue's SignalSize.
- *
- * Return value:
- * # of signals copied.
- */
-unsigned int spar_signal_remove_all(struct channel_header *ch, u32 queue,
-				    void *sig)
-{
-	void *psource;
-	unsigned int head, tail, count = 0;
-	struct signal_queue_header *pqhdr =
-	    (struct signal_queue_header *)((char *)ch +
-				    ch->ch_space_offset) + queue;
-
-	/* capture current head and tail */
-	head = pqhdr->head;
-	tail = pqhdr->tail;
-
-	/* queue is empty if the head index equals the tail index */
-	if (head == tail)
-		return 0;
-
-	while (head != tail) {
-		/* advance past the 'empty' front slot */
-		tail = (tail + 1) % pqhdr->max_slots;
-
-		/* copy signal from tail location to the area pointed
-		 * to by pSignal
-		 */
-		psource =
-		    (char *)pqhdr + pqhdr->sig_base_offset +
-		    (tail * pqhdr->signal_size);
-		memcpy((char *)sig + (pqhdr->signal_size * count),
-		       psource, pqhdr->signal_size);
-
-		mb(); /* channel synch */
-		pqhdr->tail = tail;
-
-		count++;
-		pqhdr->num_received++;
-	}
-
-	return count;
-}
-
-/*
- * Routine Description:
- * Determine whether a signal queue is empty.
- *
- * Parameters:
- * pChannel: (IN) points to the IO Channel
- * Queue: (IN) nth Queue of the IO Channel
- *
- * Return value:
- * 1 if the signal queue is empty, 0 otherwise.
- */
-unsigned char spar_signalqueue_empty(struct channel_header __iomem *ch,
-				     u32 queue)
-{
-	struct signal_queue_header __iomem *pqhdr =
-	    (struct signal_queue_header __iomem *)((char __iomem *)ch +
-				    readq(&ch->ch_space_offset)) + queue;
-	return readl(&pqhdr->head) == readl(&pqhdr->tail);
-}
-EXPORT_SYMBOL_GPL(spar_signalqueue_empty);
-
diff --git a/drivers/staging/unisys/channels/chanstub.c b/drivers/staging/unisys/channels/chanstub.c
deleted file mode 100644
index b6fd126..0000000
--- a/drivers/staging/unisys/channels/chanstub.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (C) 2010 - 2013 UNISYS CORPORATION
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- */
-
-#define EXPORT_SYMTAB
-#include <linux/kernel.h>
-#ifdef CONFIG_MODVERSIONS
-#include <config/modversions.h>
-#endif
-#include <linux/module.h>
-#include <linux/init.h>		/* for module_init and module_exit */
-#include <linux/slab.h>		/* for memcpy */
-#include <linux/types.h>
-
-#include "channel.h"
-#include "chanstub.h"
-#include "timskmod.h"
-#include "version.h"
-
-static __init int
-channel_mod_init(void)
-{
-	if (!unisys_spar_platform)
-		return -ENODEV;
-	return 0;
-}
-
-static __exit void
-channel_mod_exit(void)
-{
-}
-
-unsigned char
-SignalInsert_withLock(struct channel_header __iomem *pChannel, u32 Queue,
-		      void *pSignal, spinlock_t *lock)
-{
-	unsigned char result;
-	unsigned long flags;
-
-	spin_lock_irqsave(lock, flags);
-	result = spar_signal_insert(pChannel, Queue, pSignal);
-	spin_unlock_irqrestore(lock, flags);
-	return result;
-}
-
-unsigned char
-SignalRemove_withLock(struct channel_header __iomem *pChannel, u32 Queue,
-		      void *pSignal, spinlock_t *lock)
-{
-	unsigned char result;
-
-	spin_lock(lock);
-	result = spar_signal_remove(pChannel, Queue, pSignal);
-	spin_unlock(lock);
-	return result;
-}
-
-module_init(channel_mod_init);
-module_exit(channel_mod_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Bryan Glaudel");
-MODULE_ALIAS("uischan");
-	/* this is extracted during depmod and kept in modules.dep */
diff --git a/drivers/staging/unisys/channels/chanstub.h b/drivers/staging/unisys/channels/chanstub.h
deleted file mode 100644
index 1531759..0000000
--- a/drivers/staging/unisys/channels/chanstub.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (C) 2010 - 2013 UNISYS CORPORATION
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- */
-
-#ifndef __CHANSTUB_H__
-#define __CHANSTUB_H__
-unsigned char SignalInsert_withLock(struct channel_header __iomem *pChannel,
-				    u32 Queue, void *pSignal, spinlock_t *lock);
-unsigned char SignalRemove_withLock(struct channel_header __iomem *pChannel,
-				    u32 Queue, void *pSignal, spinlock_t *lock);
-
-#endif
diff --git a/drivers/staging/unisys/uislib/Kconfig b/drivers/staging/unisys/uislib/Kconfig
index 6b134e2..a712eb8 100644
--- a/drivers/staging/unisys/uislib/Kconfig
+++ b/drivers/staging/unisys/uislib/Kconfig
@@ -4,7 +4,7 @@
 
 config UNISYS_UISLIB
 	tristate "Unisys uislib driver"
-	depends on UNISYSSPAR && UNISYS_VISORCHIPSET && UNISYS_CHANNELSTUB && HAS_IOMEM
+	depends on UNISYSSPAR && UNISYS_VISORCHIPSET && HAS_IOMEM
 	---help---
 	If you say Y here, you will enable the Unisys uislib driver.
 
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 7c87452..9bcaa0f 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -41,7 +41,6 @@
 
 #include "sparstop.h"
 #include "visorchipset.h"
-#include "chanstub.h"
 #include "version.h"
 #include "guestlinuxdebug.h"
 
diff --git a/drivers/staging/unisys/uislib/uisqueue.c b/drivers/staging/unisys/uislib/uisqueue.c
index f9f8442..69151e4 100644
--- a/drivers/staging/unisys/uislib/uisqueue.c
+++ b/drivers/staging/unisys/uislib/uisqueue.c
@@ -21,8 +21,6 @@
 
 #include "uisutils.h"
 
-#include "chanstub.h"
-
 /* this is shorter than using __FILE__ (full path name) in
  * debug/info/error messages */
 #define CURRENT_FILE_PC UISLIB_PC_uisqueue_c
@@ -33,6 +31,199 @@
 /*****************************************************/
 /* Exported functions                                */
 /*****************************************************/
+
+/*
+ * Routine Description:
+ * Tries to insert the prebuilt signal pointed to by pSignal into the nth
+ * Queue of the Channel pointed to by pChannel
+ *
+ * Parameters:
+ * pChannel: (IN) points to the IO Channel
+ * Queue: (IN) nth Queue of the IO Channel
+ * pSignal: (IN) pointer to the signal
+ *
+ * Assumptions:
+ * - pChannel, Queue and pSignal are valid.
+ * - If insertion fails due to a full queue, the caller will determine the
+ * retry policy (e.g. wait & try again, report an error, etc.).
+ *
+ * Return value:
+ * 1 if the insertion succeeds, 0 if the queue was full.
+ */
+unsigned char spar_signal_insert(struct channel_header __iomem *ch, u32 queue,
+				 void *sig)
+{
+	void __iomem *psignal;
+	unsigned int head, tail, nof;
+
+	struct signal_queue_header __iomem *pqhdr =
+	    (struct signal_queue_header __iomem *)
+		((char __iomem *)ch + readq(&ch->ch_space_offset))
+		+ queue;
+
+	/* capture current head and tail */
+	head = readl(&pqhdr->head);
+	tail = readl(&pqhdr->tail);
+
+	/* queue is full if (head + 1) % n equals tail */
+	if (((head + 1) % readl(&pqhdr->max_slots)) == tail) {
+		nof = readq(&pqhdr->num_overflows) + 1;
+		writeq(nof, &pqhdr->num_overflows);
+		return 0;
+	}
+
+	/* increment the head index */
+	head = (head + 1) % readl(&pqhdr->max_slots);
+
+	/* copy signal to the head location from the area pointed to
+	 * by pSignal
+	 */
+	psignal = (char __iomem *)pqhdr + readq(&pqhdr->sig_base_offset) +
+		(head * readl(&pqhdr->signal_size));
+	memcpy_toio(psignal, sig, readl(&pqhdr->signal_size));
+
+	mb(); /* channel synch */
+	writel(head, &pqhdr->head);
+
+	writeq(readq(&pqhdr->num_sent) + 1, &pqhdr->num_sent);
+	return 1;
+}
+EXPORT_SYMBOL_GPL(spar_signal_insert);
+
+/*
+ * Routine Description:
+ * Removes one signal from Channel pChannel's nth Queue at the
+ * time of the call and copies it into the memory pointed to by
+ * pSignal.
+ *
+ * Parameters:
+ * pChannel: (IN) points to the IO Channel
+ * Queue: (IN) nth Queue of the IO Channel
+ * pSignal: (IN) pointer to where the signals are to be copied
+ *
+ * Assumptions:
+ * - pChannel and Queue are valid.
+ * - pSignal points to a memory area large enough to hold queue's SignalSize
+ *
+ * Return value:
+ * 1 if the removal succeeds, 0 if the queue was empty.
+ */
+unsigned char
+spar_signal_remove(struct channel_header __iomem *ch, u32 queue, void *sig)
+{
+	void __iomem *psource;
+	unsigned int head, tail;
+	struct signal_queue_header __iomem *pqhdr =
+	    (struct signal_queue_header __iomem *)((char __iomem *)ch +
+				    readq(&ch->ch_space_offset)) + queue;
+
+	/* capture current head and tail */
+	head = readl(&pqhdr->head);
+	tail = readl(&pqhdr->tail);
+
+	/* queue is empty if the head index equals the tail index */
+	if (head == tail) {
+		writeq(readq(&pqhdr->num_empty) + 1, &pqhdr->num_empty);
+		return 0;
+	}
+
+	/* advance past the 'empty' front slot */
+	tail = (tail + 1) % readl(&pqhdr->max_slots);
+
+	/* copy signal from tail location to the area pointed to by pSignal */
+	psource = (char __iomem *)pqhdr + readq(&pqhdr->sig_base_offset) +
+		(tail * readl(&pqhdr->signal_size));
+	memcpy_fromio(sig, psource, readl(&pqhdr->signal_size));
+
+	mb(); /* channel synch */
+	writel(tail, &pqhdr->tail);
+
+	writeq(readq(&pqhdr->num_received) + 1,
+	       &pqhdr->num_received);
+	return 1;
+}
+EXPORT_SYMBOL_GPL(spar_signal_remove);
+
+/*
+ * Routine Description:
+ * Removes all signals present in Channel pChannel's nth Queue at the
+ * time of the call and copies them into the memory pointed to by
+ * pSignal.  Returns the # of signals copied as the value of the routine.
+ *
+ * Parameters:
+ * pChannel: (IN) points to the IO Channel
+ * Queue: (IN) nth Queue of the IO Channel
+ * pSignal: (IN) pointer to where the signals are to be copied
+ *
+ * Assumptions:
+ * - pChannel and Queue are valid.
+ * - pSignal points to a memory area large enough to hold Queue's MaxSignals
+ * # of signals, each of which is Queue's SignalSize.
+ *
+ * Return value:
+ * # of signals copied.
+ */
+unsigned int spar_signal_remove_all(struct channel_header *ch, u32 queue,
+				    void *sig)
+{
+	void *psource;
+	unsigned int head, tail, count = 0;
+	struct signal_queue_header *pqhdr =
+	    (struct signal_queue_header *)((char *)ch +
+				    ch->ch_space_offset) + queue;
+
+	/* capture current head and tail */
+	head = pqhdr->head;
+	tail = pqhdr->tail;
+
+	/* queue is empty if the head index equals the tail index */
+	if (head == tail)
+		return 0;
+
+	while (head != tail) {
+		/* advance past the 'empty' front slot */
+		tail = (tail + 1) % pqhdr->max_slots;
+
+		/* copy signal from tail location to the area pointed
+		 * to by pSignal
+		 */
+		psource =
+		    (char *)pqhdr + pqhdr->sig_base_offset +
+		    (tail * pqhdr->signal_size);
+		memcpy((char *)sig + (pqhdr->signal_size * count),
+		       psource, pqhdr->signal_size);
+
+		mb(); /* channel synch */
+		pqhdr->tail = tail;
+
+		count++;
+		pqhdr->num_received++;
+	}
+
+	return count;
+}
+
+/*
+ * Routine Description:
+ * Determine whether a signal queue is empty.
+ *
+ * Parameters:
+ * pChannel: (IN) points to the IO Channel
+ * Queue: (IN) nth Queue of the IO Channel
+ *
+ * Return value:
+ * 1 if the signal queue is empty, 0 otherwise.
+ */
+unsigned char spar_signalqueue_empty(struct channel_header __iomem *ch,
+				     u32 queue)
+{
+	struct signal_queue_header __iomem *pqhdr =
+	    (struct signal_queue_header __iomem *)((char __iomem *)ch +
+				    readq(&ch->ch_space_offset)) + queue;
+	return readl(&pqhdr->head) == readl(&pqhdr->tail);
+}
+EXPORT_SYMBOL_GPL(spar_signalqueue_empty);
+
 unsigned long long
 uisqueue_interlocked_or(unsigned long long __iomem *tgt,
 		       unsigned long long set)
diff --git a/drivers/staging/unisys/virthba/Kconfig b/drivers/staging/unisys/virthba/Kconfig
index c0d7986..9af98fc 100644
--- a/drivers/staging/unisys/virthba/Kconfig
+++ b/drivers/staging/unisys/virthba/Kconfig
@@ -4,7 +4,7 @@
 
 config UNISYS_VIRTHBA
 	tristate "Unisys virthba driver"
-	depends on UNISYSSPAR && UNISYS_VISORCHIPSET && UNISYS_CHANNELSTUB && UNISYS_UISLIB && UNISYS_VIRTPCI && SCSI
+	depends on UNISYSSPAR && UNISYS_VISORCHIPSET && UNISYS_UISLIB && UNISYS_VIRTPCI && SCSI
 	---help---
 	If you say Y here, you will enable the Unisys virthba driver.
 
-- 
2.1.0

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

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

* [PATCH 05/69] staging: unisys: remove unused types from visorchipset.h
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (3 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 04/69] staging: unisys: get rid of channel stub Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 06/69] staging: unisys: add comment to spinlock in struct charqueue Benjamin Romer
                   ` (63 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Ken Depro

Delete the following unused types, and unused function prototypes:

VISORCHIPSET_SWITCH_INFO
VISORCHIPSET_EXTERNALPORT_INFO
VISORCHIPSET_INTERNALPORT_INFO
visorchipset_get_switch_info()
visorchipset_get_externalport_info()

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/visorchipset.h | 55 ----------------------
 1 file changed, 55 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/visorchipset.h b/drivers/staging/unisys/visorchipset/visorchipset.h
index 46dad63..98f3ba4 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset.h
+++ b/drivers/staging/unisys/visorchipset/visorchipset.h
@@ -158,61 +158,6 @@ findbus(struct list_head *list, u32 bus_no)
 	return NULL;
 }
 
-/** Attributes for a particular Supervisor switch.
- */
-struct visorchipset_switch_info {
-	u32 switch_no;
-	struct visorchipset_state state;
-	uuid_le switch_type_uuid;
-	u8 *authservice1;
-	u8 *authservice2;
-	u8 *authservice3;
-	u8 *security_context;
-	u64 reserved;
-	u32 reserved2;		/* control_vm_id */
-	struct device dev;
-	BOOL dev_exists;
-	struct controlvm_message_header pending_msg_hdr;
-};
-
-/** Attributes for a particular Supervisor external port, which is connected
- *  to a specific switch.
- */
-struct visorchipset_externalport_info {
-	u32 switch_no;
-	u32 external_port_no;
-	struct visorchipset_state state;
-	uuid_le network_zone_uuid;
-	int pd_port;
-	u8 *ip;
-	u8 *ip_netmask;
-	u8 *ip_broadcast;
-	u8 *ip_network;
-	u8 *ip_gateway;
-	u8 *ip_dns;
-	u64 reserved1;
-	u32 reserved2;		/* control_vm_id */
-	struct device dev;
-	BOOL dev_exists;
-	struct controlvm_message_header pending_msg_hdr;
-};
-
-/** Attributes for a particular Supervisor internal port, which is how a
- *  device connects to a particular switch.
- */
-struct visorchipset_internalport_info {
-	u32 switch_no;
-	u32 internal_port_no;
-	struct visorchipset_state state;
-	u32 bus_no;		/* valid only when state.attached == 1 */
-	u32 dev_no;		/* valid only when state.attached == 1 */
-	u64 reserved1;
-	u32 reserved2;		/* CONTROLVM_ID */
-	struct controlvm_message_header pending_msg_hdr;
-	MYPROCOBJECT *proc_object;
-
-};
-
 /*  These functions will be called from within visorchipset when certain
  *  events happen.  (The implementation of these functions is outside of
  *  visorchipset.)
-- 
2.1.0

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

* [PATCH 06/69] staging: unisys: add comment to spinlock in struct charqueue
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (4 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 05/69] staging: unisys: remove unused types from visorchipset.h Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 07/69] staging: unisys: clean up typecasts in uislib.c Benjamin Romer
                   ` (62 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Add a comment to the charqueue's spinlock to explain that it is a lock for the
structure.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorutil/charqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorutil/charqueue.c b/drivers/staging/unisys/visorutil/charqueue.c
index 1ce7003..ac7acb7 100644
--- a/drivers/staging/unisys/visorutil/charqueue.c
+++ b/drivers/staging/unisys/visorutil/charqueue.c
@@ -28,7 +28,7 @@
 struct charqueue {
 	int alloc_size;
 	int nslots;
-	spinlock_t lock;
+	spinlock_t lock; /* read/write lock for this structure */
 	int head, tail;
 	unsigned char buf[0];
 };
-- 
2.1.0

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

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

* [PATCH 07/69] staging: unisys: clean up typecasts in uislib.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (5 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 06/69] staging: unisys: add comment to spinlock in struct charqueue Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 08/69] staging: unisys: fix alignment " Benjamin Romer
                   ` (61 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Ken Depro

Remove all extraneous spaces from typecasts in uislib.c.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 42 +++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 9bcaa0f..c28d6f3 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -136,8 +136,8 @@ init_vbus_channel(u64 channelAddr, u32 channelBytes)
 
 	if (!pChan) {
 		LOGERR("CONTROLVM_BUS_CREATE error: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
-		     (unsigned long long) channelAddr,
-		     (unsigned long long) channelBytes);
+		     (unsigned long long)channelAddr,
+		     (unsigned long long)channelBytes);
 		rc = NULL;
 		goto Away;
 	}
@@ -194,10 +194,10 @@ create_bus(struct controlvm_message *msg, char *buf)
 		bus->local_vnic = 1;
 	} else
 		bus->bus_no = bus->guest_handle = busNo;
-	sprintf(bus->name, "%d", (int) bus->bus_no);
+	sprintf(bus->name, "%d", (int)bus->bus_no);
 	bus->device_count = deviceCount;
 	bus->device =
-	    (struct device_info **) ((char *) bus + sizeof(struct bus_info));
+	    (struct device_info **)((char *)bus + sizeof(struct bus_info));
 	bus->bus_inst_uuid = msg->cmd.create_bus.bus_inst_uuid;
 	bus->bus_channel_bytes = 0;
 	bus->bus_channel = NULL;
@@ -373,7 +373,7 @@ create_device(struct controlvm_message *msg, char *buf)
 	dev->bus_no = busNo;
 	dev->dev_no = devNo;
 	sema_init(&dev->interrupt_callback_lock, 1);	/* unlocked */
-	sprintf(dev->devid, "vbus%u:dev%u", (unsigned) busNo, (unsigned) devNo);
+	sprintf(dev->devid, "vbus%u:dev%u", (unsigned)busNo, (unsigned)devNo);
 	/* map the channel memory for the device. */
 	if (msg->hdr.flags.test_message)
 		dev->chanptr = (void __iomem *)__va(dev->channel_addr);
@@ -955,7 +955,7 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no,
 	msg.cmd.create_device.channel_addr = phys_chan_addr;
 	if (chan_bytes < MIN_IO_CHANNEL_SIZE) {
 		LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
-		     chan_bytes, (unsigned int) MIN_IO_CHANNEL_SIZE);
+		     chan_bytes, (unsigned int)MIN_IO_CHANNEL_SIZE);
 		POSTCODE_LINUX_4(VHBA_CREATE_FAILURE_PC, chan_bytes,
 				 MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR);
 		return 0;
@@ -1014,7 +1014,7 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no,
 	msg.cmd.create_device.channel_addr = phys_chan_addr;
 	if (chan_bytes < MIN_IO_CHANNEL_SIZE) {
 		LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
-		     chan_bytes, (unsigned int) MIN_IO_CHANNEL_SIZE);
+		     chan_bytes, (unsigned int)MIN_IO_CHANNEL_SIZE);
 		POSTCODE_LINUX_4(VNIC_CREATE_FAILURE_PC, chan_bytes,
 				 MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR);
 		return 0;
@@ -1225,14 +1225,14 @@ find_dev(u32 busNo, u32 devNo)
 			if (devNo >= bus->device_count) {
 				LOGERR("%s bad busNo, devNo=%d,%d",
 				       __func__,
-				       (int) (busNo), (int) (devNo));
+				       (int)(busNo), (int)(devNo));
 				goto Away;
 			}
 			dev = bus->device[devNo];
 			if (!dev)
 				LOGERR("%s bad busNo, devNo=%d,%d",
 				       __func__,
-				       (int) (busNo), (int) (devNo));
+				       (int)(busNo), (int)(devNo));
 			goto Away;
 		}
 	}
@@ -1396,8 +1396,8 @@ uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no,
 
 	dev = find_dev(bus_no, dev_no);
 	if (!dev) {
-		LOGERR("%s busNo=%d, devNo=%d", __func__, (int) (bus_no),
-		       (int) (dev_no));
+		LOGERR("%s busNo=%d, devNo=%d", __func__, (int)(bus_no),
+		       (int)(dev_no));
 		return;
 	}
 	down(&Lock_Polling_Device_Channels);
@@ -1421,8 +1421,8 @@ uislib_disable_channel_interrupts(u32 bus_no, u32 dev_no)
 
 	dev = find_dev(bus_no, dev_no);
 	if (!dev) {
-		LOGERR("%s busNo=%d, devNo=%d", __func__, (int) (bus_no),
-		       (int) (dev_no));
+		LOGERR("%s busNo=%d, devNo=%d", __func__, (int)(bus_no),
+		       (int)(dev_no));
 		return;
 	}
 	down(&Lock_Polling_Device_Channels);
@@ -1478,21 +1478,21 @@ uislib_mod_init(void)
 	LOGINF("MONITORAPIS");
 
 	LOGINF("sizeof(struct uiscmdrsp):%lu bytes\n",
-	       (ulong) sizeof(struct uiscmdrsp));
+	       (ulong)sizeof(struct uiscmdrsp));
 	LOGINF("sizeof(struct phys_info):%lu\n",
-	       (ulong) sizeof(struct phys_info));
+	       (ulong)sizeof(struct phys_info));
 	LOGINF("sizeof(uiscmdrsp_scsi):%lu\n",
-	       (ulong) sizeof(struct uiscmdrsp_scsi));
+	       (ulong)sizeof(struct uiscmdrsp_scsi));
 	LOGINF("sizeof(uiscmdrsp_net):%lu\n",
-	       (ulong) sizeof(struct uiscmdrsp_net));
+	       (ulong)sizeof(struct uiscmdrsp_net));
 	LOGINF("sizeof(CONTROLVM_MESSAGE):%lu bytes\n",
-	       (ulong) sizeof(struct controlvm_message));
+	       (ulong)sizeof(struct controlvm_message));
 	LOGINF("sizeof(struct spar_controlvm_channel_protocol):%lu bytes\n",
-	       (ulong) sizeof(struct spar_controlvm_channel_protocol));
+	       (ulong)sizeof(struct spar_controlvm_channel_protocol));
 	LOGINF("sizeof(CHANNEL_HEADER):%lu bytes\n",
-	       (ulong) sizeof(struct channel_header));
+	       (ulong)sizeof(struct channel_header));
 	LOGINF("sizeof(struct spar_io_channel_protocol):%lu bytes\n",
-	       (ulong) sizeof(struct spar_io_channel_protocol));
+	       (ulong)sizeof(struct spar_io_channel_protocol));
 	LOGINF("SIZEOF_CMDRSP:%lu bytes\n", SIZEOF_CMDRSP);
 	LOGINF("SIZEOF_PROTOCOL:%lu bytes\n", SIZEOF_PROTOCOL);
 
-- 
2.1.0

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

* [PATCH 08/69] staging: unisys: fix alignment in uislib.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (6 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 07/69] staging: unisys: clean up typecasts in uislib.c Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 09/69] staging: unisys: refactor create_bus() Benjamin Romer
                   ` (60 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix almost all of the parenthesis alignment problems in uislib.c. The 2
remaining issues are in create_device(), which is heavily indented and needs
to be refactored entirely anyway.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 48 +++++++++++++++++-----------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index c28d6f3..f25dd2f 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -114,7 +114,7 @@ static unsigned long long cycles_before_wait, wait_cycles;
 /*****************************************************/
 
 static ssize_t info_debugfs_read(struct file *file, char __user *buf,
-			      size_t len, loff_t *offset);
+				 size_t len, loff_t *offset);
 static const struct file_operations debugfs_info_fops = {
 	.read = info_debugfs_read,
 };
@@ -136,8 +136,8 @@ init_vbus_channel(u64 channelAddr, u32 channelBytes)
 
 	if (!pChan) {
 		LOGERR("CONTROLVM_BUS_CREATE error: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
-		     (unsigned long long)channelAddr,
-		     (unsigned long long)channelBytes);
+		       (unsigned long long)channelAddr,
+		       (unsigned long long)channelBytes);
 		rc = NULL;
 		goto Away;
 	}
@@ -161,7 +161,7 @@ create_bus(struct controlvm_message *msg, char *buf)
 
 	if (MaxBusCount == BusListCount) {
 		LOGERR("CONTROLVM_BUS_CREATE Failed: max buses:%d already created\n",
-		     MaxBusCount);
+		       MaxBusCount);
 		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, MaxBusCount,
 				 POSTCODE_SEVERITY_ERR);
 		return CONTROLVM_RESP_ERROR_MAX_BUSES;
@@ -301,7 +301,7 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 	for (i = 0; i < bus->device_count; i++) {
 		if (bus->device[i] != NULL) {
 			LOGERR("CONTROLVM_BUS_DESTROY Failed: device %i attached to bus %d.",
-			     i, busNo);
+			       i, busNo);
 			read_unlock(&BusListLock);
 			return CONTROLVM_RESP_ERROR_BUS_DEVICE_ATTACHED;
 		}
@@ -386,8 +386,8 @@ create_device(struct controlvm_message *msg, char *buf)
 			minSize = pReqHandler->min_channel_bytes;
 		if (minSize > msg->cmd.create_device.channel_bytes) {
 			LOGERR("CONTROLVM_DEVICE_CREATE Failed: channel size is too small, channel size:0x%lx, required size:0x%lx",
-			     (ulong) msg->cmd.create_device.channel_bytes,
-			     (ulong) minSize);
+			       (ulong) msg->cmd.create_device.channel_bytes,
+			       (ulong) minSize);
 			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
 					 POSTCODE_SEVERITY_ERR);
 			result = CONTROLVM_RESP_ERROR_CHANNEL_SIZE_TOO_SMALL;
@@ -398,8 +398,8 @@ create_device(struct controlvm_message *msg, char *buf)
 					 msg->cmd.create_device.channel_bytes);
 		if (!dev->chanptr) {
 			LOGERR("CONTROLVM_DEVICE_CREATE Failed: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
-			     dev->channel_addr,
-			     msg->cmd.create_device.channel_bytes);
+			       dev->channel_addr,
+			       msg->cmd.create_device.channel_bytes);
 			result = CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
 			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
 					 POSTCODE_SEVERITY_ERR);
@@ -415,7 +415,7 @@ create_device(struct controlvm_message *msg, char *buf)
 			/* make sure the device number is valid */
 			if (devNo >= bus->device_count) {
 				LOGERR("CONTROLVM_DEVICE_CREATE Failed: device (%d) >= deviceCount (%d).",
-				     devNo, bus->device_count);
+				       devNo, bus->device_count);
 				result = CONTROLVM_RESP_ERROR_MAX_DEVICES;
 				POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
 						 devNo, busNo,
@@ -426,7 +426,7 @@ create_device(struct controlvm_message *msg, char *buf)
 			/* make sure this device is not already set */
 			if (bus->device[devNo]) {
 				LOGERR("CONTROLVM_DEVICE_CREATE Failed: device %d is already exists.",
-				     devNo);
+				       devNo);
 				POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
 						 devNo, busNo,
 						 POSTCODE_SEVERITY_ERR);
@@ -442,7 +442,7 @@ create_device(struct controlvm_message *msg, char *buf)
 				struct guest_msgs cmd;
 
 				if (!uuid_le_cmp(dev->channel_uuid,
-				     spar_vhba_channel_protocol_uuid)) {
+				    spar_vhba_channel_protocol_uuid)) {
 					wait_for_valid_guid(&((
 						struct channel_header
 							__iomem *) (dev->
@@ -451,7 +451,7 @@ create_device(struct controlvm_message *msg, char *buf)
 					if (!SPAR_VHBA_CHANNEL_OK_CLIENT
 					    (dev->chanptr)) {
 						LOGERR("CONTROLVM_DEVICE_CREATE Failed:[CLIENT]VHBA dev %d chan invalid.",
-						     devNo);
+						       devNo);
 						POSTCODE_LINUX_4
 						    (DEVICE_CREATE_FAILURE_PC,
 						     devNo, busNo,
@@ -477,7 +477,7 @@ create_device(struct controlvm_message *msg, char *buf)
 					if (!SPAR_VNIC_CHANNEL_OK_CLIENT
 					    (dev->chanptr)) {
 						LOGERR("CONTROLVM_DEVICE_CREATE Failed: VNIC[CLIENT] dev %d chan invalid.",
-						     devNo);
+						       devNo);
 						POSTCODE_LINUX_4
 						    (DEVICE_CREATE_FAILURE_PC,
 						     devNo, busNo,
@@ -560,14 +560,14 @@ pause_device(struct controlvm_message *msg)
 			/* make sure the device number is valid */
 			if (devNo >= bus->device_count) {
 				LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device(%d) >= deviceCount(%d).",
-				     devNo, bus->device_count);
+				       devNo, bus->device_count);
 				retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 			} else {
 				/* make sure this device exists */
 				dev = bus->device[devNo];
 				if (!dev) {
 					LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device %d does not exist.",
-					     devNo);
+					       devNo);
 					retval =
 					  CONTROLVM_RESP_ERROR_ALREADY_DONE;
 				}
@@ -577,7 +577,7 @@ pause_device(struct controlvm_message *msg)
 	}
 	if (!bus) {
 		LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: bus %d does not exist",
-		     busNo);
+		       busNo);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
 	read_unlock(&BusListLock);
@@ -586,7 +586,7 @@ pause_device(struct controlvm_message *msg)
 		 * guest_msgs struct to callback
 		 */
 		if (!uuid_le_cmp(dev->channel_uuid,
-				spar_vhba_channel_protocol_uuid)) {
+				 spar_vhba_channel_protocol_uuid)) {
 			cmd.msgtype = GUEST_PAUSE_VHBA;
 			cmd.pause_vhba.chanptr = dev->chanptr;
 		} else if (!uuid_le_cmp(dev->channel_uuid,
@@ -628,14 +628,14 @@ resume_device(struct controlvm_message *msg)
 			/* make sure the device number is valid */
 			if (devNo >= bus->device_count) {
 				LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device(%d) >= deviceCount(%d).",
-				     devNo, bus->device_count);
+				       devNo, bus->device_count);
 				retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 			} else {
 				/* make sure this device exists */
 				dev = bus->device[devNo];
 				if (!dev) {
 					LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device %d does not exist.",
-					     devNo);
+					       devNo);
 					retval =
 					  CONTROLVM_RESP_ERROR_ALREADY_DONE;
 				}
@@ -646,7 +646,7 @@ resume_device(struct controlvm_message *msg)
 
 	if (!bus) {
 		LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: bus %d does not exist",
-		     busNo);
+		       busNo);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
 	read_unlock(&BusListLock);
@@ -955,7 +955,7 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no,
 	msg.cmd.create_device.channel_addr = phys_chan_addr;
 	if (chan_bytes < MIN_IO_CHANNEL_SIZE) {
 		LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
-		     chan_bytes, (unsigned int)MIN_IO_CHANNEL_SIZE);
+		       chan_bytes, (unsigned int)MIN_IO_CHANNEL_SIZE);
 		POSTCODE_LINUX_4(VHBA_CREATE_FAILURE_PC, chan_bytes,
 				 MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR);
 		return 0;
@@ -1014,7 +1014,7 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no,
 	msg.cmd.create_device.channel_addr = phys_chan_addr;
 	if (chan_bytes < MIN_IO_CHANNEL_SIZE) {
 		LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
-		     chan_bytes, (unsigned int)MIN_IO_CHANNEL_SIZE);
+		       chan_bytes, (unsigned int)MIN_IO_CHANNEL_SIZE);
 		POSTCODE_LINUX_4(VNIC_CREATE_FAILURE_PC, chan_bytes,
 				 MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR);
 		return 0;
@@ -1181,7 +1181,7 @@ err_done:
 
 static ssize_t
 info_debugfs_read(struct file *file, char __user *buf,
-		size_t len, loff_t *offset)
+		  size_t len, loff_t *offset)
 {
 	char *temp;
 	int totalBytes = 0;
-- 
2.1.0

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

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

* [PATCH 09/69] staging: unisys: refactor create_bus()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (7 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 08/69] staging: unisys: fix alignment " Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 23:14   ` devendra.aaru
  2014-12-05 22:08 ` [PATCH 10/69] staging: unisys: fix strict checks in create_device() Benjamin Romer
                   ` (59 subsequent siblings)
  68 siblings, 1 reply; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix the missing braces and logical continuation problems in create_bus().

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index f25dd2f..1ddbe78 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -192,8 +192,10 @@ create_bus(struct controlvm_message *msg, char *buf)
 		bus->guest_handle = 0;
 		bus->bus_no = busNo;
 		bus->local_vnic = 1;
-	} else
-		bus->bus_no = bus->guest_handle = busNo;
+	} else {
+		bus->bus_no = busNo;
+		bus->guest_handle = busNo;
+	}
 	sprintf(bus->name, "%d", (int)bus->bus_no);
 	bus->device_count = deviceCount;
 	bus->device =
@@ -220,8 +222,8 @@ create_bus(struct controlvm_message *msg, char *buf)
 		kfree(bus);
 		return CONTROLVM_RESP_ERROR_ALREADY_DONE;
 	}
-	if ((msg->cmd.create_bus.channel_addr != 0)
-	    && (msg->cmd.create_bus.channel_bytes != 0)) {
+	if ((msg->cmd.create_bus.channel_addr != 0) &&
+	    (msg->cmd.create_bus.channel_bytes != 0)) {
 		bus->bus_channel_bytes = msg->cmd.create_bus.channel_bytes;
 		bus->bus_channel =
 		    init_vbus_channel(msg->cmd.create_bus.channel_addr,
@@ -256,9 +258,9 @@ create_bus(struct controlvm_message *msg, char *buf)
 
 	/* add bus at the head of our list */
 	write_lock(&BusListLock);
-	if (!BusListHead)
+	if (!BusListHead) {
 		BusListHead = bus;
-	else {
+	} else {
 		bus->next = BusListHead;
 		BusListHead = bus;
 	}
-- 
2.1.0

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

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

* [PATCH 10/69] staging: unisys: fix strict checks in create_device()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (8 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 09/69] staging: unisys: refactor create_bus() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 11/69] staging: unisys: remove extraneous blank lines in uislib.c Benjamin Romer
                   ` (58 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Use the variable name rather than the type, and add a set of missing brackets
to the if statement in create_device().

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 1ddbe78..8a48091 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -361,7 +361,7 @@ create_device(struct controlvm_message *msg, char *buf)
 	POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devNo, busNo,
 			 POSTCODE_SEVERITY_INFO);
 
-	dev = kzalloc(sizeof(struct device_info), GFP_ATOMIC);
+	dev = kzalloc(sizeof(*dev), GFP_ATOMIC);
 	if (!dev) {
 		LOGERR("CONTROLVM_DEVICE_CREATE Failed: kmalloc for dev failed.\n");
 		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
@@ -377,9 +377,9 @@ create_device(struct controlvm_message *msg, char *buf)
 	sema_init(&dev->interrupt_callback_lock, 1);	/* unlocked */
 	sprintf(dev->devid, "vbus%u:dev%u", (unsigned)busNo, (unsigned)devNo);
 	/* map the channel memory for the device. */
-	if (msg->hdr.flags.test_message)
+	if (msg->hdr.flags.test_message) {
 		dev->chanptr = (void __iomem *)__va(dev->channel_addr);
-	else {
+	} else {
 		pReqHandler = req_handler_find(dev->channel_uuid);
 		if (pReqHandler)
 			/* generic service handler registered for this
-- 
2.1.0

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

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

* [PATCH 11/69] staging: unisys: remove extraneous blank lines in uislib.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (9 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 10/69] staging: unisys: fix strict checks in create_device() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 12/69] staging: unisys: add missing brackets in info_debugfs_read() Benjamin Romer
                   ` (57 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Ken Depro

Fix the line spacing errors in uislib.c.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 8a48091..e255f1f 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -875,7 +875,6 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
 }
 EXPORT_SYMBOL_GPL(uislib_client_inject_add_bus);
 
-
 int
 uislib_client_inject_del_bus(u32 bus_no)
 {
@@ -920,7 +919,6 @@ uislib_client_inject_resume_vhba(u32 bus_no, u32 dev_no)
 		return rc;
 	}
 	return 0;
-
 }
 EXPORT_SYMBOL_GPL(uislib_client_inject_resume_vhba);
 
@@ -1073,7 +1071,6 @@ uislib_client_inject_resume_vnic(u32 bus_no, u32 dev_no)
 		return -1;
 	}
 	return 0;
-
 }
 EXPORT_SYMBOL_GPL(uislib_client_inject_resume_vnic);
 
@@ -1132,12 +1129,10 @@ info_debugfs_read_helper(char **buff, int *buff_len)
 
 	read_lock(&BusListLock);
 	for (bus = BusListHead; bus; bus = bus->next) {
-
 		if (PLINE("    bus=0x%p, busNo=%d, deviceCount=%d\n",
 			  bus, bus->bus_no, bus->device_count) < 0)
 			goto err_done_unlock;
 
-
 		if (PLINE("        Devices:\n") < 0)
 			goto err_done_unlock;
 
@@ -1322,7 +1317,6 @@ Process_Incoming(void *v)
 					} else
 						dev->last_on_list_cnt++;
 				}
-
 			}
 			if (Incoming_ThreadInfo.should_stop)
 				break;
@@ -1473,7 +1467,6 @@ EXPORT_SYMBOL_GPL(uislib_force_channel_interrupt);
 static int __init
 uislib_mod_init(void)
 {
-
 	if (!unisys_spar_platform)
 		return -ENODEV;
 
-- 
2.1.0

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

* [PATCH 12/69] staging: unisys: add missing brackets in info_debugfs_read()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (10 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 11/69] staging: unisys: remove extraneous blank lines in uislib.c Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 13/69] staging: unisys: add missing brackets in Process_Incoming() Benjamin Romer
                   ` (56 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Ken Depro

The if statement in info_debugfs_read() needs another set of brackets for the
else clause.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index e255f1f..0930919 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1202,8 +1202,9 @@ info_debugfs_read(struct file *file, char __user *buf,
 		/* if the read fails, then -1 will be returned */
 		totalBytes = info_debugfs_read_helper(&temp, &remaining_bytes);
 		ProcReadBufferValid = 1;
-	} else
+	} else {
 		totalBytes = strlen(ProcReadBuffer);
+	}
 
 	return simple_read_from_buffer(buf, len, offset,
 				       ProcReadBuffer, totalBytes);
-- 
2.1.0

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

* [PATCH 13/69] staging: unisys: add missing brackets in Process_Incoming()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (11 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 12/69] staging: unisys: add missing brackets in info_debugfs_read() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 14/69] staging: unisys: remove extra parens from uislib_enable_channel_interrupts() Benjamin Romer
                   ` (55 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix the brackets in the else clause in Process_Incoming().

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 0930919..4d15844 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1315,8 +1315,9 @@ Process_Incoming(void *v)
 					      &List_Polling_Device_Channels))) {
 						new_tail = lelt;
 						dev->moved_to_tail_cnt++;
-					} else
+					} else {
 						dev->last_on_list_cnt++;
+					}
 				}
 			}
 			if (Incoming_ThreadInfo.should_stop)
-- 
2.1.0

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

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

* [PATCH 14/69] staging: unisys: remove extra parens from uislib_enable_channel_interrupts()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (12 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 13/69] staging: unisys: add missing brackets in Process_Incoming() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 15/69] staging: unisys: get rid of doubled assignment in uislib_mod_init() Benjamin Romer
                   ` (54 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Get rid of the extra parenthesis in uislib_enable_channel_interrupts().

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 4d15844..d6151ee 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1403,7 +1403,7 @@ uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no,
 	dev->interrupt = interrupt;
 	dev->interrupt_context = interrupt_context;
 	dev->polling = TRUE;
-	list_add_tail(&(dev->list_polling_device_channels),
+	list_add_tail(&dev->list_polling_device_channels,
 		      &List_Polling_Device_Channels);
 	up(&Lock_Polling_Device_Channels);
 }
-- 
2.1.0

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

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

* [PATCH 15/69] staging: unisys: get rid of doubled assignment in uislib_mod_init()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (13 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 14/69] staging: unisys: remove extra parens from uislib_enable_channel_interrupts() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 16/69] staging: unisys: fix CamelCase global variable names in uislib.c Benjamin Romer
                   ` (53 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Split the doubled assignment in uislib_mod_init() into two separate assignments.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index d6151ee..0f33ac6 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1495,7 +1495,8 @@ uislib_mod_init(void)
 
 	/* initialize global pointers to NULL */
 	BusListHead = NULL;
-	BusListCount = MaxBusCount = 0;
+	BusListCount = 0;
+	MaxBusCount = 0;
 	rwlock_init(&BusListLock);
 	virt_control_chan_func = NULL;
 
-- 
2.1.0

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

* [PATCH 16/69] staging: unisys: fix CamelCase global variable names in uislib.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (14 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 15/69] staging: unisys: get rid of doubled assignment in uislib_mod_init() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 17/69] staging: unisys: refactor init_vbus_channel() Benjamin Romer
                   ` (52 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix CamelCase names:

ProcReadBufferValid => debug_buf_valid
ProcReadBuffer => debug_buf
BusListHead => bus_list
BusListLock => bus_list_lock
BusListCount => bus_list_count
MaxBusCount => max_bus_count
PhysicalDataChan => phys_data_chan
PlatformNumber => platform_no
Incoming_ThreadInfo => incoming_ti
Incoming_Thread_Started => incoming_started
List_Polling_Device_Channels => poll_dev_chan
Lock_Polling_Device_Channels => poll_dev_lock
Wakeup_Polling_Device_Channels => poll_dev_wake_q
Go_Polling_Device_Channels => poll_dev_start

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 210 ++++++++++++++++-----------------
 1 file changed, 105 insertions(+), 105 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 0f33ac6..ead0290 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -58,8 +58,8 @@
 /* global function pointers that act as callback functions into virtpcimod */
 int (*virt_control_chan_func)(struct guest_msgs *);
 
-static int ProcReadBufferValid;
-static char *ProcReadBuffer;	/* Note this MUST be global,
+static int debug_buf_valid;
+static char *debug_buf;	/* Note this MUST be global,
 					 * because the contents must */
 static unsigned int chipset_inited;
 
@@ -70,24 +70,24 @@ static unsigned int chipset_inited;
 		UIS_THREAD_WAIT;	\
 	} while (1)
 
-static struct bus_info *BusListHead;
-static rwlock_t BusListLock;
-static int BusListCount;	/* number of buses in the list */
-static int MaxBusCount;		/* maximum number of buses expected */
-static u64 PhysicalDataChan;
-static int PlatformNumber;
+static struct bus_info *bus_list;
+static rwlock_t bus_list_lock;
+static int bus_list_count;	/* number of buses in the list */
+static int max_bus_count;		/* maximum number of buses expected */
+static u64 phys_data_chan;
+static int platform_no;
 
-static struct uisthread_info Incoming_ThreadInfo;
-static BOOL Incoming_Thread_Started = FALSE;
-static LIST_HEAD(List_Polling_Device_Channels);
+static struct uisthread_info incoming_ti;
+static BOOL incoming_started = FALSE;
+static LIST_HEAD(poll_dev_chan);
 static unsigned long long tot_moved_to_tail_cnt;
 static unsigned long long tot_wait_cnt;
 static unsigned long long tot_wakeup_cnt;
 static unsigned long long tot_schedule_cnt;
 static int en_smart_wakeup = 1;
-static DEFINE_SEMAPHORE(Lock_Polling_Device_Channels);	/* unlocked */
-static DECLARE_WAIT_QUEUE_HEAD(Wakeup_Polling_Device_Channels);
-static int Go_Polling_Device_Channels;
+static DEFINE_SEMAPHORE(poll_dev_lock);	/* unlocked */
+static DECLARE_WAIT_QUEUE_HEAD(poll_dev_wake_q);
+static int poll_dev_start;
 
 #define CALLHOME_PROC_ENTRY_FN "callhome"
 #define CALLHOME_THROTTLED_PROC_ENTRY_FN "callhome_throttled"
@@ -159,10 +159,10 @@ create_bus(struct controlvm_message *msg, char *buf)
 	struct bus_info *tmp, *bus;
 	size_t size;
 
-	if (MaxBusCount == BusListCount) {
+	if (max_bus_count == bus_list_count) {
 		LOGERR("CONTROLVM_BUS_CREATE Failed: max buses:%d already created\n",
-		       MaxBusCount);
-		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, MaxBusCount,
+		       max_bus_count);
+		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, max_bus_count,
 				 POSTCODE_SEVERITY_ERR);
 		return CONTROLVM_RESP_ERROR_MAX_BUSES;
 	}
@@ -205,12 +205,12 @@ create_bus(struct controlvm_message *msg, char *buf)
 	bus->bus_channel = NULL;
 
 	/* add bus to our bus list - but check for duplicates first */
-	read_lock(&BusListLock);
-	for (tmp = BusListHead; tmp; tmp = tmp->next) {
+	read_lock(&bus_list_lock);
+	for (tmp = bus_list; tmp; tmp = tmp->next) {
 		if (tmp->bus_no == bus->bus_no)
 			break;
 	}
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 	if (tmp) {
 		/* found a bus already in the list with same busNo -
 		 * reject add
@@ -257,15 +257,15 @@ create_bus(struct controlvm_message *msg, char *buf)
 	}
 
 	/* add bus at the head of our list */
-	write_lock(&BusListLock);
-	if (!BusListHead) {
-		BusListHead = bus;
+	write_lock(&bus_list_lock);
+	if (!bus_list) {
+		bus_list = bus;
 	} else {
-		bus->next = BusListHead;
-		BusListHead = bus;
+		bus->next = bus_list;
+		bus_list = bus;
 	}
-	BusListCount++;
-	write_unlock(&BusListLock);
+	bus_list_count++;
+	write_unlock(&bus_list_lock);
 
 	POSTCODE_LINUX_3(BUS_CREATE_EXIT_PC, bus->bus_no,
 			 POSTCODE_SEVERITY_INFO);
@@ -282,9 +282,9 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 
 	busNo = msg->cmd.destroy_bus.bus_no;
 
-	read_lock(&BusListLock);
+	read_lock(&bus_list_lock);
 
-	bus = BusListHead;
+	bus = bus_list;
 	while (bus) {
 		if (bus->bus_no == busNo)
 			break;
@@ -295,7 +295,7 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 	if (!bus) {
 		LOGERR("CONTROLVM_BUS_DESTROY Failed: failed to find bus %d.\n",
 		       busNo);
-		read_unlock(&BusListLock);
+		read_unlock(&bus_list_lock);
 		return CONTROLVM_RESP_ERROR_ALREADY_DONE;
 	}
 
@@ -304,11 +304,11 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 		if (bus->device[i] != NULL) {
 			LOGERR("CONTROLVM_BUS_DESTROY Failed: device %i attached to bus %d.",
 			       i, busNo);
-			read_unlock(&BusListLock);
+			read_unlock(&bus_list_lock);
 			return CONTROLVM_RESP_ERROR_BUS_DEVICE_ATTACHED;
 		}
 	}
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 
 	if (msg->hdr.flags.server)
 		goto remove;
@@ -328,13 +328,13 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 
 	/* finally, remove the bus from the list */
 remove:
-	write_lock(&BusListLock);
+	write_lock(&bus_list_lock);
 	if (prev)	/* not at head */
 		prev->next = bus->next;
 	else
-		BusListHead = bus->next;
-	BusListCount--;
-	write_unlock(&BusListLock);
+		bus_list = bus->next;
+	bus_list_count--;
+	write_unlock(&bus_list_lock);
 
 	if (bus->bus_channel) {
 		uislib_iounmap(bus->bus_channel);
@@ -411,8 +411,8 @@ create_device(struct controlvm_message *msg, char *buf)
 	dev->instance_uuid = msg->cmd.create_device.dev_inst_uuid;
 	dev->channel_bytes = msg->cmd.create_device.channel_bytes;
 
-	read_lock(&BusListLock);
-	for (bus = BusListHead; bus; bus = bus->next) {
+	read_lock(&bus_list_lock);
+	for (bus = bus_list; bus; bus = bus->next) {
 		if (bus->bus_no == busNo) {
 			/* make sure the device number is valid */
 			if (devNo >= bus->device_count) {
@@ -422,7 +422,7 @@ create_device(struct controlvm_message *msg, char *buf)
 				POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
 						 devNo, busNo,
 						 POSTCODE_SEVERITY_ERR);
-				read_unlock(&BusListLock);
+				read_unlock(&bus_list_lock);
 				goto Away;
 			}
 			/* make sure this device is not already set */
@@ -433,10 +433,10 @@ create_device(struct controlvm_message *msg, char *buf)
 						 devNo, busNo,
 						 POSTCODE_SEVERITY_ERR);
 				result = CONTROLVM_RESP_ERROR_ALREADY_DONE;
-				read_unlock(&BusListLock);
+				read_unlock(&bus_list_lock);
 				goto Away;
 			}
-			read_unlock(&BusListLock);
+			read_unlock(&bus_list_lock);
 			/* the msg is bound for virtpci; send
 			 * guest_msgs struct to callback
 			 */
@@ -527,7 +527,7 @@ create_device(struct controlvm_message *msg, char *buf)
 			return CONTROLVM_RESP_SUCCESS;
 		}
 	}
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 
 	LOGERR("CONTROLVM_DEVICE_CREATE Failed: failed to find bus %d.", busNo);
 	POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
@@ -556,8 +556,8 @@ pause_device(struct controlvm_message *msg)
 	busNo = msg->cmd.device_change_state.bus_no;
 	devNo = msg->cmd.device_change_state.dev_no;
 
-	read_lock(&BusListLock);
-	for (bus = BusListHead; bus; bus = bus->next) {
+	read_lock(&bus_list_lock);
+	for (bus = bus_list; bus; bus = bus->next) {
 		if (bus->bus_no == busNo) {
 			/* make sure the device number is valid */
 			if (devNo >= bus->device_count) {
@@ -582,7 +582,7 @@ pause_device(struct controlvm_message *msg)
 		       busNo);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 	if (retval == CONTROLVM_RESP_SUCCESS) {
 		/* the msg is bound for virtpci; send
 		 * guest_msgs struct to callback
@@ -624,8 +624,8 @@ resume_device(struct controlvm_message *msg)
 	busNo = msg->cmd.device_change_state.bus_no;
 	devNo = msg->cmd.device_change_state.dev_no;
 
-	read_lock(&BusListLock);
-	for (bus = BusListHead; bus; bus = bus->next) {
+	read_lock(&bus_list_lock);
+	for (bus = bus_list; bus; bus = bus->next) {
 		if (bus->bus_no == busNo) {
 			/* make sure the device number is valid */
 			if (devNo >= bus->device_count) {
@@ -651,7 +651,7 @@ resume_device(struct controlvm_message *msg)
 		       busNo);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 	/* the msg is bound for virtpci; send
 	 * guest_msgs struct to callback
 	 */
@@ -693,9 +693,9 @@ destroy_device(struct controlvm_message *msg, char *buf)
 	busNo = msg->cmd.destroy_device.bus_no;
 	devNo = msg->cmd.destroy_device.bus_no;
 
-	read_lock(&BusListLock);
+	read_lock(&bus_list_lock);
 	LOGINF("destroy_device called for busNo=%u, devNo=%u", busNo, devNo);
-	for (bus = BusListHead; bus; bus = bus->next) {
+	for (bus = bus_list; bus; bus = bus->next) {
 		if (bus->bus_no == busNo) {
 			/* make sure the device number is valid */
 			if (devNo >= bus->device_count) {
@@ -721,7 +721,7 @@ destroy_device(struct controlvm_message *msg, char *buf)
 		       busNo);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 	if (retval == CONTROLVM_RESP_SUCCESS) {
 		/* the msg is bound for virtpci; send
 		 * guest_msgs struct to callback
@@ -774,9 +774,9 @@ init_chipset(struct controlvm_message *msg, char *buf)
 {
 	POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 
-	MaxBusCount = msg->cmd.init_chipset.bus_count;
-	PlatformNumber = msg->cmd.init_chipset.platform_number;
-	PhysicalDataChan = 0;
+	max_bus_count = msg->cmd.init_chipset.bus_count;
+	platform_no = msg->cmd.init_chipset.platform_number;
+	phys_data_chan = 0;
 
 	/* We need to make sure we have our functions registered
 	* before processing messages.  If we are a test vehicle the
@@ -1127,8 +1127,8 @@ info_debugfs_read_helper(char **buff, int *buff_len)
 	if (PLINE("\nBuses:\n") < 0)
 		goto err_done;
 
-	read_lock(&BusListLock);
-	for (bus = BusListHead; bus; bus = bus->next) {
+	read_lock(&bus_list_lock);
+	for (bus = bus_list; bus; bus = bus->next) {
 		if (PLINE("    bus=0x%p, busNo=%d, deviceCount=%d\n",
 			  bus, bus->bus_no, bus->device_count) < 0)
 			goto err_done_unlock;
@@ -1152,7 +1152,7 @@ info_debugfs_read_helper(char **buff, int *buff_len)
 			}
 		}
 	}
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 
 	if (PLINE("UisUtils_Registered_Services: %d\n",
 		  atomic_read(&uisutils_registered_services)) < 0)
@@ -1171,7 +1171,7 @@ info_debugfs_read_helper(char **buff, int *buff_len)
 	return tot;
 
 err_done_unlock:
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 err_done:
 	return -1;
 }
@@ -1185,29 +1185,29 @@ info_debugfs_read(struct file *file, char __user *buf,
 	int remaining_bytes = PROC_READ_BUFFER_SIZE;
 
 /* *start = buf; */
-	if (ProcReadBuffer == NULL) {
-		DBGINF("ProcReadBuffer == NULL; allocating buffer.\n.");
-		ProcReadBuffer = vmalloc(PROC_READ_BUFFER_SIZE);
+	if (debug_buf == NULL) {
+		DBGINF("debug_buf == NULL; allocating buffer.\n.");
+		debug_buf = vmalloc(PROC_READ_BUFFER_SIZE);
 
-		if (ProcReadBuffer == NULL) {
+		if (debug_buf == NULL) {
 			LOGERR("failed to allocate buffer to provide proc data.\n");
 			return -ENOMEM;
 		}
 	}
 
-	temp = ProcReadBuffer;
+	temp = debug_buf;
 
-	if ((*offset == 0) || (!ProcReadBufferValid)) {
+	if ((*offset == 0) || (!debug_buf_valid)) {
 		DBGINF("calling info_debugfs_read_helper.\n");
 		/* if the read fails, then -1 will be returned */
 		totalBytes = info_debugfs_read_helper(&temp, &remaining_bytes);
-		ProcReadBufferValid = 1;
+		debug_buf_valid = 1;
 	} else {
-		totalBytes = strlen(ProcReadBuffer);
+		totalBytes = strlen(debug_buf);
 	}
 
 	return simple_read_from_buffer(buf, len, offset,
-				       ProcReadBuffer, totalBytes);
+				       debug_buf, totalBytes);
 }
 
 static struct device_info *
@@ -1216,8 +1216,8 @@ find_dev(u32 busNo, u32 devNo)
 	struct bus_info *bus;
 	struct device_info *dev = NULL;
 
-	read_lock(&BusListLock);
-	for (bus = BusListHead; bus; bus = bus->next) {
+	read_lock(&bus_list_lock);
+	for (bus = bus_list; bus; bus = bus->next) {
 		if (bus->bus_no == busNo) {
 			/* make sure the device number is valid */
 			if (devNo >= bus->device_count) {
@@ -1235,7 +1235,7 @@ find_dev(u32 busNo, u32 devNo)
 		}
 	}
 Away:
-	read_unlock(&BusListLock);
+	read_unlock(&bus_list_lock);
 	return dev;
 }
 
@@ -1269,7 +1269,7 @@ Process_Incoming(void *v)
 	UIS_DAEMONIZE("dev_incoming");
 	for (i = 0; i < 16; i++) {
 		old_cycles = get_cycles();
-		wait_event_timeout(Wakeup_Polling_Device_Channels,
+		wait_event_timeout(poll_dev_wake_q,
 				   0, POLLJIFFIES_NORMAL);
 		cur_cycles = get_cycles();
 		if (wait_cycles == 0) {
@@ -1282,15 +1282,15 @@ Process_Incoming(void *v)
 	LOGINF("wait_cycles=%llu", wait_cycles);
 	cycles_before_wait = wait_cycles;
 	idle_cycles = 0;
-	Go_Polling_Device_Channels = 0;
+	poll_dev_start = 0;
 	while (1) {
 		struct list_head *lelt, *tmp;
 		struct device_info *dev = NULL;
 
 		/* poll each channel for input */
-		down(&Lock_Polling_Device_Channels);
+		down(&poll_dev_lock);
 		new_tail = NULL;
-		list_for_each_safe(lelt, tmp, &List_Polling_Device_Channels) {
+		list_for_each_safe(lelt, tmp, &poll_dev_chan) {
 			int rc = 0;
 
 			dev = list_entry(lelt, struct device_info,
@@ -1312,7 +1312,7 @@ Process_Incoming(void *v)
 					if (!
 					    (list_is_last
 					     (lelt,
-					      &List_Polling_Device_Channels))) {
+					      &poll_dev_chan))) {
 						new_tail = lelt;
 						dev->moved_to_tail_cnt++;
 					} else {
@@ -1320,14 +1320,14 @@ Process_Incoming(void *v)
 					}
 				}
 			}
-			if (Incoming_ThreadInfo.should_stop)
+			if (incoming_ti.should_stop)
 				break;
 		}
 		if (new_tail != NULL) {
 			tot_moved_to_tail_cnt++;
-			list_move_tail(new_tail, &List_Polling_Device_Channels);
+			list_move_tail(new_tail, &poll_dev_chan);
 		}
-		up(&Lock_Polling_Device_Channels);
+		up(&poll_dev_lock);
 		cur_cycles = get_cycles();
 		delta_cycles = cur_cycles - old_cycles;
 		old_cycles = cur_cycles;
@@ -1337,24 +1337,24 @@ Process_Incoming(void *v)
 		* - there is no input waiting on any of the channels
 		* - we have received a signal to stop this thread
 		*/
-		if (Incoming_ThreadInfo.should_stop)
+		if (incoming_ti.should_stop)
 			break;
 		if (en_smart_wakeup == 0xFF) {
 			LOGINF("en_smart_wakeup set to 0xff, to force exiting process_incoming");
 			break;
 		}
 		/* wait for POLLJIFFIES_NORMAL jiffies, or until
-		* someone wakes up Wakeup_Polling_Device_Channels,
+		* someone wakes up poll_dev_wake_q,
 		* whichever comes first only do a wait when we have
 		* been idle for cycles_before_wait cycles.
 		*/
 		if (idle_cycles > cycles_before_wait) {
-			Go_Polling_Device_Channels = 0;
+			poll_dev_start = 0;
 			tot_wait_cnt++;
-			wait_event_timeout(Wakeup_Polling_Device_Channels,
-					   Go_Polling_Device_Channels,
+			wait_event_timeout(poll_dev_wake_q,
+					   poll_dev_start,
 					   POLLJIFFIES_NORMAL);
-			Go_Polling_Device_Channels = 1;
+			poll_dev_start = 1;
 		} else {
 			tot_schedule_cnt++;
 			schedule();
@@ -1362,20 +1362,20 @@ Process_Incoming(void *v)
 		}
 	}
 	DBGINF("exiting.\n");
-	complete_and_exit(&Incoming_ThreadInfo.has_stopped, 0);
+	complete_and_exit(&incoming_ti.has_stopped, 0);
 }
 
 static BOOL
 Initialize_incoming_thread(void)
 {
-	if (Incoming_Thread_Started)
+	if (incoming_started)
 		return TRUE;
-	if (!uisthread_start(&Incoming_ThreadInfo,
+	if (!uisthread_start(&incoming_ti,
 			     &Process_Incoming, NULL, "dev_incoming")) {
 		LOGERR("uisthread_start Initialize_incoming_thread ****FAILED");
 		return FALSE;
 	}
-	Incoming_Thread_Started = TRUE;
+	incoming_started = TRUE;
 	return TRUE;
 }
 
@@ -1398,14 +1398,14 @@ uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no,
 		       (int)(dev_no));
 		return;
 	}
-	down(&Lock_Polling_Device_Channels);
+	down(&poll_dev_lock);
 	Initialize_incoming_thread();
 	dev->interrupt = interrupt;
 	dev->interrupt_context = interrupt_context;
 	dev->polling = TRUE;
 	list_add_tail(&dev->list_polling_device_channels,
-		      &List_Polling_Device_Channels);
-	up(&Lock_Polling_Device_Channels);
+		      &poll_dev_chan);
+	up(&poll_dev_lock);
 }
 EXPORT_SYMBOL_GPL(uislib_enable_channel_interrupts);
 
@@ -1423,20 +1423,20 @@ uislib_disable_channel_interrupts(u32 bus_no, u32 dev_no)
 		       (int)(dev_no));
 		return;
 	}
-	down(&Lock_Polling_Device_Channels);
+	down(&poll_dev_lock);
 	list_del(&dev->list_polling_device_channels);
 	dev->polling = FALSE;
 	dev->interrupt = NULL;
-	up(&Lock_Polling_Device_Channels);
+	up(&poll_dev_lock);
 }
 EXPORT_SYMBOL_GPL(uislib_disable_channel_interrupts);
 
 static void
 do_wakeup_polling_device_channels(struct work_struct *dummy)
 {
-	if (!Go_Polling_Device_Channels) {
-		Go_Polling_Device_Channels = 1;
-		wake_up(&Wakeup_Polling_Device_Channels);
+	if (!poll_dev_start) {
+		poll_dev_start = 1;
+		wake_up(&poll_dev_wake_q);
 	}
 }
 
@@ -1451,7 +1451,7 @@ uislib_force_channel_interrupt(u32 bus_no, u32 dev_no)
 {
 	if (en_smart_wakeup == 0)
 		return;
-	if (Go_Polling_Device_Channels)
+	if (poll_dev_start)
 		return;
 	/* The point of using schedule_work() instead of just doing
 	 * the work inline is to force a slight delay before waking up
@@ -1494,10 +1494,10 @@ uislib_mod_init(void)
 	LOGINF("SIZEOF_PROTOCOL:%lu bytes\n", SIZEOF_PROTOCOL);
 
 	/* initialize global pointers to NULL */
-	BusListHead = NULL;
-	BusListCount = 0;
-	MaxBusCount = 0;
-	rwlock_init(&BusListLock);
+	bus_list = NULL;
+	bus_list_count = 0;
+	max_bus_count = 0;
+	rwlock_init(&bus_list_lock);
 	virt_control_chan_func = NULL;
 
 	/* Issue VMCALL_GET_CONTROLVM_ADDR to get CtrlChanPhysAddr and
@@ -1512,7 +1512,7 @@ uislib_mod_init(void)
 
 		platformnumber_debugfs_read = debugfs_create_u32(
 			PLATFORMNUMBER_DEBUGFS_ENTRY_FN, 0444, dir_debugfs,
-			&PlatformNumber);
+			&platform_no);
 
 		cycles_before_wait_debugfs_read = debugfs_create_u64(
 			CYCLES_BEFORE_WAIT_DEBUGFS_ENTRY_FN, 0666, dir_debugfs,
@@ -1530,9 +1530,9 @@ uislib_mod_init(void)
 static void __exit
 uislib_mod_exit(void)
 {
-	if (ProcReadBuffer) {
-		vfree(ProcReadBuffer);
-		ProcReadBuffer = NULL;
+	if (debug_buf) {
+		vfree(debug_buf);
+		debug_buf = NULL;
 	}
 
 	debugfs_remove(info_debugfs_entry);
-- 
2.1.0

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

* [PATCH 17/69] staging: unisys: refactor init_vbus_channel()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (15 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 16/69] staging: unisys: fix CamelCase global variable names in uislib.c Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 18/69] staging: unisys: fix CamelCase in create_bus() Benjamin Romer
                   ` (51 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Clean up the function definition so it's a single line. Remove the unnecessary
goto statements and just return directly. Remove the unneeded local variable
for the return result. Fix CamelCase parameters and local variable names:

channelAddr => ch_addr
channelBytes => ch_bytes
pChan => ch

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index ead0290..08416d2 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -128,28 +128,22 @@ init_msg_header(struct controlvm_message *msg, u32 id, uint rsp, uint svr)
 	msg->hdr.flags.server = svr;
 }
 
-static __iomem void *
-init_vbus_channel(u64 channelAddr, u32 channelBytes)
+static __iomem void *init_vbus_channel(u64 ch_addr, u32 ch_bytes)
 {
-	void __iomem *rc = NULL;
-	void __iomem *pChan = uislib_ioremap_cache(channelAddr, channelBytes);
+	void __iomem *ch = uislib_ioremap_cache(ch_addr, ch_bytes);
 
-	if (!pChan) {
+	if (!ch) {
 		LOGERR("CONTROLVM_BUS_CREATE error: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
-		       (unsigned long long)channelAddr,
-		       (unsigned long long)channelBytes);
-		rc = NULL;
-		goto Away;
+		       (unsigned long long)ch_addr,
+		       (unsigned long long)ch_bytes);
+		return NULL;
 	}
-	if (!SPAR_VBUS_CHANNEL_OK_CLIENT(pChan)) {
+	if (!SPAR_VBUS_CHANNEL_OK_CLIENT(ch)) {
 		ERRDRV("%s channel cannot be used", __func__);
-		uislib_iounmap(pChan);
-		rc = NULL;
-		goto Away;
+		uislib_iounmap(ch);
+		return NULL;
 	}
-	rc = pChan;
-Away:
-	return rc;
+	return ch;
 }
 
 static int
-- 
2.1.0

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

* [PATCH 18/69] staging: unisys: fix CamelCase in create_bus()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (16 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 17/69] staging: unisys: refactor init_vbus_channel() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 19/69] staging: unisys: fix CamelCase in destroy_bus() Benjamin Romer
                   ` (50 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix CamelCase local variable names:

busNo => bus_no
deviceCount => dev_count

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 08416d2..9c995c5 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -149,7 +149,7 @@ static __iomem void *init_vbus_channel(u64 ch_addr, u32 ch_bytes)
 static int
 create_bus(struct controlvm_message *msg, char *buf)
 {
-	u32 busNo, deviceCount;
+	u32 bus_no, dev_count;
 	struct bus_info *tmp, *bus;
 	size_t size;
 
@@ -161,19 +161,19 @@ create_bus(struct controlvm_message *msg, char *buf)
 		return CONTROLVM_RESP_ERROR_MAX_BUSES;
 	}
 
-	busNo = msg->cmd.create_bus.bus_no;
-	deviceCount = msg->cmd.create_bus.dev_count;
+	bus_no = msg->cmd.create_bus.bus_no;
+	dev_count = msg->cmd.create_bus.dev_count;
 
-	POSTCODE_LINUX_4(BUS_CREATE_ENTRY_PC, busNo, deviceCount,
+	POSTCODE_LINUX_4(BUS_CREATE_ENTRY_PC, bus_no, dev_count,
 			 POSTCODE_SEVERITY_INFO);
 
 	size =
 	    sizeof(struct bus_info) +
-	    (deviceCount * sizeof(struct device_info *));
+	    (dev_count * sizeof(struct device_info *));
 	bus = kzalloc(size, GFP_ATOMIC);
 	if (!bus) {
 		LOGERR("CONTROLVM_BUS_CREATE Failed: kmalloc for bus failed.\n");
-		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,
+		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus_no,
 				 POSTCODE_SEVERITY_ERR);
 		return CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
 	}
@@ -184,14 +184,14 @@ create_bus(struct controlvm_message *msg, char *buf)
 	if (msg->hdr.flags.test_message) {
 		/* This implies we're the IOVM so set guest handle to 0... */
 		bus->guest_handle = 0;
-		bus->bus_no = busNo;
+		bus->bus_no = bus_no;
 		bus->local_vnic = 1;
 	} else {
-		bus->bus_no = busNo;
-		bus->guest_handle = busNo;
+		bus->bus_no = bus_no;
+		bus->guest_handle = bus_no;
 	}
 	sprintf(bus->name, "%d", (int)bus->bus_no);
-	bus->device_count = deviceCount;
+	bus->device_count = dev_count;
 	bus->device =
 	    (struct device_info **)((char *)bus + sizeof(struct bus_info));
 	bus->bus_inst_uuid = msg->cmd.create_bus.bus_inst_uuid;
@@ -206,7 +206,7 @@ create_bus(struct controlvm_message *msg, char *buf)
 	}
 	read_unlock(&bus_list_lock);
 	if (tmp) {
-		/* found a bus already in the list with same busNo -
+		/* found a bus already in the list with same bus_no -
 		 * reject add
 		 */
 		LOGERR("CONTROLVM_BUS_CREATE Failed: bus %d already exists.\n",
@@ -228,9 +228,9 @@ create_bus(struct controlvm_message *msg, char *buf)
 		struct guest_msgs cmd;
 
 		cmd.msgtype = GUEST_ADD_VBUS;
-		cmd.add_vbus.bus_no = busNo;
+		cmd.add_vbus.bus_no = bus_no;
 		cmd.add_vbus.chanptr = bus->bus_channel;
-		cmd.add_vbus.dev_count = deviceCount;
+		cmd.add_vbus.dev_count = dev_count;
 		cmd.add_vbus.bus_uuid = msg->cmd.create_bus.bus_data_type_uuid;
 		cmd.add_vbus.instance_uuid = msg->cmd.create_bus.bus_inst_uuid;
 		if (!virt_control_chan_func) {
-- 
2.1.0

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

* [PATCH 19/69] staging: unisys: fix CamelCase in destroy_bus()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (17 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 18/69] staging: unisys: fix CamelCase in create_bus() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 20/69] staging: unisys: refactor create_device() Benjamin Romer
                   ` (49 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix the CamelCase local variable:

busNo => bus_no

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 9c995c5..ab72e81 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -272,15 +272,15 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 	int i;
 	struct bus_info *bus, *prev = NULL;
 	struct guest_msgs cmd;
-	u32 busNo;
+	u32 bus_no;
 
-	busNo = msg->cmd.destroy_bus.bus_no;
+	bus_no = msg->cmd.destroy_bus.bus_no;
 
 	read_lock(&bus_list_lock);
 
 	bus = bus_list;
 	while (bus) {
-		if (bus->bus_no == busNo)
+		if (bus->bus_no == bus_no)
 			break;
 		prev = bus;
 		bus = bus->next;
@@ -288,7 +288,7 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 
 	if (!bus) {
 		LOGERR("CONTROLVM_BUS_DESTROY Failed: failed to find bus %d.\n",
-		       busNo);
+		       bus_no);
 		read_unlock(&bus_list_lock);
 		return CONTROLVM_RESP_ERROR_ALREADY_DONE;
 	}
@@ -297,7 +297,7 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 	for (i = 0; i < bus->device_count; i++) {
 		if (bus->device[i] != NULL) {
 			LOGERR("CONTROLVM_BUS_DESTROY Failed: device %i attached to bus %d.",
-			       i, busNo);
+			       i, bus_no);
 			read_unlock(&bus_list_lock);
 			return CONTROLVM_RESP_ERROR_BUS_DEVICE_ATTACHED;
 		}
@@ -310,7 +310,7 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 	/* client messages require us to call the virtpci callback associated
 	   with this bus. */
 	cmd.msgtype = GUEST_DEL_VBUS;
-	cmd.del_vbus.bus_no = busNo;
+	cmd.del_vbus.bus_no = bus_no;
 	if (!virt_control_chan_func) {
 		LOGERR("CONTROLVM_BUS_DESTROY Failed: virtpci callback not registered.");
 		return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
-- 
2.1.0

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

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

* [PATCH 20/69] staging: unisys: refactor create_device()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (18 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 19/69] staging: unisys: fix CamelCase in destroy_bus() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 21/69] staging: unisys: refactor pause_device() Benjamin Romer
                   ` (48 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

OK, lets clean up this messy function. The entire thing is reflowed so spacing
and indentation is correct. Tests that created extra indentation were swapped
for equivalent negative tests that did not create extra indentation. Use of
cmp_uuid_le() were fixed to test specifically for the zero case, and not to
lazily use !cmp_uuid_le(). CamelCase local variable names were fixed:

busNo => bus_no
devNo => dev_no
minSize => min_size
pReqHandler => req_handler
Away => cleanup

Finally, the struct guest_msgs cmd declaration was moved to the beginning of
the function, and cringing and wincing at the function was significantly
reduced.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 250 ++++++++++++++++-----------------
 1 file changed, 119 insertions(+), 131 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index ab72e81..09a4680 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -339,26 +339,26 @@ remove:
 	return CONTROLVM_RESP_SUCCESS;
 }
 
-static int
-create_device(struct controlvm_message *msg, char *buf)
+static int create_device(struct controlvm_message *msg, char *buf)
 {
 	struct device_info *dev;
 	struct bus_info *bus;
-	u32 busNo, devNo;
+	struct guest_msgs cmd;
+	u32 bus_no, dev_no;
 	int result = CONTROLVM_RESP_SUCCESS;
-	u64 minSize = MIN_IO_CHANNEL_SIZE;
-	struct req_handler_info *pReqHandler;
+	u64 min_size = MIN_IO_CHANNEL_SIZE;
+	struct req_handler_info *req_handler;
 
-	busNo = msg->cmd.create_device.bus_no;
-	devNo = msg->cmd.create_device.dev_no;
+	bus_no = msg->cmd.create_device.bus_no;
+	dev_no = msg->cmd.create_device.dev_no;
 
-	POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devNo, busNo,
+	POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
 			 POSTCODE_SEVERITY_INFO);
 
 	dev = kzalloc(sizeof(*dev), GFP_ATOMIC);
 	if (!dev) {
 		LOGERR("CONTROLVM_DEVICE_CREATE Failed: kmalloc for dev failed.\n");
-		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
+		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
 				 POSTCODE_SEVERITY_ERR);
 		return CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
 	}
@@ -366,28 +366,28 @@ create_device(struct controlvm_message *msg, char *buf)
 	dev->channel_uuid = msg->cmd.create_device.data_type_uuid;
 	dev->intr = msg->cmd.create_device.intr;
 	dev->channel_addr = msg->cmd.create_device.channel_addr;
-	dev->bus_no = busNo;
-	dev->dev_no = devNo;
+	dev->bus_no = bus_no;
+	dev->dev_no = dev_no;
 	sema_init(&dev->interrupt_callback_lock, 1);	/* unlocked */
-	sprintf(dev->devid, "vbus%u:dev%u", (unsigned)busNo, (unsigned)devNo);
+	sprintf(dev->devid, "vbus%u:dev%u", (unsigned)bus_no, (unsigned)dev_no);
 	/* map the channel memory for the device. */
 	if (msg->hdr.flags.test_message) {
 		dev->chanptr = (void __iomem *)__va(dev->channel_addr);
 	} else {
-		pReqHandler = req_handler_find(dev->channel_uuid);
-		if (pReqHandler)
+		req_handler = req_handler_find(dev->channel_uuid);
+		if (req_handler)
 			/* generic service handler registered for this
 			 * channel
 			 */
-			minSize = pReqHandler->min_channel_bytes;
-		if (minSize > msg->cmd.create_device.channel_bytes) {
+			min_size = req_handler->min_channel_bytes;
+		if (min_size > msg->cmd.create_device.channel_bytes) {
 			LOGERR("CONTROLVM_DEVICE_CREATE Failed: channel size is too small, channel size:0x%lx, required size:0x%lx",
-			       (ulong) msg->cmd.create_device.channel_bytes,
-			       (ulong) minSize);
-			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
-					 POSTCODE_SEVERITY_ERR);
+			       (ulong)msg->cmd.create_device.channel_bytes,
+			       (ulong)min_size);
+			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
+					 bus_no, POSTCODE_SEVERITY_ERR);
 			result = CONTROLVM_RESP_ERROR_CHANNEL_SIZE_TOO_SMALL;
-			goto Away;
+			goto cleanup;
 		}
 		dev->chanptr =
 		    uislib_ioremap_cache(dev->channel_addr,
@@ -397,9 +397,9 @@ create_device(struct controlvm_message *msg, char *buf)
 			       dev->channel_addr,
 			       msg->cmd.create_device.channel_bytes);
 			result = CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
-			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
-					 POSTCODE_SEVERITY_ERR);
-			goto Away;
+			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
+					 bus_no, POSTCODE_SEVERITY_ERR);
+			goto cleanup;
 		}
 	}
 	dev->instance_uuid = msg->cmd.create_device.dev_inst_uuid;
@@ -407,128 +407,116 @@ create_device(struct controlvm_message *msg, char *buf)
 
 	read_lock(&bus_list_lock);
 	for (bus = bus_list; bus; bus = bus->next) {
-		if (bus->bus_no == busNo) {
-			/* make sure the device number is valid */
-			if (devNo >= bus->device_count) {
-				LOGERR("CONTROLVM_DEVICE_CREATE Failed: device (%d) >= deviceCount (%d).",
-				       devNo, bus->device_count);
-				result = CONTROLVM_RESP_ERROR_MAX_DEVICES;
+		if (bus->bus_no != bus_no)
+			continue;
+		/* make sure the device number is valid */
+		if (dev_no >= bus->device_count) {
+			LOGERR("CONTROLVM_DEVICE_CREATE Failed: device (%d) >= deviceCount (%d).",
+			       dev_no, bus->device_count);
+			result = CONTROLVM_RESP_ERROR_MAX_DEVICES;
+			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
+					 bus_no, POSTCODE_SEVERITY_ERR);
+			read_unlock(&bus_list_lock);
+			goto cleanup;
+		}
+		/* make sure this device is not already set */
+		if (bus->device[dev_no]) {
+			LOGERR("CONTROLVM_DEVICE_CREATE Failed: device %d is already exists.",
+			       dev_no);
+			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
+					 dev_no, bus_no,
+					 POSTCODE_SEVERITY_ERR);
+			result = CONTROLVM_RESP_ERROR_ALREADY_DONE;
+			read_unlock(&bus_list_lock);
+			goto cleanup;
+		}
+		read_unlock(&bus_list_lock);
+		/* the msg is bound for virtpci; send
+		 * guest_msgs struct to callback
+		 */
+		if (msg->hdr.flags.server) {
+			bus->device[dev_no] = dev;
+			POSTCODE_LINUX_4(DEVICE_CREATE_SUCCESS_PC, dev_no,
+					 bus_no, POSTCODE_SEVERITY_INFO);
+			return CONTROLVM_RESP_SUCCESS;
+		}
+		if (uuid_le_cmp(dev->channel_uuid,
+				spar_vhba_channel_protocol_uuid) == 0) {
+			wait_for_valid_guid(&((struct channel_header __iomem *)
+					    (dev->chanptr))->chtype);
+			if (!SPAR_VHBA_CHANNEL_OK_CLIENT(dev->chanptr)) {
+				LOGERR("CONTROLVM_DEVICE_CREATE Failed:[CLIENT]VHBA dev %d chan invalid.",
+				       dev_no);
 				POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
-						 devNo, busNo,
+						 dev_no, bus_no,
 						 POSTCODE_SEVERITY_ERR);
-				read_unlock(&bus_list_lock);
-				goto Away;
+				result = CONTROLVM_RESP_ERROR_CHANNEL_INVALID;
+				goto cleanup;
 			}
-			/* make sure this device is not already set */
-			if (bus->device[devNo]) {
-				LOGERR("CONTROLVM_DEVICE_CREATE Failed: device %d is already exists.",
-				       devNo);
+			cmd.msgtype = GUEST_ADD_VHBA;
+			cmd.add_vhba.chanptr = dev->chanptr;
+			cmd.add_vhba.bus_no = bus_no;
+			cmd.add_vhba.device_no = dev_no;
+			cmd.add_vhba.instance_uuid = dev->instance_uuid;
+			cmd.add_vhba.intr = dev->intr;
+		} else if (uuid_le_cmp(dev->channel_uuid,
+				       spar_vnic_channel_protocol_uuid) == 0) {
+			wait_for_valid_guid(&((struct channel_header __iomem *)
+					    (dev->chanptr))->chtype);
+			if (!SPAR_VNIC_CHANNEL_OK_CLIENT(dev->chanptr)) {
+				LOGERR("CONTROLVM_DEVICE_CREATE Failed: VNIC[CLIENT] dev %d chan invalid.",
+				       dev_no);
 				POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
-						 devNo, busNo,
+						 dev_no, bus_no,
 						 POSTCODE_SEVERITY_ERR);
-				result = CONTROLVM_RESP_ERROR_ALREADY_DONE;
-				read_unlock(&bus_list_lock);
-				goto Away;
+				result = CONTROLVM_RESP_ERROR_CHANNEL_INVALID;
+				goto cleanup;
 			}
-			read_unlock(&bus_list_lock);
-			/* the msg is bound for virtpci; send
-			 * guest_msgs struct to callback
-			 */
-			if (!msg->hdr.flags.server) {
-				struct guest_msgs cmd;
-
-				if (!uuid_le_cmp(dev->channel_uuid,
-				    spar_vhba_channel_protocol_uuid)) {
-					wait_for_valid_guid(&((
-						struct channel_header
-							__iomem *) (dev->
-								  chanptr))->
-							    chtype);
-					if (!SPAR_VHBA_CHANNEL_OK_CLIENT
-					    (dev->chanptr)) {
-						LOGERR("CONTROLVM_DEVICE_CREATE Failed:[CLIENT]VHBA dev %d chan invalid.",
-						       devNo);
-						POSTCODE_LINUX_4
-						    (DEVICE_CREATE_FAILURE_PC,
-						     devNo, busNo,
-						     POSTCODE_SEVERITY_ERR);
-						result = CONTROLVM_RESP_ERROR_CHANNEL_INVALID;
-						goto Away;
-					}
-					cmd.msgtype = GUEST_ADD_VHBA;
-					cmd.add_vhba.chanptr = dev->chanptr;
-					cmd.add_vhba.bus_no = busNo;
-					cmd.add_vhba.device_no = devNo;
-					cmd.add_vhba.instance_uuid =
-					    dev->instance_uuid;
-					cmd.add_vhba.intr = dev->intr;
-				} else
-				    if (!uuid_le_cmp(dev->channel_uuid,
-					 spar_vnic_channel_protocol_uuid)) {
-					wait_for_valid_guid(&((
-						struct channel_header
-							__iomem *) (dev->
-								  chanptr))->
-							    chtype);
-					if (!SPAR_VNIC_CHANNEL_OK_CLIENT
-					    (dev->chanptr)) {
-						LOGERR("CONTROLVM_DEVICE_CREATE Failed: VNIC[CLIENT] dev %d chan invalid.",
-						       devNo);
-						POSTCODE_LINUX_4
-						    (DEVICE_CREATE_FAILURE_PC,
-						     devNo, busNo,
-						     POSTCODE_SEVERITY_ERR);
-						result = CONTROLVM_RESP_ERROR_CHANNEL_INVALID;
-						goto Away;
-					}
-					cmd.msgtype = GUEST_ADD_VNIC;
-					cmd.add_vnic.chanptr = dev->chanptr;
-					cmd.add_vnic.bus_no = busNo;
-					cmd.add_vnic.device_no = devNo;
-					cmd.add_vnic.instance_uuid =
-					    dev->instance_uuid;
-					cmd.add_vhba.intr = dev->intr;
-				} else {
-					LOGERR("CONTROLVM_DEVICE_CREATE Failed: unknown channelTypeGuid.\n");
-					POSTCODE_LINUX_4
-					    (DEVICE_CREATE_FAILURE_PC, devNo,
-					     busNo, POSTCODE_SEVERITY_ERR);
-					result = CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
-					goto Away;
-				}
+			cmd.msgtype = GUEST_ADD_VNIC;
+			cmd.add_vnic.chanptr = dev->chanptr;
+			cmd.add_vnic.bus_no = bus_no;
+			cmd.add_vnic.device_no = dev_no;
+			cmd.add_vnic.instance_uuid = dev->instance_uuid;
+			cmd.add_vhba.intr = dev->intr;
+		} else {
+			LOGERR("CONTROLVM_DEVICE_CREATE Failed: unknown channelTypeGuid.\n");
+			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
+					 bus_no, POSTCODE_SEVERITY_ERR);
+			result = CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
+			goto cleanup;
+		}
 
-				if (!virt_control_chan_func) {
-					LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci callback not registered.");
-					POSTCODE_LINUX_4
-					    (DEVICE_CREATE_FAILURE_PC, devNo,
-					     busNo, POSTCODE_SEVERITY_ERR);
-					result = CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
-					goto Away;
-				}
+		if (!virt_control_chan_func) {
+			LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci callback not registered.");
+			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
+					 bus_no, POSTCODE_SEVERITY_ERR);
+			result = CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
+			goto cleanup;
+		}
 
-				if (!virt_control_chan_func(&cmd)) {
-					LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci GUEST_ADD_[VHBA||VNIC] returned error.");
-					POSTCODE_LINUX_4
-					    (DEVICE_CREATE_FAILURE_PC, devNo,
-					     busNo, POSTCODE_SEVERITY_ERR);
-					result = CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
-					goto Away;
-				}
-			}
-			bus->device[devNo] = dev;
-			POSTCODE_LINUX_4(DEVICE_CREATE_SUCCESS_PC, devNo, busNo,
-					 POSTCODE_SEVERITY_INFO);
-			return CONTROLVM_RESP_SUCCESS;
+		if (!virt_control_chan_func(&cmd)) {
+			LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci GUEST_ADD_[VHBA||VNIC] returned error.");
+			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
+					 bus_no, POSTCODE_SEVERITY_ERR);
+			result =
+			     CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
+			goto cleanup;
 		}
+
+		bus->device[dev_no] = dev;
+		POSTCODE_LINUX_4(DEVICE_CREATE_SUCCESS_PC, dev_no,
+				 bus_no, POSTCODE_SEVERITY_INFO);
+		return CONTROLVM_RESP_SUCCESS;
 	}
 	read_unlock(&bus_list_lock);
 
-	LOGERR("CONTROLVM_DEVICE_CREATE Failed: failed to find bus %d.", busNo);
-	POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
+	LOGERR("CONTROLVM_DEVICE_CREATE Failed: failed to find bus %d.",
+	       bus_no);
+	POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
 			 POSTCODE_SEVERITY_ERR);
 	result = CONTROLVM_RESP_ERROR_BUS_INVALID;
 
-Away:
+cleanup:
 	if (!msg->hdr.flags.test_message) {
 		uislib_iounmap(dev->chanptr);
 		dev->chanptr = NULL;
-- 
2.1.0

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

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

* [PATCH 21/69] staging: unisys: refactor pause_device()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (19 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 20/69] staging: unisys: refactor create_device() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 22/69] staging: unisys: refactor resume_device() Benjamin Romer
                   ` (47 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix the function declaration so it is on a single line. Fix CamelCase local
variables:

busNo => bus_no
devNo => dev_no

Fix use of uuid_le_cmp() to check for 0 instead of using !uuid_le_cmp().

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 09a4680..35be4e6 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -526,32 +526,31 @@ cleanup:
 	return result;
 }
 
-static int
-pause_device(struct controlvm_message *msg)
+static int pause_device(struct controlvm_message *msg)
 {
-	u32 busNo, devNo;
+	u32 bus_no, dev_no;
 	struct bus_info *bus;
 	struct device_info *dev;
 	struct guest_msgs cmd;
 	int retval = CONTROLVM_RESP_SUCCESS;
 
-	busNo = msg->cmd.device_change_state.bus_no;
-	devNo = msg->cmd.device_change_state.dev_no;
+	bus_no = msg->cmd.device_change_state.bus_no;
+	dev_no = msg->cmd.device_change_state.dev_no;
 
 	read_lock(&bus_list_lock);
 	for (bus = bus_list; bus; bus = bus->next) {
-		if (bus->bus_no == busNo) {
+		if (bus->bus_no == bus_no) {
 			/* make sure the device number is valid */
-			if (devNo >= bus->device_count) {
+			if (dev_no >= bus->device_count) {
 				LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device(%d) >= deviceCount(%d).",
-				       devNo, bus->device_count);
+				       dev_no, bus->device_count);
 				retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 			} else {
 				/* make sure this device exists */
-				dev = bus->device[devNo];
+				dev = bus->device[dev_no];
 				if (!dev) {
 					LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device %d does not exist.",
-					       devNo);
+					       dev_no);
 					retval =
 					  CONTROLVM_RESP_ERROR_ALREADY_DONE;
 				}
@@ -561,7 +560,7 @@ pause_device(struct controlvm_message *msg)
 	}
 	if (!bus) {
 		LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: bus %d does not exist",
-		       busNo);
+		       bus_no);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
 	read_unlock(&bus_list_lock);
@@ -569,12 +568,12 @@ pause_device(struct controlvm_message *msg)
 		/* the msg is bound for virtpci; send
 		 * guest_msgs struct to callback
 		 */
-		if (!uuid_le_cmp(dev->channel_uuid,
-				 spar_vhba_channel_protocol_uuid)) {
+		if (uuid_le_cmp(dev->channel_uuid,
+				spar_vhba_channel_protocol_uuid) == 0) {
 			cmd.msgtype = GUEST_PAUSE_VHBA;
 			cmd.pause_vhba.chanptr = dev->chanptr;
-		} else if (!uuid_le_cmp(dev->channel_uuid,
-					spar_vnic_channel_protocol_uuid)) {
+		} else if (uuid_le_cmp(dev->channel_uuid,
+				       spar_vnic_channel_protocol_uuid) == 0) {
 			cmd.msgtype = GUEST_PAUSE_VNIC;
 			cmd.pause_vnic.chanptr = dev->chanptr;
 		} else {
-- 
2.1.0

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

* [PATCH 22/69] staging: unisys: refactor resume_device()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (20 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 21/69] staging: unisys: refactor pause_device() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 23/69] staging: unisys: refactor destroy_device() Benjamin Romer
                   ` (46 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix the function declaration so it is a single line. Fix CamelCase local
variable names:

busNo => bus_no
devNo => dev_no

Fix use of uuid_le_cmp() to check for 0 instead of using !uuid_le_cmp().

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 35be4e6..ca52f47 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -593,32 +593,31 @@ static int pause_device(struct controlvm_message *msg)
 	return retval;
 }
 
-static int
-resume_device(struct controlvm_message *msg)
+static int resume_device(struct controlvm_message *msg)
 {
-	u32 busNo, devNo;
+	u32 bus_no, dev_no;
 	struct bus_info *bus;
 	struct device_info *dev;
 	struct guest_msgs cmd;
 	int retval = CONTROLVM_RESP_SUCCESS;
 
-	busNo = msg->cmd.device_change_state.bus_no;
-	devNo = msg->cmd.device_change_state.dev_no;
+	bus_no = msg->cmd.device_change_state.bus_no;
+	dev_no = msg->cmd.device_change_state.dev_no;
 
 	read_lock(&bus_list_lock);
 	for (bus = bus_list; bus; bus = bus->next) {
-		if (bus->bus_no == busNo) {
+		if (bus->bus_no == bus_no) {
 			/* make sure the device number is valid */
-			if (devNo >= bus->device_count) {
+			if (dev_no >= bus->device_count) {
 				LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device(%d) >= deviceCount(%d).",
-				       devNo, bus->device_count);
+				       dev_no, bus->device_count);
 				retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 			} else {
 				/* make sure this device exists */
-				dev = bus->device[devNo];
+				dev = bus->device[dev_no];
 				if (!dev) {
 					LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device %d does not exist.",
-					       devNo);
+					       dev_no);
 					retval =
 					  CONTROLVM_RESP_ERROR_ALREADY_DONE;
 				}
@@ -629,7 +628,7 @@ resume_device(struct controlvm_message *msg)
 
 	if (!bus) {
 		LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: bus %d does not exist",
-		       busNo);
+		       bus_no);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
 	read_unlock(&bus_list_lock);
@@ -637,12 +636,12 @@ resume_device(struct controlvm_message *msg)
 	 * guest_msgs struct to callback
 	 */
 	if (retval == CONTROLVM_RESP_SUCCESS) {
-		if (!uuid_le_cmp(dev->channel_uuid,
-				 spar_vhba_channel_protocol_uuid)) {
+		if (uuid_le_cmp(dev->channel_uuid,
+				spar_vhba_channel_protocol_uuid) == 0) {
 			cmd.msgtype = GUEST_RESUME_VHBA;
 			cmd.resume_vhba.chanptr = dev->chanptr;
-		} else if (!uuid_le_cmp(dev->channel_uuid,
-					spar_vnic_channel_protocol_uuid)) {
+		} else if (uuid_le_cmp(dev->channel_uuid,
+				       spar_vnic_channel_protocol_uuid) == 0) {
 			cmd.msgtype = GUEST_RESUME_VNIC;
 			cmd.resume_vnic.chanptr = dev->chanptr;
 		} else {
-- 
2.1.0

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

* [PATCH 23/69] staging: unisys: refactor destroy_device()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (21 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 22/69] staging: unisys: refactor resume_device() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:08 ` [PATCH 24/69] staging: unisys: refactor delete_bus_glue() Benjamin Romer
                   ` (45 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix the function declaration so it is a single line. Rename CamelCase local
variable names:

busNo => bus_no
devNo => dev_no

Fix use of uuid_le_cmp() to check for 0 instead of using !uuid_le_cmp(). Fix
spelling error DESTORY to correctly read DESTROY.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 40 +++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index ca52f47..4f6f2c9 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -661,33 +661,33 @@ static int resume_device(struct controlvm_message *msg)
 	return retval;
 }
 
-static int
-destroy_device(struct controlvm_message *msg, char *buf)
+static int destroy_device(struct controlvm_message *msg, char *buf)
 {
-	u32 busNo, devNo;
+	u32 bus_no, dev_no;
 	struct bus_info *bus;
 	struct device_info *dev;
 	struct guest_msgs cmd;
 	int retval = CONTROLVM_RESP_SUCCESS;
 
-	busNo = msg->cmd.destroy_device.bus_no;
-	devNo = msg->cmd.destroy_device.bus_no;
+	bus_no = msg->cmd.destroy_device.bus_no;
+	dev_no = msg->cmd.destroy_device.bus_no;
 
 	read_lock(&bus_list_lock);
-	LOGINF("destroy_device called for busNo=%u, devNo=%u", busNo, devNo);
+	LOGINF("destroy_device called for bus_no=%u, dev_no=%u", bus_no,
+	       dev_no);
 	for (bus = bus_list; bus; bus = bus->next) {
-		if (bus->bus_no == busNo) {
+		if (bus->bus_no == bus_no) {
 			/* make sure the device number is valid */
-			if (devNo >= bus->device_count) {
-				LOGERR("CONTROLVM_DEVICE_DESTORY Failed: device(%d) >= deviceCount(%d).",
-				       devNo, bus->device_count);
+			if (dev_no >= bus->device_count) {
+				LOGERR("CONTROLVM_DEVICE_DESTROY Failed: device(%d) >= device_count(%d).",
+				       dev_no, bus->device_count);
 				retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 			} else {
 				/* make sure this device exists */
-				dev = bus->device[devNo];
+				dev = bus->device[dev_no];
 				if (!dev) {
 					LOGERR("CONTROLVM_DEVICE_DESTROY Failed: device %d does not exist.",
-					       devNo);
+					       dev_no);
 					retval =
 					     CONTROLVM_RESP_ERROR_ALREADY_DONE;
 				}
@@ -698,7 +698,7 @@ destroy_device(struct controlvm_message *msg, char *buf)
 
 	if (!bus) {
 		LOGERR("CONTROLVM_DEVICE_DESTROY Failed: bus %d does not exist",
-		       busNo);
+		       bus_no);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
 	read_unlock(&bus_list_lock);
@@ -706,12 +706,12 @@ destroy_device(struct controlvm_message *msg, char *buf)
 		/* the msg is bound for virtpci; send
 		 * guest_msgs struct to callback
 		 */
-		if (!uuid_le_cmp(dev->channel_uuid,
-				 spar_vhba_channel_protocol_uuid)) {
+		if (uuid_le_cmp(dev->channel_uuid,
+				spar_vhba_channel_protocol_uuid) == 0) {
 			cmd.msgtype = GUEST_DEL_VHBA;
 			cmd.del_vhba.chanptr = dev->chanptr;
-		} else if (!uuid_le_cmp(dev->channel_uuid,
-					spar_vnic_channel_protocol_uuid)) {
+		} else if (uuid_le_cmp(dev->channel_uuid,
+				       spar_vnic_channel_protocol_uuid) == 0) {
 			cmd.msgtype = GUEST_DEL_VNIC;
 			cmd.del_vnic.chanptr = dev->chanptr;
 		} else {
@@ -720,7 +720,7 @@ destroy_device(struct controlvm_message *msg, char *buf)
 			    CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
 		}
 		if (!virt_control_chan_func) {
-			LOGERR("CONTROLVM_DEVICE_DESTORY Failed: virtpci callback not registered.");
+			LOGERR("CONTROLVM_DEVICE_DESTROY Failed: virtpci callback not registered.");
 			return
 			    CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
 		}
@@ -736,7 +736,7 @@ destroy_device(struct controlvm_message *msg, char *buf)
  */
 		if (dev->polling) {
 			LOGINF("calling uislib_disable_channel_interrupts");
-			uislib_disable_channel_interrupts(busNo, devNo);
+			uislib_disable_channel_interrupts(bus_no, dev_no);
 		}
 		/* unmap the channel memory for the device. */
 		if (!msg->hdr.flags.test_message) {
@@ -744,7 +744,7 @@ destroy_device(struct controlvm_message *msg, char *buf)
 			uislib_iounmap(dev->chanptr);
 		}
 		kfree(dev);
-		bus->device[devNo] = NULL;
+		bus->device[dev_no] = NULL;
 	}
 	return retval;
 }
-- 
2.1.0

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

* [PATCH 24/69] staging: unisys: refactor delete_bus_glue()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (22 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 23/69] staging: unisys: refactor destroy_device() Benjamin Romer
@ 2014-12-05 22:08 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 25/69] staging: unisys: refactor delete_device_glue() Benjamin Romer
                   ` (44 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:08 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix the function declaration to be a single line, and rename the CamelCase
parameter:

busNo => bus_no

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 4f6f2c9..328f16b 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -774,15 +774,14 @@ init_chipset(struct controlvm_message *msg, char *buf)
 	return CONTROLVM_RESP_SUCCESS;
 }
 
-static int
-delete_bus_glue(u32 busNo)
+static int delete_bus_glue(u32 bus_no)
 {
 	struct controlvm_message msg;
 
 	init_msg_header(&msg, CONTROLVM_BUS_DESTROY, 0, 0);
-	msg.cmd.destroy_bus.bus_no = busNo;
+	msg.cmd.destroy_bus.bus_no = bus_no;
 	if (destroy_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("destroy_bus failed. busNo=0x%x\n", busNo);
+		LOGERR("destroy_bus failed. bus_no=0x%x\n", bus_no);
 		return 0;
 	}
 	return 1;
-- 
2.1.0

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

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

* [PATCH 25/69] staging: unisys: refactor delete_device_glue()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (23 preceding siblings ...)
  2014-12-05 22:08 ` [PATCH 24/69] staging: unisys: refactor delete_bus_glue() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 26/69] staging: unisys: refactor info_debugfs_read() Benjamin Romer
                   ` (43 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix the function declaration so it is a single line, and fix CamelCase
function parameter names:

busNo => bus_no
devNo => dev_no

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 328f16b..d251822 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -787,17 +787,16 @@ static int delete_bus_glue(u32 bus_no)
 	return 1;
 }
 
-static int
-delete_device_glue(u32 busNo, u32 devNo)
+static int delete_device_glue(u32 bus_no, u32 dev_no)
 {
 	struct controlvm_message msg;
 
 	init_msg_header(&msg, CONTROLVM_DEVICE_DESTROY, 0, 0);
-	msg.cmd.destroy_device.bus_no = busNo;
-	msg.cmd.destroy_device.dev_no = devNo;
+	msg.cmd.destroy_device.bus_no = bus_no;
+	msg.cmd.destroy_device.dev_no = dev_no;
 	if (destroy_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("destroy_device failed. busNo=0x%x devNo=0x%x\n", busNo,
-		       devNo);
+		LOGERR("destroy_device failed. bus_no=0x%x dev_no=0x%x\n",
+		       bus_no, dev_no);
 		return 0;
 	}
 	return 1;
-- 
2.1.0

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

* [PATCH 26/69] staging: unisys: refactor info_debugfs_read()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (24 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 25/69] staging: unisys: refactor delete_device_glue() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 27/69] staging: unisys: refactor find_dev() Benjamin Romer
                   ` (42 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix the function declaration so the type is on the same line as the name,
and fix the CamelCase local variable name:

TotalBytes => total_bytes

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index d251822..614919c 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1154,12 +1154,11 @@ err_done:
 	return -1;
 }
 
-static ssize_t
-info_debugfs_read(struct file *file, char __user *buf,
-		  size_t len, loff_t *offset)
+static ssize_t info_debugfs_read(struct file *file, char __user *buf,
+				 size_t len, loff_t *offset)
 {
 	char *temp;
-	int totalBytes = 0;
+	int total_bytes = 0;
 	int remaining_bytes = PROC_READ_BUFFER_SIZE;
 
 /* *start = buf; */
@@ -1178,14 +1177,14 @@ info_debugfs_read(struct file *file, char __user *buf,
 	if ((*offset == 0) || (!debug_buf_valid)) {
 		DBGINF("calling info_debugfs_read_helper.\n");
 		/* if the read fails, then -1 will be returned */
-		totalBytes = info_debugfs_read_helper(&temp, &remaining_bytes);
+		total_bytes = info_debugfs_read_helper(&temp, &remaining_bytes);
 		debug_buf_valid = 1;
 	} else {
-		totalBytes = strlen(debug_buf);
+		total_bytes = strlen(debug_buf);
 	}
 
 	return simple_read_from_buffer(buf, len, offset,
-				       debug_buf, totalBytes);
+				       debug_buf, total_bytes);
 }
 
 static struct device_info *
-- 
2.1.0

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

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

* [PATCH 27/69] staging: unisys: refactor find_dev()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (25 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 26/69] staging: unisys: refactor info_debugfs_read() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 28/69] staging: unisys: rename Process_Incoming() Benjamin Romer
                   ` (41 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix the function definition so that it is a single line. Fix CamelCase
parameter names:

busNo => bus_no
devNo => dev_no

Get rid of the goto and just break out of the for loop, since that does
the exact same thing.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 614919c..908ec49 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1187,31 +1187,29 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
 				       debug_buf, total_bytes);
 }
 
-static struct device_info *
-find_dev(u32 busNo, u32 devNo)
+static struct device_info *find_dev(u32 bus_no, u32 dev_no)
 {
 	struct bus_info *bus;
 	struct device_info *dev = NULL;
 
 	read_lock(&bus_list_lock);
 	for (bus = bus_list; bus; bus = bus->next) {
-		if (bus->bus_no == busNo) {
+		if (bus->bus_no == bus_no) {
 			/* make sure the device number is valid */
-			if (devNo >= bus->device_count) {
-				LOGERR("%s bad busNo, devNo=%d,%d",
+			if (dev_no >= bus->device_count) {
+				LOGERR("%s bad bus_no, dev_no=%d,%d",
 				       __func__,
-				       (int)(busNo), (int)(devNo));
-				goto Away;
+				       (int)bus_no, (int)dev_no);
+				break;
 			}
-			dev = bus->device[devNo];
+			dev = bus->device[dev_no];
 			if (!dev)
-				LOGERR("%s bad busNo, devNo=%d,%d",
+				LOGERR("%s bad bus_no, dev_no=%d,%d",
 				       __func__,
-				       (int)(busNo), (int)(devNo));
-			goto Away;
+				       (int)bus_no, (int)dev_no);
+			break;
 		}
 	}
-Away:
 	read_unlock(&bus_list_lock);
 	return dev;
 }
-- 
2.1.0

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

* [PATCH 28/69] staging: unisys: rename Process_Incoming()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (26 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 27/69] staging: unisys: refactor find_dev() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 29/69] staging: unisys: rename Initialize_incoming_thread() Benjamin Romer
                   ` (40 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix the CamelCase function name:

Process_Incoming => process_incoming

Update all references to use the new name.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 908ec49..3b81bbf 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1234,8 +1234,7 @@ static struct device_info *find_dev(u32 bus_no, u32 dev_no)
  *    less-busy ones.
  *
  */
-static int
-Process_Incoming(void *v)
+static int process_incoming(void *v)
 {
 	unsigned long long cur_cycles, old_cycles, idle_cycles, delta_cycles;
 	struct list_head *new_tail = NULL;
@@ -1346,7 +1345,7 @@ Initialize_incoming_thread(void)
 	if (incoming_started)
 		return TRUE;
 	if (!uisthread_start(&incoming_ti,
-			     &Process_Incoming, NULL, "dev_incoming")) {
+			     &process_incoming, NULL, "dev_incoming")) {
 		LOGERR("uisthread_start Initialize_incoming_thread ****FAILED");
 		return FALSE;
 	}
@@ -1355,7 +1354,7 @@ Initialize_incoming_thread(void)
 }
 
 /*  Add a new device/channel to the list being processed by
- *  Process_Incoming().
+ *  process_incoming().
  *  <interrupt> - indicates the function to call periodically.
  *  <interrupt_context> - indicates the data to pass to the <interrupt>
  *                        function.
@@ -1385,7 +1384,7 @@ uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no,
 EXPORT_SYMBOL_GPL(uislib_enable_channel_interrupts);
 
 /*  Remove a device/channel from the list being processed by
- *  Process_Incoming().
+ *  process_incoming().
  */
 void
 uislib_disable_channel_interrupts(u32 bus_no, u32 dev_no)
@@ -1418,7 +1417,7 @@ do_wakeup_polling_device_channels(struct work_struct *dummy)
 static DECLARE_WORK(Work_wakeup_polling_device_channels,
 		    do_wakeup_polling_device_channels);
 
-/*  Call this function when you want to send a hint to Process_Incoming() that
+/*  Call this function when you want to send a hint to process_incoming() that
  *  your device might have more requests.
  */
 void
@@ -1430,7 +1429,7 @@ uislib_force_channel_interrupt(u32 bus_no, u32 dev_no)
 		return;
 	/* The point of using schedule_work() instead of just doing
 	 * the work inline is to force a slight delay before waking up
-	 * the Process_Incoming() thread.
+	 * the process_incoming() thread.
 	 */
 	tot_wakeup_cnt++;
 	schedule_work(&Work_wakeup_polling_device_channels);
-- 
2.1.0

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

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

* [PATCH 29/69] staging: unisys: rename Initialize_incoming_thread()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (27 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 28/69] staging: unisys: rename Process_Incoming() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 23:09   ` devendra.aaru
  2014-12-05 22:09 ` [PATCH 30/69] staging: unisys: fix CamelCase Work queue name in uislib.c Benjamin Romer
                   ` (39 subsequent siblings)
  68 siblings, 1 reply; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix the CamelCase name of this function:

Initialize_incoming_thread => initialize_incoming_thread

Update all references to use the new name.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 3b81bbf..29c12a3 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1340,13 +1340,13 @@ static int process_incoming(void *v)
 }
 
 static BOOL
-Initialize_incoming_thread(void)
+initialize_incoming_thread(void)
 {
 	if (incoming_started)
 		return TRUE;
 	if (!uisthread_start(&incoming_ti,
 			     &process_incoming, NULL, "dev_incoming")) {
-		LOGERR("uisthread_start Initialize_incoming_thread ****FAILED");
+		LOGERR("uisthread_start initialize_incoming_thread ****FAILED");
 		return FALSE;
 	}
 	incoming_started = TRUE;
@@ -1373,7 +1373,7 @@ uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no,
 		return;
 	}
 	down(&poll_dev_lock);
-	Initialize_incoming_thread();
+	initialize_incoming_thread();
 	dev->interrupt = interrupt;
 	dev->interrupt_context = interrupt_context;
 	dev->polling = TRUE;
-- 
2.1.0

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

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

* [PATCH 30/69] staging: unisys: fix CamelCase Work queue name in uislib.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (28 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 29/69] staging: unisys: rename Initialize_incoming_thread() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 31/69] staging: unisys: fix spacing in uisqueue.c Benjamin Romer
                   ` (38 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix CamelCase name:

Work_wakeup_polling_device_channels => work_wakeup_polling_device_channels

Update references to use the new name.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uislib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 29c12a3..a9eedde 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1414,7 +1414,7 @@ do_wakeup_polling_device_channels(struct work_struct *dummy)
 	}
 }
 
-static DECLARE_WORK(Work_wakeup_polling_device_channels,
+static DECLARE_WORK(work_wakeup_polling_device_channels,
 		    do_wakeup_polling_device_channels);
 
 /*  Call this function when you want to send a hint to process_incoming() that
@@ -1432,7 +1432,7 @@ uislib_force_channel_interrupt(u32 bus_no, u32 dev_no)
 	 * the process_incoming() thread.
 	 */
 	tot_wakeup_cnt++;
-	schedule_work(&Work_wakeup_polling_device_channels);
+	schedule_work(&work_wakeup_polling_device_channels);
 }
 EXPORT_SYMBOL_GPL(uislib_force_channel_interrupt);
 
-- 
2.1.0

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

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

* [PATCH 31/69] staging: unisys: fix spacing in uisqueue.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (29 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 30/69] staging: unisys: fix CamelCase Work queue name in uislib.c Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 32/69] staging: unisys: fix CamelCase names in do_locked_client_insert() Benjamin Romer
                   ` (37 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Correct alignment for a couple of functions and remove the space between
a typecast and its target.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisqueue.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisqueue.c b/drivers/staging/unisys/uislib/uisqueue.c
index 69151e4..9869c9f 100644
--- a/drivers/staging/unisys/uislib/uisqueue.c
+++ b/drivers/staging/unisys/uislib/uisqueue.c
@@ -226,7 +226,7 @@ EXPORT_SYMBOL_GPL(spar_signalqueue_empty);
 
 unsigned long long
 uisqueue_interlocked_or(unsigned long long __iomem *tgt,
-		       unsigned long long set)
+			unsigned long long set)
 {
 	unsigned long long i;
 	unsigned long long j;
@@ -244,7 +244,7 @@ EXPORT_SYMBOL_GPL(uisqueue_interlocked_or);
 
 unsigned long long
 uisqueue_interlocked_and(unsigned long long __iomem *tgt,
-			unsigned long long set)
+			 unsigned long long set)
 {
 	unsigned long long i;
 	unsigned long long j;
@@ -294,7 +294,7 @@ uisqueue_put_cmdrsp_with_lock_client(struct uisqueue_info *queueinfo,
 				     char oktowait, u8 *channel_id)
 {
 	while (!do_locked_client_insert(queueinfo, whichqueue, cmdrsp,
-					(spinlock_t *) insertlock,
+					(spinlock_t *)insertlock,
 					issue_irq_if_empty,
 					irq_handle, channel_id)) {
 		if (oktowait != OK_TO_WAIT) {
-- 
2.1.0

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

* [PATCH 32/69] staging: unisys: fix CamelCase names in do_locked_client_insert()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (30 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 31/69] staging: unisys: fix spacing in uisqueue.c Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 33/69] staging: unisys: fix line spacing in uisthread.c Benjamin Romer
                   ` (36 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix CamelCase names:

pSignal => signal

Remove unused parameters issueInterruptIfEmpty and interruptHandle, and update
callers of this function.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisqueue.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisqueue.c b/drivers/staging/unisys/uislib/uisqueue.c
index 9869c9f..71bb7b6 100644
--- a/drivers/staging/unisys/uislib/uisqueue.c
+++ b/drivers/staging/unisys/uislib/uisqueue.c
@@ -263,22 +263,21 @@ EXPORT_SYMBOL_GPL(uisqueue_interlocked_and);
 static u8
 do_locked_client_insert(struct uisqueue_info *queueinfo,
 			unsigned int whichqueue,
-			void *pSignal,
+			void *signal,
 			spinlock_t *lock,
-			unsigned char issueInterruptIfEmpty,
-			u64 interruptHandle, u8 *channelId)
+			u8 *channel_id)
 {
 	unsigned long flags;
 	u8 rc = 0;
 
 	spin_lock_irqsave(lock, flags);
-	if (!spar_channel_client_acquire_os(queueinfo->chan, channelId))
+	if (!spar_channel_client_acquire_os(queueinfo->chan, channel_id))
 		goto unlock;
-	if (spar_signal_insert(queueinfo->chan, whichqueue, pSignal)) {
+	if (spar_signal_insert(queueinfo->chan, whichqueue, signal)) {
 		queueinfo->packets_sent++;
 		rc = 1;
 	}
-	spar_channel_client_release_os(queueinfo->chan, channelId);
+	spar_channel_client_release_os(queueinfo->chan, channel_id);
 unlock:
 	spin_unlock_irqrestore((spinlock_t *)lock, flags);
 	return rc;
@@ -295,8 +294,7 @@ uisqueue_put_cmdrsp_with_lock_client(struct uisqueue_info *queueinfo,
 {
 	while (!do_locked_client_insert(queueinfo, whichqueue, cmdrsp,
 					(spinlock_t *)insertlock,
-					issue_irq_if_empty,
-					irq_handle, channel_id)) {
+					channel_id)) {
 		if (oktowait != OK_TO_WAIT) {
 			LOGERR("****FAILED visor_signal_insert failed; cannot wait; insert aborted\n");
 			return 0;	/* failed to queue */
-- 
2.1.0

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

* [PATCH 33/69] staging: unisys: fix line spacing in uisthread.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (31 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 32/69] staging: unisys: fix CamelCase names in do_locked_client_insert() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 34/69] staging: unisys: fix line spacing in uisutils.c Benjamin Romer
                   ` (35 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Just remove the one extra blank line.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisthread.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/unisys/uislib/uisthread.c b/drivers/staging/unisys/uislib/uisthread.c
index c0fc812..25adf1a 100644
--- a/drivers/staging/unisys/uislib/uisthread.c
+++ b/drivers/staging/unisys/uislib/uisthread.c
@@ -53,7 +53,6 @@ uisthread_start(struct uisthread_info *thrinfo,
 	wake_up_process(thrinfo->task);
 	LOGINF("started thread pid:%d\n", thrinfo->id);
 	return 1;
-
 }
 EXPORT_SYMBOL_GPL(uisthread_start);
 
-- 
2.1.0

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

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

* [PATCH 34/69] staging: unisys: fix line spacing in uisutils.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (32 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 33/69] staging: unisys: fix line spacing in uisthread.c Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 35/69] staging: unisys: fix " Benjamin Romer
                   ` (34 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Just remove the couple of extra blank lines.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisutils.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index 4a5b867..941f007 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -42,7 +42,6 @@ atomic_t uisutils_registered_services = ATOMIC_INIT(0);
 					 * uisctrl_register_req_handler() or
 					 * uisctrl_register_req_handler_ex() */
 
-
 /*****************************************************/
 /* Utility functions                                 */
 /*****************************************************/
@@ -255,7 +254,6 @@ dolist: if (skb_shinfo(skb)->frag_list) {
 
 		for (skbinlist = skb_shinfo(skb)->frag_list; skbinlist;
 		     skbinlist = skbinlist->next) {
-
 			c = uisutil_copy_fragsinfo_from_skb("recursive",
 				skbinlist,
 				skbinlist->len - skbinlist->data_len,
-- 
2.1.0

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

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

* [PATCH 35/69] staging: unisys: fix spacing in uisutils.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (33 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 34/69] staging: unisys: fix line spacing in uisutils.c Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 36/69] staging: unisys: fix brackets in uisctrl_register_req_handler_ex() Benjamin Romer
                   ` (33 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix as many spacing problems as possible by indenting lines properly and
getting rid of spaces between typecasts and their targets.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisutils.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index 941f007..5865df7 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -48,7 +48,7 @@ atomic_t uisutils_registered_services = ATOMIC_INIT(0);
 
 int
 uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
-		      char *format, ...)
+			 char *format, ...)
 {
 	va_list args;
 	int len;
@@ -95,7 +95,7 @@ uisctrl_register_req_handler(int type, void *fptr,
 	}
 	if (chipset_driver_info)
 		bus_device_info_init(chipset_driver_info, "chipset", "uislib",
-				   VERSION, NULL);
+				     VERSION, NULL);
 
 	return 1;
 }
@@ -147,7 +147,7 @@ Away:
 	if (rc) {
 		if (chipset_driver_info)
 			bus_device_info_init(chipset_driver_info, "chipset",
-					   "uislib", VERSION, NULL);
+					     "uislib", VERSION, NULL);
 	} else
 		LOGERR("failed to register type %pUL.\n", &switch_uuid);
 
@@ -163,7 +163,7 @@ uisctrl_unregister_req_handler_ex(uuid_le switch_uuid)
 	LOGINF("type=%pUL.\n", &switch_uuid);
 	if (req_handler_del(switch_uuid) < 0) {
 		LOGERR("failed to remove %pUL from server list\n",
-				&switch_uuid);
+		       &switch_uuid);
 		goto Away;
 	}
 	atomic_dec(&uisutils_registered_services);
@@ -213,10 +213,10 @@ uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in,
 		frags[count].pi_pfn =
 		    page_to_pfn(virt_to_page(skb->data + offset));
 		frags[count].pi_off =
-		    (unsigned long) (skb->data + offset) & PI_PAGE_MASK;
+		    (unsigned long)(skb->data + offset) & PI_PAGE_MASK;
 		size =
 		    min(firstfraglen,
-			(unsigned int) (PI_PAGE_SIZE - frags[count].pi_off));
+			(unsigned int)(PI_PAGE_SIZE - frags[count].pi_off));
 		/* can take smallest of firstfraglen(what's left) OR
 		* bytes left in the page
 		*/
@@ -230,7 +230,7 @@ uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in,
 
 	if ((count + numfrags) > frags_max) {
 		LOGERR("**** FAILED %s frags array too small: max:%d count+nr_frags:%d\n",
-		     calling_ctx, frags_max, count + numfrags);
+		       calling_ctx, frags_max, count + numfrags);
 		return -1;	/* failure */
 	}
 
-- 
2.1.0

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

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

* [PATCH 36/69] staging: unisys: fix brackets in uisctrl_register_req_handler_ex()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (34 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 35/69] staging: unisys: fix " Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 37/69] staging: unisys: refactor uisctrl_register_req_handler_ex() Benjamin Romer
                   ` (32 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Add the missing brackets to the last if statement in this function.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisutils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index 5865df7..6d13eb2 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -148,9 +148,9 @@ Away:
 		if (chipset_driver_info)
 			bus_device_info_init(chipset_driver_info, "chipset",
 					     "uislib", VERSION, NULL);
-	} else
+	} else {
 		LOGERR("failed to register type %pUL.\n", &switch_uuid);
-
+	}
 	return rc;
 }
 EXPORT_SYMBOL_GPL(uisctrl_register_req_handler_ex);
-- 
2.1.0

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

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

* [PATCH 37/69] staging: unisys: refactor uisctrl_register_req_handler_ex()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (35 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 36/69] staging: unisys: fix brackets in uisctrl_register_req_handler_ex() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 38/69] staging: unisys: refactor uisctrl_unregister_req_handler_ex() Benjamin Romer
                   ` (31 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Fix CamelCase local variable name:

pReqHandlerInfo => req_handler

Get rid of the useless goto and just return straight away on an error.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisutils.c | 39 +++++++++++++++-----------------
 1 file changed, 18 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index 6d13eb2..9ca10e9 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -112,46 +112,43 @@ uisctrl_register_req_handler_ex(uuid_le switch_uuid,
 						u32 client_str_len, u64 bytes),
 			struct ultra_vbus_deviceinfo *chipset_driver_info)
 {
-	struct req_handler_info *pReqHandlerInfo;
-	int rc = 0;		/* assume failure */
+	struct req_handler_info *req_handler;
 
 	LOGINF("type=%pUL, controlfunc=0x%p.\n",
 	       &switch_uuid, controlfunc);
 	if (!controlfunc) {
 		LOGERR("%pUL: controlfunc must be supplied\n", &switch_uuid);
-		goto Away;
+		return 0;
 	}
 	if (!server_channel_ok) {
 		LOGERR("%pUL: Server_Channel_Ok must be supplied\n",
 				&switch_uuid);
-		goto Away;
+		return 0;
 	}
 	if (!server_channel_init) {
 		LOGERR("%pUL: Server_Channel_Init must be supplied\n",
 				&switch_uuid);
-		goto Away;
+		return 0;
 	}
-	pReqHandlerInfo = req_handler_add(switch_uuid,
-					switch_type_name,
-					controlfunc,
-					min_channel_bytes,
-					server_channel_ok, server_channel_init);
-	if (!pReqHandlerInfo) {
+	req_handler = req_handler_add(switch_uuid,
+				      switch_type_name,
+				      controlfunc,
+				      min_channel_bytes,
+				      server_channel_ok, server_channel_init);
+	if (!req_handler) {
 		LOGERR("failed to add %pUL to server list\n", &switch_uuid);
-		goto Away;
+		return 0;
 	}
 
 	atomic_inc(&uisutils_registered_services);
-	rc = 1;			/* success */
-Away:
-	if (rc) {
-		if (chipset_driver_info)
-			bus_device_info_init(chipset_driver_info, "chipset",
-					     "uislib", VERSION, NULL);
-	} else {
-		LOGERR("failed to register type %pUL.\n", &switch_uuid);
+	if (chipset_driver_info) {
+		bus_device_info_init(chipset_driver_info, "chipset",
+				     "uislib", VERSION, NULL);
+		return 1;
 	}
-	return rc;
+
+	LOGERR("failed to register type %pUL.\n", &switch_uuid);
+	return 0;
 }
 EXPORT_SYMBOL_GPL(uisctrl_register_req_handler_ex);
 
-- 
2.1.0

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

* [PATCH 38/69] staging: unisys: refactor uisctrl_unregister_req_handler_ex()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (36 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 37/69] staging: unisys: refactor uisctrl_register_req_handler_ex() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 39/69] staging: unisys: fix CamelCase globals in uisutils.c Benjamin Romer
                   ` (30 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Get rid of the unnecessary goto statement and just return directly.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisutils.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index 9ca10e9..e8c868e 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -155,20 +155,14 @@ EXPORT_SYMBOL_GPL(uisctrl_register_req_handler_ex);
 int
 uisctrl_unregister_req_handler_ex(uuid_le switch_uuid)
 {
-	int rc = 0;		/* assume failure */
-
 	LOGINF("type=%pUL.\n", &switch_uuid);
 	if (req_handler_del(switch_uuid) < 0) {
 		LOGERR("failed to remove %pUL from server list\n",
 		       &switch_uuid);
-		goto Away;
+		return 0;
 	}
 	atomic_dec(&uisutils_registered_services);
-	rc = 1;			/* success */
-Away:
-	if (!rc)
-		LOGERR("failed to unregister type %pUL.\n", &switch_uuid);
-	return rc;
+	return 1;
 }
 EXPORT_SYMBOL_GPL(uisctrl_unregister_req_handler_ex);
 
-- 
2.1.0

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

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

* [PATCH 39/69] staging: unisys: fix CamelCase globals in uisutils.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (37 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 38/69] staging: unisys: refactor uisctrl_unregister_req_handler_ex() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 40/69] staging: unisys: refactor req_handler_add() Benjamin Romer
                   ` (29 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Bryan Thompson

Rename CamelCase global variable names:

ReqHandlerInfo_list => req_handler_info_list
ReqHandlerInfo_list_lock => req_handler_info_list_lock

Update all references to use the new name.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisutils.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index e8c868e..4f89b2c 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -261,8 +261,8 @@ dolist: if (skb_shinfo(skb)->frag_list) {
 }
 EXPORT_SYMBOL_GPL(uisutil_copy_fragsinfo_from_skb);
 
-static LIST_HEAD(ReqHandlerInfo_list);	/* list of struct req_handler_info */
-static DEFINE_SPINLOCK(ReqHandlerInfo_list_lock);
+static LIST_HEAD(req_handler_info_list); /* list of struct req_handler_info */
+static DEFINE_SPINLOCK(req_handler_info_list_lock);
 
 struct req_handler_info *
 req_handler_add(uuid_le switch_uuid,
@@ -286,9 +286,9 @@ req_handler_add(uuid_le switch_uuid,
 	if (switch_type_name)
 		strncpy(rc->switch_type_name, switch_type_name,
 			sizeof(rc->switch_type_name) - 1);
-	spin_lock(&ReqHandlerInfo_list_lock);
-	list_add_tail(&(rc->list_link), &ReqHandlerInfo_list);
-	spin_unlock(&ReqHandlerInfo_list_lock);
+	spin_lock(&req_handler_info_list_lock);
+	list_add_tail(&(rc->list_link), &req_handler_info_list);
+	spin_unlock(&req_handler_info_list_lock);
 
 	return rc;
 }
@@ -299,15 +299,15 @@ req_handler_find(uuid_le switch_uuid)
 	struct list_head *lelt, *tmp;
 	struct req_handler_info *entry = NULL;
 
-	spin_lock(&ReqHandlerInfo_list_lock);
-	list_for_each_safe(lelt, tmp, &ReqHandlerInfo_list) {
+	spin_lock(&req_handler_info_list_lock);
+	list_for_each_safe(lelt, tmp, &req_handler_info_list) {
 		entry = list_entry(lelt, struct req_handler_info, list_link);
 		if (uuid_le_cmp(entry->switch_uuid, switch_uuid) == 0) {
-			spin_unlock(&ReqHandlerInfo_list_lock);
+			spin_unlock(&req_handler_info_list_lock);
 			return entry;
 		}
 	}
-	spin_unlock(&ReqHandlerInfo_list_lock);
+	spin_unlock(&req_handler_info_list_lock);
 	return NULL;
 }
 
@@ -318,8 +318,8 @@ req_handler_del(uuid_le switch_uuid)
 	struct req_handler_info *entry = NULL;
 	int rc = -1;
 
-	spin_lock(&ReqHandlerInfo_list_lock);
-	list_for_each_safe(lelt, tmp, &ReqHandlerInfo_list) {
+	spin_lock(&req_handler_info_list_lock);
+	list_for_each_safe(lelt, tmp, &req_handler_info_list) {
 		entry = list_entry(lelt, struct req_handler_info, list_link);
 		if (uuid_le_cmp(entry->switch_uuid, switch_uuid) == 0) {
 			list_del(lelt);
@@ -327,6 +327,6 @@ req_handler_del(uuid_le switch_uuid)
 			rc++;
 		}
 	}
-	spin_unlock(&ReqHandlerInfo_list_lock);
+	spin_unlock(&req_handler_info_list_lock);
 	return rc;
 }
-- 
2.1.0

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

* [PATCH 40/69] staging: unisys: refactor req_handler_add()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (38 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 39/69] staging: unisys: fix CamelCase globals in uisutils.c Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 41/69] staging: unisys: refactor visorchipset_file_init() Benjamin Romer
                   ` (28 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix the CamelCase parameter names:

Server_Channel_Ok => server_channel_ok
Server_Channel_Init => server_channel_init
clientStr => clientstr
clientStrLen => clientstr_len

And remove the extra parenthesis in the list_add_tail() call at the end.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/uislib/uisutils.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index 4f89b2c..d9f527d 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -269,9 +269,10 @@ req_handler_add(uuid_le switch_uuid,
 	      const char *switch_type_name,
 	      int (*controlfunc)(struct io_msgs *),
 	      unsigned long min_channel_bytes,
-	      int (*Server_Channel_Ok)(unsigned long channelBytes),
-	      int (*Server_Channel_Init)
-	       (void *x, unsigned char *clientStr, u32 clientStrLen, u64 bytes))
+	      int (*server_channel_ok)(unsigned long channel_bytes),
+	      int (*server_channel_init)
+	       (void *x, unsigned char *clientstr, u32 clientstr_len,
+		u64 bytes))
 {
 	struct req_handler_info *rc = NULL;
 
@@ -281,13 +282,13 @@ req_handler_add(uuid_le switch_uuid,
 	rc->switch_uuid = switch_uuid;
 	rc->controlfunc = controlfunc;
 	rc->min_channel_bytes = min_channel_bytes;
-	rc->server_channel_ok = Server_Channel_Ok;
-	rc->server_channel_init = Server_Channel_Init;
+	rc->server_channel_ok = server_channel_ok;
+	rc->server_channel_init = server_channel_init;
 	if (switch_type_name)
 		strncpy(rc->switch_type_name, switch_type_name,
 			sizeof(rc->switch_type_name) - 1);
 	spin_lock(&req_handler_info_list_lock);
-	list_add_tail(&(rc->list_link), &req_handler_info_list);
+	list_add_tail(&rc->list_link, &req_handler_info_list);
 	spin_unlock(&req_handler_info_list_lock);
 
 	return rc;
-- 
2.1.0

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

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

* [PATCH 41/69] staging: unisys: refactor visorchipset_file_init()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (39 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 40/69] staging: unisys: refactor req_handler_add() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-06 15:14   ` Dan Carpenter
  2014-12-05 22:09 ` [PATCH 42/69] staging: unisys: fix CamelCase global variables in file.c Benjamin Romer
                   ` (27 subsequent siblings)
  68 siblings, 1 reply; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Ken Depro

Fix the declaration so it is a single line. Fix CamelCase parameter
names:

MajorDev => major_dev
pControlVm_channel => controlvm_channel

Remove the unnecessary gotos and just return directly in error cases.
Fix the last error condition so it returns the result of cdev_add()
instead of always zero.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/file.c | 22 ++++++++++------------
 drivers/staging/unisys/visorchipset/file.h |  2 +-
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index 373fa36..cb5bcb9 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -57,13 +57,12 @@ static const struct file_operations visorchipset_fops = {
 	.mmap = visorchipset_mmap,
 };
 
-int
-visorchipset_file_init(dev_t majorDev, VISORCHANNEL **pControlVm_channel)
+int visorchipset_file_init(dev_t major_dev, VISORCHANNEL **controlvm_channel)
 {
-	int rc = -1;
+	int rc = 0;
 
-	PControlVm_channel = pControlVm_channel;
-	MajorDev = majorDev;
+	PControlVm_channel = controlvm_channel;
+	MajorDev = major_dev;
 	cdev_init(&Cdev, &visorchipset_fops);
 	Cdev.owner = THIS_MODULE;
 	if (MAJOR(MajorDev) == 0) {
@@ -71,7 +70,7 @@ visorchipset_file_init(dev_t majorDev, VISORCHANNEL **pControlVm_channel)
 		if (alloc_chrdev_region(&MajorDev, 0, 1, MYDRVNAME) < 0) {
 			ERRDRV("Unable to allocate+register char device %s",
 			       MYDRVNAME);
-			goto Away;
+			return -1;
 		}
 		Registered = TRUE;
 		INFODRV("New major number %d registered\n", MAJOR(MajorDev));
@@ -79,20 +78,19 @@ visorchipset_file_init(dev_t majorDev, VISORCHANNEL **pControlVm_channel)
 		/* static major device number registration required */
 		if (register_chrdev_region(MajorDev, 1, MYDRVNAME) < 0) {
 			ERRDRV("Unable to register char device %s", MYDRVNAME);
-			goto Away;
+			return -1;
 		}
 		Registered = TRUE;
 		INFODRV("Static major number %d registered\n", MAJOR(MajorDev));
 	}
-	if (cdev_add(&Cdev, MKDEV(MAJOR(MajorDev), 0), 1) < 0) {
+	rc = cdev_add(&Cdev, MKDEV(MAJOR(MajorDev), 0), 1);
+	if (rc  < 0) {
 		ERRDRV("failed to create char device: (status=%d)\n", rc);
-		goto Away;
+		return -1;
 	}
 	INFODRV("Registered char device for %s (major=%d)",
 		MYDRVNAME, MAJOR(MajorDev));
-	rc = 0;
-Away:
-	return rc;
+	return 0;
 }
 
 void
diff --git a/drivers/staging/unisys/visorchipset/file.h b/drivers/staging/unisys/visorchipset/file.h
index 21bb906..fb434eb 100644
--- a/drivers/staging/unisys/visorchipset/file.h
+++ b/drivers/staging/unisys/visorchipset/file.h
@@ -20,7 +20,7 @@
 
 #include "globals.h"
 
-int visorchipset_file_init(dev_t majorDev, VISORCHANNEL **pControlVm_channel);
+int visorchipset_file_init(dev_t major_dev, VISORCHANNEL **controlvm_channel);
 void visorchipset_file_cleanup(void);
 
 #endif
-- 
2.1.0

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

* [PATCH 42/69] staging: unisys: fix CamelCase global variables in file.c
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (40 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 41/69] staging: unisys: refactor visorchipset_file_init() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 43/69] staging: unisys: get rid of HAVE_UNLOCKED_IOCTL code Benjamin Romer
                   ` (26 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Ken Depro

Fix CamelCase names:

Cdev => file_cdev
PControlVm_channel => file_controlvm_channel
MajorDev => majordev
Registered => registered

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/file.c | 54 +++++++++++++++---------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index cb5bcb9..f4d01ed 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -28,10 +28,10 @@
 
 #define CURRENT_FILE_PC VISOR_CHIPSET_PC_file_c
 
-static struct cdev Cdev;
-static VISORCHANNEL **PControlVm_channel;
-static dev_t MajorDev = -1; /**< indicates major num for device */
-static BOOL Registered = FALSE;
+static struct cdev file_cdev;
+static VISORCHANNEL **file_controlvm_channel;
+static dev_t majordev = -1; /**< indicates major num for device */
+static BOOL registered = FALSE;
 
 static int visorchipset_open(struct inode *inode, struct file *file);
 static int visorchipset_release(struct inode *inode, struct file *file);
@@ -61,50 +61,50 @@ int visorchipset_file_init(dev_t major_dev, VISORCHANNEL **controlvm_channel)
 {
 	int rc = 0;
 
-	PControlVm_channel = controlvm_channel;
-	MajorDev = major_dev;
-	cdev_init(&Cdev, &visorchipset_fops);
-	Cdev.owner = THIS_MODULE;
-	if (MAJOR(MajorDev) == 0) {
+	file_controlvm_channel = controlvm_channel;
+	majordev = major_dev;
+	cdev_init(&file_cdev, &visorchipset_fops);
+	file_cdev.owner = THIS_MODULE;
+	if (MAJOR(majordev) == 0) {
 		/* dynamic major device number registration required */
-		if (alloc_chrdev_region(&MajorDev, 0, 1, MYDRVNAME) < 0) {
+		if (alloc_chrdev_region(&majordev, 0, 1, MYDRVNAME) < 0) {
 			ERRDRV("Unable to allocate+register char device %s",
 			       MYDRVNAME);
 			return -1;
 		}
-		Registered = TRUE;
-		INFODRV("New major number %d registered\n", MAJOR(MajorDev));
+		registered = TRUE;
+		INFODRV("New major number %d registered\n", MAJOR(majordev));
 	} else {
 		/* static major device number registration required */
-		if (register_chrdev_region(MajorDev, 1, MYDRVNAME) < 0) {
+		if (register_chrdev_region(majordev, 1, MYDRVNAME) < 0) {
 			ERRDRV("Unable to register char device %s", MYDRVNAME);
 			return -1;
 		}
-		Registered = TRUE;
-		INFODRV("Static major number %d registered\n", MAJOR(MajorDev));
+		registered = TRUE;
+		INFODRV("Static major number %d registered\n", MAJOR(majordev));
 	}
-	rc = cdev_add(&Cdev, MKDEV(MAJOR(MajorDev), 0), 1);
+	rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1);
 	if (rc  < 0) {
 		ERRDRV("failed to create char device: (status=%d)\n", rc);
 		return -1;
 	}
 	INFODRV("Registered char device for %s (major=%d)",
-		MYDRVNAME, MAJOR(MajorDev));
+		MYDRVNAME, MAJOR(majordev));
 	return 0;
 }
 
 void
 visorchipset_file_cleanup(void)
 {
-	if (Cdev.ops != NULL)
-		cdev_del(&Cdev);
-	Cdev.ops = NULL;
-	if (Registered) {
-		if (MAJOR(MajorDev) >= 0) {
-			unregister_chrdev_region(MajorDev, 1);
-			MajorDev = MKDEV(0, 0);
+	if (file_cdev.ops != NULL)
+		cdev_del(&file_cdev);
+	file_cdev.ops = NULL;
+	if (registered) {
+		if (MAJOR(majordev) >= 0) {
+			unregister_chrdev_region(majordev, 1);
+			majordev = MKDEV(0, 0);
 		}
-		Registered = FALSE;
+		registered = FALSE;
 	}
 }
 
@@ -148,11 +148,11 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 	switch (offset) {
 	case VISORCHIPSET_MMAP_CONTROLCHANOFFSET:
 		vma->vm_flags |= VM_IO;
-		if (*PControlVm_channel == NULL) {
+		if (*file_controlvm_channel == NULL) {
 			ERRDRV("%s no controlvm channel yet", __func__);
 			return -ENXIO;
 		}
-		visorchannel_read(*PControlVm_channel,
+		visorchannel_read(*file_controlvm_channel,
 			offsetof(struct spar_controlvm_channel_protocol,
 				 gp_control_channel),
 			&addr, sizeof(addr));
-- 
2.1.0

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

* [PATCH 43/69] staging: unisys: get rid of HAVE_UNLOCKED_IOCTL code
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (41 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 42/69] staging: unisys: fix CamelCase global variables in file.c Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 44/69] staging: unisys: get rid of goto in visorchipset_open() Benjamin Romer
                   ` (25 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

We definitely have it, so there's no point in keeping the older stuff
around. Get rid of the #ifdefs and old code.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/file.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index f4d01ed..4b0c158 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -36,23 +36,14 @@ static BOOL registered = FALSE;
 static int visorchipset_open(struct inode *inode, struct file *file);
 static int visorchipset_release(struct inode *inode, struct file *file);
 static int visorchipset_mmap(struct file *file, struct vm_area_struct *vma);
-#ifdef HAVE_UNLOCKED_IOCTL
 long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
-#else
-int visorchipset_ioctl(struct inode *inode, struct file *file,
-		       unsigned int cmd, unsigned long arg);
-#endif
 
 static const struct file_operations visorchipset_fops = {
 	.owner = THIS_MODULE,
 	.open = visorchipset_open,
 	.read = NULL,
 	.write = NULL,
-#ifdef HAVE_UNLOCKED_IOCTL
 	.unlocked_ioctl = visorchipset_ioctl,
-#else
-	.ioctl = visorchipset_ioctl,
-#endif
 	.release = visorchipset_release,
 	.mmap = visorchipset_mmap,
 };
@@ -178,14 +169,7 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 	return 0;
 }
 
-#ifdef HAVE_UNLOCKED_IOCTL
-long
-visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
-#else
-int
-visorchipset_ioctl(struct inode *inode, struct file *file,
-		   unsigned int cmd, unsigned long arg)
-#endif
+long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	int rc = SUCCESS;
 	s64 adjustment;
-- 
2.1.0

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

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

* [PATCH 44/69] staging: unisys: get rid of goto in visorchipset_open()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (42 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 43/69] staging: unisys: get rid of HAVE_UNLOCKED_IOCTL code Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 45/69] staging: unisys: fix CamelCase in visorchipset_mmap() Benjamin Romer
                   ` (24 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

This goto uses CamelCase and was completely unnecessary.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/file.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index 4b0c158..d43c403 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -103,17 +103,12 @@ static int
 visorchipset_open(struct inode *inode, struct file *file)
 {
 	unsigned minor_number = iminor(inode);
-	int rc = -ENODEV;
 
 	DEBUGDRV("%s", __func__);
 	if (minor_number != 0)
-		goto Away;
+		return -ENODEV;
 	file->private_data = NULL;
-	rc = 0;
-Away:
-	if (rc < 0)
-		ERRDRV("%s minor=%d failed", __func__, minor_number);
-	return rc;
+	return 0;
 }
 
 static int
-- 
2.1.0

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

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

* [PATCH 45/69] staging: unisys: fix CamelCase in visorchipset_mmap()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (43 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 44/69] staging: unisys: get rid of goto in visorchipset_open() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 46/69] staging: unisys: get rid of goto in visorchipset_ioctl() Benjamin Romer
                   ` (23 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Fix CamelCase name:

physAddr => physaddr

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/file.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index d43c403..b82bc4a 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -121,7 +121,7 @@ visorchipset_release(struct inode *inode, struct file *file)
 static int
 visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 {
-	ulong physAddr = 0;
+	ulong physaddr = 0;
 	ulong offset = vma->vm_pgoff << PAGE_SHIFT;
 	GUEST_PHYSICAL_ADDRESS addr = 0;
 
@@ -146,10 +146,10 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 			ERRDRV("%s control channel address is 0", __func__);
 			return -ENXIO;
 		}
-		physAddr = (ulong) (addr);
-		DEBUGDRV("mapping physical address = 0x%lx", physAddr);
+		physaddr = (ulong)addr;
+		DEBUGDRV("mapping physical address = 0x%lx", physaddr);
 		if (remap_pfn_range(vma, vma->vm_start,
-				    physAddr >> PAGE_SHIFT,
+				    physaddr >> PAGE_SHIFT,
 				    vma->vm_end - vma->vm_start,
 				    /*pgprot_noncached */
 				    (vma->vm_page_prot))) {
-- 
2.1.0

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

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

* [PATCH 46/69] staging: unisys: get rid of goto in visorchipset_ioctl()
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (44 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 45/69] staging: unisys: fix CamelCase in visorchipset_mmap() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 47/69] staging: unisys: visorchannel: Rename CamelCase variable channelBytes Benjamin Romer
                   ` (22 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: jkc, driverdev-devel, sparmaintainer, Benjamin Romer, Ken Depro

Remove another completely unnecessary goto and just return the values
directly.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchipset/file.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index b82bc4a..ced3fbe 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -166,7 +166,6 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 
 long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	int rc = SUCCESS;
 	s64 adjustment;
 	s64 vrtc_offset;
 
@@ -177,28 +176,21 @@ long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		vrtc_offset = issue_vmcall_query_guest_virtual_time_offset();
 		if (copy_to_user
 		    ((void __user *)arg, &vrtc_offset, sizeof(vrtc_offset))) {
-			rc = -EFAULT;
-			goto Away;
+			return -EFAULT;
 		}
 		DBGINF("insde visorchipset_ioctl, cmd=%d, vrtc_offset=%lld",
 		       cmd, vrtc_offset);
-		break;
+		return SUCCESS;
 	case VMCALL_UPDATE_PHYSICAL_TIME:
 		if (copy_from_user
 		    (&adjustment, (void __user *)arg, sizeof(adjustment))) {
-			rc = -EFAULT;
-			goto Away;
+			return -EFAULT;
 		}
 		DBGINF("insde visorchipset_ioctl, cmd=%d, adjustment=%lld", cmd,
 		       adjustment);
-		rc = issue_vmcall_update_physical_time(adjustment);
-		break;
+		return issue_vmcall_update_physical_time(adjustment);
 	default:
 		LOGERR("visorchipset_ioctl received invalid command");
-		rc = -EFAULT;
-		break;
+		return -EFAULT;
 	}
-Away:
-	DBGINF("exiting %d!", rc);
-	return rc;
 }
-- 
2.1.0

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

* [PATCH 47/69] staging: unisys: visorchannel: Rename CamelCase variable channelBytes
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (45 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 46/69] staging: unisys: get rid of goto in visorchipset_ioctl() Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 48/69] staging: unisys: visorchannel: Rename CamelCase variable nQueues Benjamin Romer
                   ` (21 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Bryan Thompson, Benjamin Romer

From: Bryan Thompson <bryan.thompson@unisys.com>

Rename channelBytes to channel_bytes in the series of visorchannel_create
functions provided by visorchannel.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel.h | 10 ++++-----
 .../unisys/visorchannel/visorchannel_funcs.c       | 26 +++++++++++-----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel.h b/drivers/staging/unisys/visorchannel/visorchannel.h
index 5061edf..5dbfddb 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel.h
+++ b/drivers/staging/unisys/visorchannel/visorchannel.h
@@ -35,17 +35,17 @@
 typedef struct VISORCHANNEL_Tag VISORCHANNEL;
 
 /* Note that for visorchannel_create() and visorchannel_create_overlapped(),
- * <channelBytes> and <guid> arguments may be 0 if we are a channel CLIENT.
+ * <channel_bytes> and <guid> arguments may be 0 if we are a channel CLIENT.
  * In this case, the values can simply be read from the channel header.
  */
 VISORCHANNEL *visorchannel_create(HOSTADDRESS physaddr,
-				  ulong channelBytes, uuid_le guid);
-VISORCHANNEL *visorchannel_create_overlapped(ulong channelBytes,
+				  ulong channel_bytes, uuid_le guid);
+VISORCHANNEL *visorchannel_create_overlapped(ulong channel_bytes,
 					     VISORCHANNEL *parent, ulong off,
 					     uuid_le guid);
 VISORCHANNEL *visorchannel_create_with_lock(HOSTADDRESS physaddr,
-					    ulong channelBytes, uuid_le guid);
-VISORCHANNEL *visorchannel_create_overlapped_with_lock(ulong channelBytes,
+					    ulong channel_bytes, uuid_le guid);
+VISORCHANNEL *visorchannel_create_overlapped_with_lock(ulong channel_bytes,
 						       VISORCHANNEL *parent,
 						       ulong off, uuid_le guid);
 void visorchannel_destroy(VISORCHANNEL *channel);
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 36559d5..6601b3e 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -49,7 +49,7 @@ struct VISORCHANNEL_Tag {
  * NOT modify this data area.
  */
 static VISORCHANNEL *
-visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
+visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
 			 VISORCHANNEL *parent, ulong off, uuid_le guid,
 			 BOOL needs_lock)
 {
@@ -87,18 +87,18 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
 		rc = NULL;
 		goto cleanup;
 	}
-	if (channelBytes == 0)
+	if (channel_bytes == 0)
 		/* we had better be a CLIENT of this channel */
-		channelBytes = (ulong)p->chan_hdr.size;
+		channel_bytes = (ulong)p->chan_hdr.size;
 	if (uuid_le_cmp(guid, NULL_UUID_LE) == 0)
 		/* we had better be a CLIENT of this channel */
 		guid = p->chan_hdr.chtype;
-	if (visor_memregion_resize(p->memregion, channelBytes) < 0) {
+	if (visor_memregion_resize(p->memregion, channel_bytes) < 0) {
 		ERRDRV("visor_memregion_resize failed: (status=0)\n");
 		rc = NULL;
 		goto cleanup;
 	}
-	p->size = channelBytes;
+	p->size = channel_bytes;
 	p->guid = guid;
 
 	rc = p;
@@ -114,37 +114,37 @@ cleanup:
 }
 
 VISORCHANNEL *
-visorchannel_create(HOSTADDRESS physaddr, ulong channelBytes, uuid_le guid)
+visorchannel_create(HOSTADDRESS physaddr, ulong channel_bytes, uuid_le guid)
 {
-	return visorchannel_create_guts(physaddr, channelBytes, NULL, 0, guid,
+	return visorchannel_create_guts(physaddr, channel_bytes, NULL, 0, guid,
 					FALSE);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create);
 
 VISORCHANNEL *
-visorchannel_create_with_lock(HOSTADDRESS physaddr, ulong channelBytes,
+visorchannel_create_with_lock(HOSTADDRESS physaddr, ulong channel_bytes,
 			      uuid_le guid)
 {
-	return visorchannel_create_guts(physaddr, channelBytes, NULL, 0, guid,
+	return visorchannel_create_guts(physaddr, channel_bytes, NULL, 0, guid,
 					TRUE);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create_with_lock);
 
 VISORCHANNEL *
-visorchannel_create_overlapped(ulong channelBytes,
+visorchannel_create_overlapped(ulong channel_bytes,
 			       VISORCHANNEL *parent, ulong off, uuid_le guid)
 {
-	return visorchannel_create_guts(0, channelBytes, parent, off, guid,
+	return visorchannel_create_guts(0, channel_bytes, parent, off, guid,
 					FALSE);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create_overlapped);
 
 VISORCHANNEL *
-visorchannel_create_overlapped_with_lock(ulong channelBytes,
+visorchannel_create_overlapped_with_lock(ulong channel_bytes,
 					 VISORCHANNEL *parent, ulong off,
 					 uuid_le guid)
 {
-	return visorchannel_create_guts(0, channelBytes, parent, off, guid,
+	return visorchannel_create_guts(0, channel_bytes, parent, off, guid,
 					TRUE);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create_overlapped_with_lock);
-- 
2.1.0

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

* [PATCH 48/69] staging: unisys: visorchannel: Rename CamelCase variable nQueues
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (46 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 47/69] staging: unisys: visorchannel: Rename CamelCase variable channelBytes Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 49/69] staging: unisys: visorchannel: Describe spinlocks in VISORCHANNEL_Tag struct Benjamin Romer
                   ` (20 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Bryan Thompson, Benjamin Romer

From: Bryan Thompson <bryan.thompson@unisys.com>

Rename the visorchannel_debug parameter nQueues to num_queues.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel.h       | 2 +-
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel.h b/drivers/staging/unisys/visorchannel/visorchannel.h
index 5dbfddb..3f2184c 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel.h
+++ b/drivers/staging/unisys/visorchannel/visorchannel.h
@@ -68,7 +68,7 @@ u64 visorchannel_get_clientpartition(VISORCHANNEL *channel);
 uuid_le visorchannel_get_uuid(VISORCHANNEL *channel);
 struct memregion *visorchannel_get_memregion(VISORCHANNEL *channel);
 char *visorchannel_uuid_id(uuid_le *guid, char *s);
-void visorchannel_debug(VISORCHANNEL *channel, int nQueues,
+void visorchannel_debug(VISORCHANNEL *channel, int num_queues,
 			struct seq_file *seq, u32 off);
 void visorchannel_dump_section(VISORCHANNEL *chan, char *s,
 			       int off, int len, struct seq_file *seq);
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 6601b3e..1568b95 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -565,7 +565,7 @@ sigqueue_debug(struct signal_queue_header *q, int which, struct seq_file *seq)
 }
 
 void
-visorchannel_debug(VISORCHANNEL *channel, int nQueues,
+visorchannel_debug(VISORCHANNEL *channel, int num_queues,
 		   struct seq_file *seq, u32 off)
 {
 	HOSTADDRESS addr = 0;
@@ -625,7 +625,7 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
 	if ((phdr->ch_space_offset == 0) || (errcode < 0))
 		;
 	else
-		for (i = 0; i < nQueues; i++) {
+		for (i = 0; i < num_queues; i++) {
 			struct signal_queue_header q;
 
 			errcode = visorchannel_read(channel,
-- 
2.1.0

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

* [PATCH 49/69] staging: unisys: visorchannel: Describe spinlocks in VISORCHANNEL_Tag struct
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (47 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 48/69] staging: unisys: visorchannel: Rename CamelCase variable nQueues Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 50/69] staging: unisys: Remove VISORCHANNEL typedef Benjamin Romer
                   ` (19 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh
  Cc: jkc, driverdev-devel, sparmaintainer, Bryan Thompson, Benjamin Romer

From: Bryan Thompson <bryan.thompson@unisys.com>

Add comments indicating the requirements and use of the insert_lock and
remove_lock in the VISORCHANNEL_Tag structure.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 1568b95..1ce25c2 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -33,9 +33,10 @@ struct VISORCHANNEL_Tag {
 	struct channel_header chan_hdr;
 	uuid_le guid;
 	ulong size;
-	BOOL needs_lock;
-	spinlock_t insert_lock;
-	spinlock_t remove_lock;
+	BOOL needs_lock;	/* channel creator knows if more than one
+				 * thread will be inserting or removing */
+	spinlock_t insert_lock; /* protect head writes in chan_hdr */
+	spinlock_t remove_lock;	/* protect tail writes in chan_hdr */
 
 	struct {
 		struct signal_queue_header req_queue;
-- 
2.1.0

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

* [PATCH 50/69] staging: unisys: Remove VISORCHANNEL typedef
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (48 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 49/69] staging: unisys: visorchannel: Describe spinlocks in VISORCHANNEL_Tag struct Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 51/69] staging: unisys: remove ERRDRV and related macros Benjamin Romer
                   ` (18 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Bryan Thompson <bryan.thompson@unisys.com>

Remove the VISORCHANNEL typedef and rename the base VISORCHANNEL_Tag
structure to visorchannel to follow consistent naming. The longer
struct visorchannel type required additional line wrapping to remain
less than 81 characters.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel.h | 67 ++++++++++----------
 .../unisys/visorchannel/visorchannel_funcs.c       | 72 +++++++++++-----------
 drivers/staging/unisys/visorchipset/file.c         |  5 +-
 drivers/staging/unisys/visorchipset/file.h         |  3 +-
 .../unisys/visorchipset/visorchipset_main.c        |  2 +-
 5 files changed, 76 insertions(+), 73 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel.h b/drivers/staging/unisys/visorchannel/visorchannel.h
index 3f2184c..63f1b97 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel.h
+++ b/drivers/staging/unisys/visorchannel/visorchannel.h
@@ -29,49 +29,48 @@
 #define BOOL int
 #endif
 
-/* VISORCHANNEL is an opaque structure to users.
- * Fields are declared only in the implementation .c files.
- */
-typedef struct VISORCHANNEL_Tag VISORCHANNEL;
-
 /* Note that for visorchannel_create() and visorchannel_create_overlapped(),
  * <channel_bytes> and <guid> arguments may be 0 if we are a channel CLIENT.
  * In this case, the values can simply be read from the channel header.
  */
-VISORCHANNEL *visorchannel_create(HOSTADDRESS physaddr,
-				  ulong channel_bytes, uuid_le guid);
-VISORCHANNEL *visorchannel_create_overlapped(ulong channel_bytes,
-					     VISORCHANNEL *parent, ulong off,
-					     uuid_le guid);
-VISORCHANNEL *visorchannel_create_with_lock(HOSTADDRESS physaddr,
-					    ulong channel_bytes, uuid_le guid);
-VISORCHANNEL *visorchannel_create_overlapped_with_lock(ulong channel_bytes,
-						       VISORCHANNEL *parent,
-						       ulong off, uuid_le guid);
-void visorchannel_destroy(VISORCHANNEL *channel);
-int visorchannel_read(VISORCHANNEL *channel, ulong offset,
+struct visorchannel *visorchannel_create(HOSTADDRESS physaddr,
+					 ulong channel_bytes, uuid_le guid);
+struct visorchannel *visorchannel_create_overlapped(ulong channel_bytes,
+						    struct visorchannel *parent,
+						    ulong off, uuid_le guid);
+struct visorchannel *visorchannel_create_with_lock(HOSTADDRESS physaddr,
+						   ulong channel_bytes,
+						   uuid_le guid);
+struct visorchannel *visorchannel_create_overlapped_with_lock(
+				ulong channel_bytes,
+				struct visorchannel *parent,
+				ulong off, uuid_le guid);
+void visorchannel_destroy(struct visorchannel *channel);
+int visorchannel_read(struct visorchannel *channel, ulong offset,
 		      void *local, ulong nbytes);
-int visorchannel_write(VISORCHANNEL *channel, ulong offset,
+int visorchannel_write(struct visorchannel *channel, ulong offset,
 		       void *local, ulong nbytes);
-int visorchannel_clear(VISORCHANNEL *channel, ulong offset,
+int visorchannel_clear(struct visorchannel *channel, ulong offset,
 		       u8 ch, ulong nbytes);
-BOOL visorchannel_signalremove(VISORCHANNEL *channel, u32 queue, void *msg);
-BOOL visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg);
-int visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue);
-int visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, u32 queue);
-
-HOSTADDRESS visorchannel_get_physaddr(VISORCHANNEL *channel);
-ulong visorchannel_get_nbytes(VISORCHANNEL *channel);
-char *visorchannel_id(VISORCHANNEL *channel, char *s);
-char *visorchannel_zoneid(VISORCHANNEL *channel, char *s);
-u64 visorchannel_get_clientpartition(VISORCHANNEL *channel);
-uuid_le visorchannel_get_uuid(VISORCHANNEL *channel);
-struct memregion *visorchannel_get_memregion(VISORCHANNEL *channel);
+BOOL visorchannel_signalremove(struct visorchannel *channel, u32 queue,
+			       void *msg);
+BOOL visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
+			       void *msg);
+int visorchannel_signalqueue_slots_avail(struct visorchannel *channel,
+					 u32 queue);
+int visorchannel_signalqueue_max_slots(struct visorchannel *channel, u32 queue);
+HOSTADDRESS visorchannel_get_physaddr(struct visorchannel *channel);
+ulong visorchannel_get_nbytes(struct visorchannel *channel);
+char *visorchannel_id(struct visorchannel *channel, char *s);
+char *visorchannel_zoneid(struct visorchannel *channel, char *s);
+u64 visorchannel_get_clientpartition(struct visorchannel *channel);
+uuid_le visorchannel_get_uuid(struct visorchannel *channel);
+struct memregion *visorchannel_get_memregion(struct visorchannel *channel);
 char *visorchannel_uuid_id(uuid_le *guid, char *s);
-void visorchannel_debug(VISORCHANNEL *channel, int num_queues,
+void visorchannel_debug(struct visorchannel *channel, int num_queues,
 			struct seq_file *seq, u32 off);
-void visorchannel_dump_section(VISORCHANNEL *chan, char *s,
+void visorchannel_dump_section(struct visorchannel *chan, char *s,
 			       int off, int len, struct seq_file *seq);
-void __iomem *visorchannel_get_header(VISORCHANNEL *channel);
+void __iomem *visorchannel_get_header(struct visorchannel *channel);
 
 #endif
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 1ce25c2..6c48ba1 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -28,7 +28,7 @@
 
 #define MYDRVNAME "visorchannel"
 
-struct VISORCHANNEL_Tag {
+struct visorchannel {
 	struct memregion *memregion;	/* from visor_memregion_create() */
 	struct channel_header chan_hdr;
 	uuid_le guid;
@@ -46,18 +46,18 @@ struct VISORCHANNEL_Tag {
 	} safe_uis_queue;
 };
 
-/* Creates the VISORCHANNEL abstraction for a data area in memory, but does
- * NOT modify this data area.
+/* Creates the struct visorchannel abstraction for a data area in memory,
+ * but does NOT modify this data area.
  */
-static VISORCHANNEL *
+static struct visorchannel *
 visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
-			 VISORCHANNEL *parent, ulong off, uuid_le guid,
+			 struct visorchannel *parent, ulong off, uuid_le guid,
 			 BOOL needs_lock)
 {
-	VISORCHANNEL *p = NULL;
+	struct visorchannel *p = NULL;
 	void *rc = NULL;
 
-	p = kmalloc(sizeof(VISORCHANNEL), GFP_KERNEL|__GFP_NORETRY);
+	p = kmalloc(sizeof(*p), GFP_KERNEL|__GFP_NORETRY);
 	if (p == NULL) {
 		ERRDRV("allocation failed: (status=0)\n");
 		rc = NULL;
@@ -114,7 +114,7 @@ cleanup:
 	return rc;
 }
 
-VISORCHANNEL *
+struct visorchannel *
 visorchannel_create(HOSTADDRESS physaddr, ulong channel_bytes, uuid_le guid)
 {
 	return visorchannel_create_guts(physaddr, channel_bytes, NULL, 0, guid,
@@ -122,7 +122,7 @@ visorchannel_create(HOSTADDRESS physaddr, ulong channel_bytes, uuid_le guid)
 }
 EXPORT_SYMBOL_GPL(visorchannel_create);
 
-VISORCHANNEL *
+struct visorchannel *
 visorchannel_create_with_lock(HOSTADDRESS physaddr, ulong channel_bytes,
 			      uuid_le guid)
 {
@@ -131,18 +131,19 @@ visorchannel_create_with_lock(HOSTADDRESS physaddr, ulong channel_bytes,
 }
 EXPORT_SYMBOL_GPL(visorchannel_create_with_lock);
 
-VISORCHANNEL *
+struct visorchannel *
 visorchannel_create_overlapped(ulong channel_bytes,
-			       VISORCHANNEL *parent, ulong off, uuid_le guid)
+			       struct visorchannel *parent, ulong off,
+			       uuid_le guid)
 {
 	return visorchannel_create_guts(0, channel_bytes, parent, off, guid,
 					FALSE);
 }
 EXPORT_SYMBOL_GPL(visorchannel_create_overlapped);
 
-VISORCHANNEL *
+struct visorchannel *
 visorchannel_create_overlapped_with_lock(ulong channel_bytes,
-					 VISORCHANNEL *parent, ulong off,
+					 struct visorchannel *parent, ulong off,
 					 uuid_le guid)
 {
 	return visorchannel_create_guts(0, channel_bytes, parent, off, guid,
@@ -151,7 +152,7 @@ visorchannel_create_overlapped_with_lock(ulong channel_bytes,
 EXPORT_SYMBOL_GPL(visorchannel_create_overlapped_with_lock);
 
 void
-visorchannel_destroy(VISORCHANNEL *channel)
+visorchannel_destroy(struct visorchannel *channel)
 {
 	if (channel == NULL)
 		return;
@@ -164,14 +165,14 @@ visorchannel_destroy(VISORCHANNEL *channel)
 EXPORT_SYMBOL_GPL(visorchannel_destroy);
 
 HOSTADDRESS
-visorchannel_get_physaddr(VISORCHANNEL *channel)
+visorchannel_get_physaddr(struct visorchannel *channel)
 {
 	return visor_memregion_get_physaddr(channel->memregion);
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_physaddr);
 
 ulong
-visorchannel_get_nbytes(VISORCHANNEL *channel)
+visorchannel_get_nbytes(struct visorchannel *channel)
 {
 	return channel->size;
 }
@@ -186,42 +187,42 @@ visorchannel_uuid_id(uuid_le *guid, char *s)
 EXPORT_SYMBOL_GPL(visorchannel_uuid_id);
 
 char *
-visorchannel_id(VISORCHANNEL *channel, char *s)
+visorchannel_id(struct visorchannel *channel, char *s)
 {
 	return visorchannel_uuid_id(&channel->guid, s);
 }
 EXPORT_SYMBOL_GPL(visorchannel_id);
 
 char *
-visorchannel_zoneid(VISORCHANNEL *channel, char *s)
+visorchannel_zoneid(struct visorchannel *channel, char *s)
 {
 	return visorchannel_uuid_id(&channel->chan_hdr.zone_uuid, s);
 }
 EXPORT_SYMBOL_GPL(visorchannel_zoneid);
 
 HOSTADDRESS
-visorchannel_get_clientpartition(VISORCHANNEL *channel)
+visorchannel_get_clientpartition(struct visorchannel *channel)
 {
 	return channel->chan_hdr.partition_handle;
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_clientpartition);
 
 uuid_le
-visorchannel_get_uuid(VISORCHANNEL *channel)
+visorchannel_get_uuid(struct visorchannel *channel)
 {
 	return channel->guid;
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_uuid);
 
 struct memregion *
-visorchannel_get_memregion(VISORCHANNEL *channel)
+visorchannel_get_memregion(struct visorchannel *channel)
 {
 	return channel->memregion;
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_memregion);
 
 int
-visorchannel_read(VISORCHANNEL *channel, ulong offset,
+visorchannel_read(struct visorchannel *channel, ulong offset,
 		  void *local, ulong nbytes)
 {
 	int rc = visor_memregion_read(channel->memregion, offset,
@@ -236,7 +237,7 @@ visorchannel_read(VISORCHANNEL *channel, ulong offset,
 EXPORT_SYMBOL_GPL(visorchannel_read);
 
 int
-visorchannel_write(VISORCHANNEL *channel, ulong offset,
+visorchannel_write(struct visorchannel *channel, ulong offset,
 		   void *local, ulong nbytes)
 {
 	if (offset == 0 && nbytes >= sizeof(struct channel_header))
@@ -247,7 +248,8 @@ visorchannel_write(VISORCHANNEL *channel, ulong offset,
 EXPORT_SYMBOL_GPL(visorchannel_write);
 
 int
-visorchannel_clear(VISORCHANNEL *channel, ulong offset, u8 ch, ulong nbytes)
+visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch,
+		   ulong nbytes)
 {
 	int rc = -1;
 	int bufsize = 65536;
@@ -286,7 +288,7 @@ cleanup:
 EXPORT_SYMBOL_GPL(visorchannel_clear);
 
 void __iomem  *
-visorchannel_get_header(VISORCHANNEL *channel)
+visorchannel_get_header(struct visorchannel *channel)
 {
 	return (void __iomem *)&channel->chan_hdr;
 }
@@ -317,7 +319,7 @@ EXPORT_SYMBOL_GPL(visorchannel_get_header);
 			       sizeof((sig_hdr)->FIELD)) >= 0)
 
 static BOOL
-sig_read_header(VISORCHANNEL *channel, u32 queue,
+sig_read_header(struct visorchannel *channel, u32 queue,
 		struct signal_queue_header *sig_hdr)
 {
 	BOOL rc = FALSE;
@@ -345,7 +347,7 @@ cleanup:
 }
 
 static BOOL
-sig_do_data(VISORCHANNEL *channel, u32 queue,
+sig_do_data(struct visorchannel *channel, u32 queue,
 	    struct signal_queue_header *sig_hdr, u32 slot, void *data,
 	    BOOL is_write)
 {
@@ -374,14 +376,14 @@ cleanup:
 }
 
 static inline BOOL
-sig_read_data(VISORCHANNEL *channel, u32 queue,
+sig_read_data(struct visorchannel *channel, u32 queue,
 	      struct signal_queue_header *sig_hdr, u32 slot, void *data)
 {
 	return sig_do_data(channel, queue, sig_hdr, slot, data, FALSE);
 }
 
 static inline BOOL
-sig_write_data(VISORCHANNEL *channel, u32 queue,
+sig_write_data(struct visorchannel *channel, u32 queue,
 	       struct signal_queue_header *sig_hdr, u32 slot, void *data)
 {
 	return sig_do_data(channel, queue, sig_hdr, slot, data, TRUE);
@@ -410,7 +412,7 @@ safe_sig_queue_validate(struct signal_queue_header *psafe_sqh,
 }				/* end safe_sig_queue_validate */
 
 BOOL
-visorchannel_signalremove(VISORCHANNEL *channel, u32 queue, void *msg)
+visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
 {
 	BOOL rc = FALSE;
 	struct signal_queue_header sig_hdr;
@@ -457,7 +459,7 @@ cleanup:
 EXPORT_SYMBOL_GPL(visorchannel_signalremove);
 
 BOOL
-visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg)
+visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 {
 	BOOL rc = FALSE;
 	struct signal_queue_header sig_hdr;
@@ -512,7 +514,7 @@ cleanup:
 EXPORT_SYMBOL_GPL(visorchannel_signalinsert);
 
 int
-visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue)
+visorchannel_signalqueue_slots_avail(struct visorchannel *channel, u32 queue)
 {
 	struct signal_queue_header sig_hdr;
 	u32 slots_avail, slots_used;
@@ -531,7 +533,7 @@ visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue)
 EXPORT_SYMBOL_GPL(visorchannel_signalqueue_slots_avail);
 
 int
-visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, u32 queue)
+visorchannel_signalqueue_max_slots(struct visorchannel *channel, u32 queue)
 {
 	struct signal_queue_header sig_hdr;
 
@@ -566,7 +568,7 @@ sigqueue_debug(struct signal_queue_header *q, int which, struct seq_file *seq)
 }
 
 void
-visorchannel_debug(VISORCHANNEL *channel, int num_queues,
+visorchannel_debug(struct visorchannel *channel, int num_queues,
 		   struct seq_file *seq, u32 off)
 {
 	HOSTADDRESS addr = 0;
@@ -648,7 +650,7 @@ visorchannel_debug(VISORCHANNEL *channel, int num_queues,
 EXPORT_SYMBOL_GPL(visorchannel_debug);
 
 void
-visorchannel_dump_section(VISORCHANNEL *chan, char *s,
+visorchannel_dump_section(struct visorchannel *chan, char *s,
 			  int off, int len, struct seq_file *seq)
 {
 	char *buf, *tbuf, *fmtbuf;
diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index ced3fbe..e51fd4e 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -29,7 +29,7 @@
 #define CURRENT_FILE_PC VISOR_CHIPSET_PC_file_c
 
 static struct cdev file_cdev;
-static VISORCHANNEL **file_controlvm_channel;
+static struct visorchannel **file_controlvm_channel;
 static dev_t majordev = -1; /**< indicates major num for device */
 static BOOL registered = FALSE;
 
@@ -48,7 +48,8 @@ static const struct file_operations visorchipset_fops = {
 	.mmap = visorchipset_mmap,
 };
 
-int visorchipset_file_init(dev_t major_dev, VISORCHANNEL **controlvm_channel)
+int
+visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel)
 {
 	int rc = 0;
 
diff --git a/drivers/staging/unisys/visorchipset/file.h b/drivers/staging/unisys/visorchipset/file.h
index fb434eb..dc7a195 100644
--- a/drivers/staging/unisys/visorchipset/file.h
+++ b/drivers/staging/unisys/visorchipset/file.h
@@ -20,7 +20,8 @@
 
 #include "globals.h"
 
-int visorchipset_file_init(dev_t major_dev, VISORCHANNEL **controlvm_channel);
+int visorchipset_file_init(dev_t majorDev,
+			   struct visorchannel **pControlVm_channel);
 void visorchipset_file_cleanup(void);
 
 #endif
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 2651f89..82e259d 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -101,7 +101,7 @@ static struct controlvm_message_packet g_DeviceChangeStatePacket;
 static LIST_HEAD(BusInfoList);
 static LIST_HEAD(DevInfoList);
 
-static VISORCHANNEL *ControlVm_channel;
+static struct visorchannel *ControlVm_channel;
 
 typedef struct {
 	u8 __iomem *ptr;	/* pointer to base address of payload pool */
-- 
2.1.0

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

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

* [PATCH 51/69] staging: unisys: remove ERRDRV and related macros
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (49 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 50/69] staging: unisys: Remove VISORCHANNEL typedef Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2015-01-10  1:36   ` Greg KH
  2014-12-05 22:09 ` [PATCH 52/69] staging: unisys: remove DBGINF() macros Benjamin Romer
                   ` (17 subsequent siblings)
  68 siblings, 1 reply; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Remove the ERRDRV() macro family and use pr_err directly everywhere it was used.
Completely remove any error messages that used the macro but are redundant, for
example, several of the messages were from memory allocation failures.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/include/timskmod.h          |   9 +-
 drivers/staging/unisys/include/uisutils.h          |   4 +-
 drivers/staging/unisys/include/uniklog.h           |  38 ------
 drivers/staging/unisys/uislib/uislib.c             | 120 +++++++++---------
 drivers/staging/unisys/uislib/uisqueue.c           |   4 +-
 drivers/staging/unisys/uislib/uisthread.c          |   4 +-
 drivers/staging/unisys/uislib/uisutils.c           |  24 ++--
 drivers/staging/unisys/virthba/virthba.c           |  87 ++++++-------
 drivers/staging/unisys/virtpci/virtpci.c           |  71 ++++++-----
 .../unisys/visorchannel/visorchannel_funcs.c       |  41 +++---
 drivers/staging/unisys/visorchipset/file.c         |  16 +--
 drivers/staging/unisys/visorchipset/parser.c       |  39 +++---
 .../unisys/visorchipset/visorchipset_main.c        | 140 ++++++++++-----------
 drivers/staging/unisys/visorutil/charqueue.c       |   2 +-
 drivers/staging/unisys/visorutil/easyproc.c        |  25 ++--
 .../staging/unisys/visorutil/memregion_direct.c    |  18 ++-
 drivers/staging/unisys/visorutil/periodic_work.c   |   8 +-
 drivers/staging/unisys/visorutil/procobjecttree.c  |  30 +++--
 18 files changed, 308 insertions(+), 372 deletions(-)

diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h
index cff7983..7831dbc 100644
--- a/drivers/staging/unisys/include/timskmod.h
+++ b/drivers/staging/unisys/include/timskmod.h
@@ -73,7 +73,7 @@
  */
 #define ASSERT(cond)                                           \
 	do { if (!(cond))                                      \
-			HUHDRV("ASSERT failed - %s",	       \
+			pr_err("ASSERT failed - %s",	       \
 			       __stringify(cond));	       \
 	} while (0)
 
@@ -88,19 +88,12 @@
 	} while (0)
 
 #define PRINTKDRV(fmt, args...) LOGINF(fmt, ## args)
-#define TBDDRV(fmt, args...)    LOGERR(fmt, ## args)
-#define HUHDRV(fmt, args...)    LOGERR(fmt, ## args)
-#define ERRDRV(fmt, args...)    LOGERR(fmt, ## args)
 #define WARNDRV(fmt, args...)   LOGWRN(fmt, ## args)
 #define SECUREDRV(fmt, args...) LOGWRN(fmt, ## args)
 #define INFODRV(fmt, args...)   LOGINF(fmt, ## args)
 #define DEBUGDRV(fmt, args...)  DBGINF(fmt, ## args)
 
 #define PRINTKDEV(devname, fmt, args...)  LOGINFDEV(devname, fmt, ## args)
-#define TBDDEV(devname, fmt, args...)     LOGERRDEV(devname, fmt, ## args)
-#define HUHDEV(devname, fmt, args...)     LOGERRDEV(devname, fmt, ## args)
-#define ERRDEV(devname, fmt, args...)     LOGERRDEV(devname, fmt, ## args)
-#define ERRDEVX(devno, fmt, args...)	  LOGERRDEVX(devno, fmt, ## args)
 #define WARNDEV(devname, fmt, args...)    LOGWRNDEV(devname, fmt, ## args)
 #define SECUREDEV(devname, fmt, args...)  LOGWRNDEV(devname, fmt, ## args)
 #define INFODEV(devname, fmt, args...)    LOGINFDEV(devname, fmt, ## args)
diff --git a/drivers/staging/unisys/include/uisutils.h b/drivers/staging/unisys/include/uisutils.h
index 7414220..f937892 100644
--- a/drivers/staging/unisys/include/uisutils.h
+++ b/drivers/staging/unisys/include/uisutils.h
@@ -206,10 +206,10 @@ wait_for_valid_guid(uuid_le __iomem *guid)
 			      (void __iomem *)guid, sizeof(uuid_le));
 		if (uuid_le_cmp(tmpguid, NULL_UUID_LE) != 0)
 			break;
-		LOGERR("Waiting for non-0 GUID (why???)...\n");
+		pr_err("Waiting for non-0 GUID (why???)...\n");
 		UIS_THREAD_WAIT_SEC(5);
 	}
-	LOGERR("OK... GUID is non-0 now\n");
+	pr_err("OK... GUID is non-0 now\n");
 }
 
 /* CopyFragsInfoFromSkb returns the number of entries added to frags array
diff --git a/drivers/staging/unisys/include/uniklog.h b/drivers/staging/unisys/include/uniklog.h
index ecd1bdb..e94120b 100644
--- a/drivers/staging/unisys/include/uniklog.h
+++ b/drivers/staging/unisys/include/uniklog.h
@@ -122,44 +122,6 @@
 	} while (0)
 
 /*
- * # LOGERR
- *
- * \brief Log error message - logs a message at the LOG_ERR level,
- *        including source line number information
- *
- * \param devname the device name of the device reporting this message, or
- *                NULL if this message is NOT device-related.
- * \param fmt printf()-style format string containing the message to log.
- * \param args Optional arguments to be formatted and inserted into the format
- * \param string.
- * \return nothing
- *
- * Logs the specified error message at the LOG_ERR level.  It will also
- * include the file, line number, and function name of where the error
- * originated in the log message.
- */
-#define LOGERR(fmt, args...) pr_err(fmt, ## args)
-#define LOGERRDEV(devname, fmt, args...) \
-	pr_err("%s " fmt, devname, ## args)
-#define LOGERRDEVX(devno, fmt, args...) \
-	pr_err("dev%d " fmt, devno, ## args)
-#define LOGERRNAME(vnic, fmt, args...)				\
-	do {								\
-		if (vnic != NULL) {					\
-			pr_err("%s " fmt, vnic->name, ## args);	\
-		} else {						\
-			pr_err(fmt, ## args);				\
-		}							\
-	} while (0)
-#define LOGORDUMPERR(seqfile, fmt, args...) do {		\
-		if (seqfile) {					\
-			seq_printf(seqfile, fmt, ## args);	\
-		} else {					\
-			LOGERR(fmt, ## args);			\
-		}						\
-	} while (0)
-
-/*
  * # LOGWRN
  *
  * \brief Log warning message - Logs a message at the LOG_WARNING level,
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index a9eedde..eb58449 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -133,13 +133,13 @@ static __iomem void *init_vbus_channel(u64 ch_addr, u32 ch_bytes)
 	void __iomem *ch = uislib_ioremap_cache(ch_addr, ch_bytes);
 
 	if (!ch) {
-		LOGERR("CONTROLVM_BUS_CREATE error: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
+		pr_err("CONTROLVM_BUS_CREATE error: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
 		       (unsigned long long)ch_addr,
 		       (unsigned long long)ch_bytes);
 		return NULL;
 	}
 	if (!SPAR_VBUS_CHANNEL_OK_CLIENT(ch)) {
-		ERRDRV("%s channel cannot be used", __func__);
+		pr_err("%s channel cannot be used", __func__);
 		uislib_iounmap(ch);
 		return NULL;
 	}
@@ -154,7 +154,7 @@ create_bus(struct controlvm_message *msg, char *buf)
 	size_t size;
 
 	if (max_bus_count == bus_list_count) {
-		LOGERR("CONTROLVM_BUS_CREATE Failed: max buses:%d already created\n",
+		pr_err("CONTROLVM_BUS_CREATE Failed: max buses:%d already created\n",
 		       max_bus_count);
 		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, max_bus_count,
 				 POSTCODE_SEVERITY_ERR);
@@ -172,7 +172,6 @@ create_bus(struct controlvm_message *msg, char *buf)
 	    (dev_count * sizeof(struct device_info *));
 	bus = kzalloc(size, GFP_ATOMIC);
 	if (!bus) {
-		LOGERR("CONTROLVM_BUS_CREATE Failed: kmalloc for bus failed.\n");
 		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus_no,
 				 POSTCODE_SEVERITY_ERR);
 		return CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
@@ -209,7 +208,7 @@ create_bus(struct controlvm_message *msg, char *buf)
 		/* found a bus already in the list with same bus_no -
 		 * reject add
 		 */
-		LOGERR("CONTROLVM_BUS_CREATE Failed: bus %d already exists.\n",
+		pr_err("CONTROLVM_BUS_CREATE Failed: bus %d already exists.\n",
 		       bus->bus_no);
 		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no,
 				 POSTCODE_SEVERITY_ERR);
@@ -234,14 +233,14 @@ create_bus(struct controlvm_message *msg, char *buf)
 		cmd.add_vbus.bus_uuid = msg->cmd.create_bus.bus_data_type_uuid;
 		cmd.add_vbus.instance_uuid = msg->cmd.create_bus.bus_inst_uuid;
 		if (!virt_control_chan_func) {
-			LOGERR("CONTROLVM_BUS_CREATE Failed: virtpci callback not registered.");
+			pr_err("CONTROLVM_BUS_CREATE Failed: virtpci callback not registered.");
 			POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no,
 					 POSTCODE_SEVERITY_ERR);
 			kfree(bus);
 			return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
 		}
 		if (!virt_control_chan_func(&cmd)) {
-			LOGERR("CONTROLVM_BUS_CREATE Failed: virtpci GUEST_ADD_VBUS returned error.");
+			pr_err("CONTROLVM_BUS_CREATE Failed: virtpci GUEST_ADD_VBUS returned error.");
 			POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no,
 					 POSTCODE_SEVERITY_ERR);
 			kfree(bus);
@@ -287,7 +286,7 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 	}
 
 	if (!bus) {
-		LOGERR("CONTROLVM_BUS_DESTROY Failed: failed to find bus %d.\n",
+		pr_err("CONTROLVM_BUS_DESTROY Failed: failed to find bus %d.\n",
 		       bus_no);
 		read_unlock(&bus_list_lock);
 		return CONTROLVM_RESP_ERROR_ALREADY_DONE;
@@ -296,7 +295,7 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 	/* verify that this bus has no devices. */
 	for (i = 0; i < bus->device_count; i++) {
 		if (bus->device[i] != NULL) {
-			LOGERR("CONTROLVM_BUS_DESTROY Failed: device %i attached to bus %d.",
+			pr_err("CONTROLVM_BUS_DESTROY Failed: device %i attached to bus %d.",
 			       i, bus_no);
 			read_unlock(&bus_list_lock);
 			return CONTROLVM_RESP_ERROR_BUS_DEVICE_ATTACHED;
@@ -312,11 +311,11 @@ destroy_bus(struct controlvm_message *msg, char *buf)
 	cmd.msgtype = GUEST_DEL_VBUS;
 	cmd.del_vbus.bus_no = bus_no;
 	if (!virt_control_chan_func) {
-		LOGERR("CONTROLVM_BUS_DESTROY Failed: virtpci callback not registered.");
+		pr_err("CONTROLVM_BUS_DESTROY Failed: virtpci callback not registered.");
 		return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
 	}
 	if (!virt_control_chan_func(&cmd)) {
-		LOGERR("CONTROLVM_BUS_DESTROY Failed: virtpci GUEST_DEL_VBUS returned error.");
+		pr_err("CONTROLVM_BUS_DESTROY Failed: virtpci GUEST_DEL_VBUS returned error.");
 		return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
 	}
 
@@ -357,7 +356,6 @@ static int create_device(struct controlvm_message *msg, char *buf)
 
 	dev = kzalloc(sizeof(*dev), GFP_ATOMIC);
 	if (!dev) {
-		LOGERR("CONTROLVM_DEVICE_CREATE Failed: kmalloc for dev failed.\n");
 		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
 				 POSTCODE_SEVERITY_ERR);
 		return CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
@@ -381,7 +379,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 			 */
 			min_size = req_handler->min_channel_bytes;
 		if (min_size > msg->cmd.create_device.channel_bytes) {
-			LOGERR("CONTROLVM_DEVICE_CREATE Failed: channel size is too small, channel size:0x%lx, required size:0x%lx",
+			pr_err("CONTROLVM_DEVICE_CREATE Failed: channel size is too small, channel size:0x%lx, required size:0x%lx",
 			       (ulong)msg->cmd.create_device.channel_bytes,
 			       (ulong)min_size);
 			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
@@ -393,7 +391,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 		    uislib_ioremap_cache(dev->channel_addr,
 					 msg->cmd.create_device.channel_bytes);
 		if (!dev->chanptr) {
-			LOGERR("CONTROLVM_DEVICE_CREATE Failed: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
+			pr_err("CONTROLVM_DEVICE_CREATE Failed: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
 			       dev->channel_addr,
 			       msg->cmd.create_device.channel_bytes);
 			result = CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
@@ -411,7 +409,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 			continue;
 		/* make sure the device number is valid */
 		if (dev_no >= bus->device_count) {
-			LOGERR("CONTROLVM_DEVICE_CREATE Failed: device (%d) >= deviceCount (%d).",
+			pr_err("CONTROLVM_DEVICE_CREATE Failed: device (%d) >= deviceCount (%d).",
 			       dev_no, bus->device_count);
 			result = CONTROLVM_RESP_ERROR_MAX_DEVICES;
 			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
@@ -421,7 +419,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 		}
 		/* make sure this device is not already set */
 		if (bus->device[dev_no]) {
-			LOGERR("CONTROLVM_DEVICE_CREATE Failed: device %d is already exists.",
+			pr_err("CONTROLVM_DEVICE_CREATE Failed: device %d is already exists.",
 			       dev_no);
 			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
 					 dev_no, bus_no,
@@ -445,8 +443,8 @@ static int create_device(struct controlvm_message *msg, char *buf)
 			wait_for_valid_guid(&((struct channel_header __iomem *)
 					    (dev->chanptr))->chtype);
 			if (!SPAR_VHBA_CHANNEL_OK_CLIENT(dev->chanptr)) {
-				LOGERR("CONTROLVM_DEVICE_CREATE Failed:[CLIENT]VHBA dev %d chan invalid.",
-				       dev_no);
+				pr_err("CONTROLVM_DEVICE_CREATE Failed: device (%d) >= deviceCount (%d).",
+				       dev_no, bus->device_count);
 				POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
 						 dev_no, bus_no,
 						 POSTCODE_SEVERITY_ERR);
@@ -464,7 +462,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 			wait_for_valid_guid(&((struct channel_header __iomem *)
 					    (dev->chanptr))->chtype);
 			if (!SPAR_VNIC_CHANNEL_OK_CLIENT(dev->chanptr)) {
-				LOGERR("CONTROLVM_DEVICE_CREATE Failed: VNIC[CLIENT] dev %d chan invalid.",
+				pr_err("CONTROLVM_DEVICE_CREATE Failed: device %d is already exists.",
 				       dev_no);
 				POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
 						 dev_no, bus_no,
@@ -479,7 +477,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 			cmd.add_vnic.instance_uuid = dev->instance_uuid;
 			cmd.add_vhba.intr = dev->intr;
 		} else {
-			LOGERR("CONTROLVM_DEVICE_CREATE Failed: unknown channelTypeGuid.\n");
+			pr_err("CONTROLVM_DEVICE_CREATE Failed: unknown channelTypeGuid.\n");
 			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
 					 bus_no, POSTCODE_SEVERITY_ERR);
 			result = CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
@@ -487,7 +485,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 		}
 
 		if (!virt_control_chan_func) {
-			LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci callback not registered.");
+			pr_err("CONTROLVM_DEVICE_CREATE Failed: virtpci callback not registered.");
 			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
 					 bus_no, POSTCODE_SEVERITY_ERR);
 			result = CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
@@ -495,7 +493,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 		}
 
 		if (!virt_control_chan_func(&cmd)) {
-			LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci GUEST_ADD_[VHBA||VNIC] returned error.");
+			pr_err("CONTROLVM_DEVICE_CREATE Failed: virtpci GUEST_ADD_[VHBA||VNIC] returned error.");
 			POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no,
 					 bus_no, POSTCODE_SEVERITY_ERR);
 			result =
@@ -510,7 +508,7 @@ static int create_device(struct controlvm_message *msg, char *buf)
 	}
 	read_unlock(&bus_list_lock);
 
-	LOGERR("CONTROLVM_DEVICE_CREATE Failed: failed to find bus %d.",
+	pr_err("CONTROLVM_DEVICE_CREATE Failed: failed to find bus %d.",
 	       bus_no);
 	POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
 			 POSTCODE_SEVERITY_ERR);
@@ -542,14 +540,14 @@ static int pause_device(struct controlvm_message *msg)
 		if (bus->bus_no == bus_no) {
 			/* make sure the device number is valid */
 			if (dev_no >= bus->device_count) {
-				LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device(%d) >= deviceCount(%d).",
+				pr_err("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device(%d) >= deviceCount(%d).",
 				       dev_no, bus->device_count);
 				retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 			} else {
 				/* make sure this device exists */
 				dev = bus->device[dev_no];
 				if (!dev) {
-					LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device %d does not exist.",
+					pr_err("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device %d does not exist.",
 					       dev_no);
 					retval =
 					  CONTROLVM_RESP_ERROR_ALREADY_DONE;
@@ -559,7 +557,7 @@ static int pause_device(struct controlvm_message *msg)
 		}
 	}
 	if (!bus) {
-		LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: bus %d does not exist",
+		pr_err("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: bus %d does not exist",
 		       bus_no);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
@@ -577,15 +575,15 @@ static int pause_device(struct controlvm_message *msg)
 			cmd.msgtype = GUEST_PAUSE_VNIC;
 			cmd.pause_vnic.chanptr = dev->chanptr;
 		} else {
-			LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: unknown channelTypeGuid.\n");
+			pr_err("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: unknown channelTypeGuid.\n");
 			return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
 		}
 		if (!virt_control_chan_func) {
-			LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered.");
+			pr_err("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered.");
 			return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
 		}
 		if (!virt_control_chan_func(&cmd)) {
-			LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: virtpci GUEST_PAUSE_[VHBA||VNIC] returned error.");
+			pr_err("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: virtpci GUEST_PAUSE_[VHBA||VNIC] returned error.");
 			return
 			  CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
 		}
@@ -609,14 +607,14 @@ static int resume_device(struct controlvm_message *msg)
 		if (bus->bus_no == bus_no) {
 			/* make sure the device number is valid */
 			if (dev_no >= bus->device_count) {
-				LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device(%d) >= deviceCount(%d).",
+				pr_err("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device(%d) >= deviceCount(%d).",
 				       dev_no, bus->device_count);
 				retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 			} else {
 				/* make sure this device exists */
 				dev = bus->device[dev_no];
 				if (!dev) {
-					LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device %d does not exist.",
+					pr_err("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device %d does not exist.",
 					       dev_no);
 					retval =
 					  CONTROLVM_RESP_ERROR_ALREADY_DONE;
@@ -627,7 +625,7 @@ static int resume_device(struct controlvm_message *msg)
 	}
 
 	if (!bus) {
-		LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: bus %d does not exist",
+		pr_err("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: bus %d does not exist",
 		       bus_no);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
@@ -645,15 +643,15 @@ static int resume_device(struct controlvm_message *msg)
 			cmd.msgtype = GUEST_RESUME_VNIC;
 			cmd.resume_vnic.chanptr = dev->chanptr;
 		} else {
-			LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: unknown channelTypeGuid.\n");
+			pr_err("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: unknown channelTypeGuid.\n");
 			return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
 		}
 		if (!virt_control_chan_func) {
-			LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered.");
+			pr_err("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered.");
 			return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
 		}
 		if (!virt_control_chan_func(&cmd)) {
-			LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: virtpci GUEST_RESUME_[VHBA||VNIC] returned error.");
+			pr_err("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: virtpci GUEST_RESUME_[VHBA||VNIC] returned error.");
 			return
 			  CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
 		}
@@ -679,14 +677,14 @@ static int destroy_device(struct controlvm_message *msg, char *buf)
 		if (bus->bus_no == bus_no) {
 			/* make sure the device number is valid */
 			if (dev_no >= bus->device_count) {
-				LOGERR("CONTROLVM_DEVICE_DESTROY Failed: device(%d) >= device_count(%d).",
+				pr_err("CONTROLVM_DEVICE_DESTROY Failed: device(%d) >= device_count(%d).",
 				       dev_no, bus->device_count);
 				retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 			} else {
 				/* make sure this device exists */
 				dev = bus->device[dev_no];
 				if (!dev) {
-					LOGERR("CONTROLVM_DEVICE_DESTROY Failed: device %d does not exist.",
+					pr_err("CONTROLVM_DEVICE_DESTROY Failed: device %d does not exist.",
 					       dev_no);
 					retval =
 					     CONTROLVM_RESP_ERROR_ALREADY_DONE;
@@ -697,7 +695,7 @@ static int destroy_device(struct controlvm_message *msg, char *buf)
 	}
 
 	if (!bus) {
-		LOGERR("CONTROLVM_DEVICE_DESTROY Failed: bus %d does not exist",
+		pr_err("CONTROLVM_DEVICE_DESTROY Failed: bus %d does not exist",
 		       bus_no);
 		retval = CONTROLVM_RESP_ERROR_BUS_INVALID;
 	}
@@ -715,17 +713,17 @@ static int destroy_device(struct controlvm_message *msg, char *buf)
 			cmd.msgtype = GUEST_DEL_VNIC;
 			cmd.del_vnic.chanptr = dev->chanptr;
 		} else {
-			LOGERR("CONTROLVM_DEVICE_DESTROY Failed: unknown channelTypeGuid.\n");
+			pr_err("CONTROLVM_DEVICE_DESTROY Failed: unknown channelTypeGuid.\n");
 			return
 			    CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
 		}
 		if (!virt_control_chan_func) {
-			LOGERR("CONTROLVM_DEVICE_DESTROY Failed: virtpci callback not registered.");
+			pr_err("CONTROLVM_DEVICE_DESTROY Failed: virtpci callback not registered.");
 			return
 			    CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
 		}
 		if (!virt_control_chan_func(&cmd)) {
-			LOGERR("CONTROLVM_DEVICE_DESTROY Failed: virtpci GUEST_DEL_[VHBA||VNIC] returned error.");
+			pr_err("CONTROLVM_DEVICE_DESTROY Failed: virtpci GUEST_DEL_[VHBA||VNIC] returned error.");
 			return
 			    CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
 		}
@@ -781,7 +779,7 @@ static int delete_bus_glue(u32 bus_no)
 	init_msg_header(&msg, CONTROLVM_BUS_DESTROY, 0, 0);
 	msg.cmd.destroy_bus.bus_no = bus_no;
 	if (destroy_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("destroy_bus failed. bus_no=0x%x\n", bus_no);
+		pr_err("destroy_bus failed. bus_no=0x%x\n", bus_no);
 		return 0;
 	}
 	return 1;
@@ -795,7 +793,7 @@ static int delete_device_glue(u32 bus_no, u32 dev_no)
 	msg.cmd.destroy_device.bus_no = bus_no;
 	msg.cmd.destroy_device.dev_no = dev_no;
 	if (destroy_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("destroy_device failed. bus_no=0x%x dev_no=0x%x\n",
+		pr_err("destroy_device failed. bus_no=0x%x dev_no=0x%x\n",
 		       bus_no, dev_no);
 		return 0;
 	}
@@ -825,7 +823,7 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
 		msg.cmd.init_chipset.bus_count = 23;
 		msg.cmd.init_chipset.switch_count = 0;
 		if (init_chipset(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
-			LOGERR("init_chipset failed.\n");
+			pr_err("init_chipset failed.\n");
 			return 0;
 		}
 		LOGINF("chipset initialized\n");
@@ -842,7 +840,7 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
 	msg.cmd.create_bus.channel_addr = channel_addr;
 	msg.cmd.create_bus.channel_bytes = n_channel_bytes;
 	if (create_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("create_bus failed.\n");
+		pr_err("create_bus failed.\n");
 		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus_no,
 				 POSTCODE_SEVERITY_ERR);
 		return 0;
@@ -872,7 +870,7 @@ uislib_client_inject_pause_vhba(u32 bus_no, u32 dev_no)
 	msg.cmd.device_change_state.state = segment_state_standby;
 	rc = pause_device(&msg);
 	if (rc != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("VHBA pause_device failed. busNo=0x%x devNo=0x%x\n",
+		pr_err("VHBA pause_device failed. busNo=0x%x devNo=0x%x\n",
 		       bus_no, dev_no);
 		return rc;
 	}
@@ -892,7 +890,7 @@ uislib_client_inject_resume_vhba(u32 bus_no, u32 dev_no)
 	msg.cmd.device_change_state.state = segment_state_running;
 	rc = resume_device(&msg);
 	if (rc != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("VHBA resume_device failed. busNo=0x%x devNo=0x%x\n",
+		pr_err("VHBA resume_device failed. busNo=0x%x devNo=0x%x\n",
 		       bus_no, dev_no);
 		return rc;
 	}
@@ -932,7 +930,7 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no,
 		       sizeof(struct irq_info));
 	msg.cmd.create_device.channel_addr = phys_chan_addr;
 	if (chan_bytes < MIN_IO_CHANNEL_SIZE) {
-		LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
+		pr_err("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
 		       chan_bytes, (unsigned int)MIN_IO_CHANNEL_SIZE);
 		POSTCODE_LINUX_4(VHBA_CREATE_FAILURE_PC, chan_bytes,
 				 MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR);
@@ -941,7 +939,7 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no,
 	msg.cmd.create_device.channel_bytes = chan_bytes;
 	msg.cmd.create_device.data_type_uuid = spar_vhba_channel_protocol_uuid;
 	if (create_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("VHBA create_device failed.\n");
+		pr_err("VHBA create_device failed.\n");
 		POSTCODE_LINUX_4(VHBA_CREATE_FAILURE_PC, dev_no, bus_no,
 				 POSTCODE_SEVERITY_ERR);
 		return 0;
@@ -991,7 +989,7 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no,
 		       sizeof(struct irq_info));
 	msg.cmd.create_device.channel_addr = phys_chan_addr;
 	if (chan_bytes < MIN_IO_CHANNEL_SIZE) {
-		LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
+		pr_err("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
 		       chan_bytes, (unsigned int)MIN_IO_CHANNEL_SIZE);
 		POSTCODE_LINUX_4(VNIC_CREATE_FAILURE_PC, chan_bytes,
 				 MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR);
@@ -1000,7 +998,7 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no,
 	msg.cmd.create_device.channel_bytes = chan_bytes;
 	msg.cmd.create_device.data_type_uuid = spar_vnic_channel_protocol_uuid;
 	if (create_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("VNIC create_device failed.\n");
+		pr_err("VNIC create_device failed.\n");
 		POSTCODE_LINUX_4(VNIC_CREATE_FAILURE_PC, dev_no, bus_no,
 				 POSTCODE_SEVERITY_ERR);
 		return 0;
@@ -1024,7 +1022,7 @@ uislib_client_inject_pause_vnic(u32 bus_no, u32 dev_no)
 	msg.cmd.device_change_state.state = segment_state_standby;
 	rc = pause_device(&msg);
 	if (rc != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("VNIC pause_device failed. busNo=0x%x devNo=0x%x\n",
+		pr_err("VNIC pause_device failed. busNo=0x%x devNo=0x%x\n",
 		       bus_no, dev_no);
 		return -1;
 	}
@@ -1044,7 +1042,7 @@ uislib_client_inject_resume_vnic(u32 bus_no, u32 dev_no)
 	msg.cmd.device_change_state.state = segment_state_running;
 	rc = resume_device(&msg);
 	if (rc != CONTROLVM_RESP_SUCCESS) {
-		LOGERR("VNIC resume_device failed. busNo=0x%x devNo=0x%x\n",
+		pr_err("VNIC resume_device failed. busNo=0x%x devNo=0x%x\n",
 		       bus_no, dev_no);
 		return -1;
 	}
@@ -1070,7 +1068,7 @@ uislib_cache_alloc(struct kmem_cache *cur_pool, char *fn, int ln)
 	void *p = kmem_cache_alloc(cur_pool, GFP_ATOMIC | __GFP_NORETRY);
 
 	if (p == NULL) {
-		LOGERR("uislib_malloc failed to alloc uiscmdrsp @%s:%d",
+		pr_err("uislib_malloc failed to alloc uiscmdrsp @%s:%d",
 		       fn, ln);
 		return NULL;
 	}
@@ -1082,7 +1080,7 @@ void
 uislib_cache_free(struct kmem_cache *cur_pool, void *p, char *fn, int ln)
 {
 	if (p == NULL) {
-		LOGERR("uislib_free NULL pointer @%s:%d", fn, ln);
+		pr_err("uislib_free NULL pointer @%s:%d", fn, ln);
 		return;
 	}
 	kmem_cache_free(cur_pool, p);
@@ -1167,7 +1165,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
 		debug_buf = vmalloc(PROC_READ_BUFFER_SIZE);
 
 		if (debug_buf == NULL) {
-			LOGERR("failed to allocate buffer to provide proc data.\n");
+			pr_err("failed to allocate buffer to provide proc data.\n");
 			return -ENOMEM;
 		}
 	}
@@ -1197,14 +1195,14 @@ static struct device_info *find_dev(u32 bus_no, u32 dev_no)
 		if (bus->bus_no == bus_no) {
 			/* make sure the device number is valid */
 			if (dev_no >= bus->device_count) {
-				LOGERR("%s bad bus_no, dev_no=%d,%d",
+				pr_err("%s bad bus_no, dev_no=%d,%d",
 				       __func__,
 				       (int)bus_no, (int)dev_no);
 				break;
 			}
 			dev = bus->device[dev_no];
 			if (!dev)
-				LOGERR("%s bad bus_no, dev_no=%d,%d",
+				pr_err("%s bad bus_no, dev_no=%d,%d",
 				       __func__,
 				       (int)bus_no, (int)dev_no);
 			break;
@@ -1346,7 +1344,7 @@ initialize_incoming_thread(void)
 		return TRUE;
 	if (!uisthread_start(&incoming_ti,
 			     &process_incoming, NULL, "dev_incoming")) {
-		LOGERR("uisthread_start initialize_incoming_thread ****FAILED");
+		pr_err("uisthread_start initialize_incoming_thread ****FAILED");
 		return FALSE;
 	}
 	incoming_started = TRUE;
@@ -1368,7 +1366,7 @@ uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no,
 
 	dev = find_dev(bus_no, dev_no);
 	if (!dev) {
-		LOGERR("%s busNo=%d, devNo=%d", __func__, (int)(bus_no),
+		pr_err("%s busNo=%d, devNo=%d", __func__, (int)(bus_no),
 		       (int)(dev_no));
 		return;
 	}
@@ -1393,7 +1391,7 @@ uislib_disable_channel_interrupts(u32 bus_no, u32 dev_no)
 
 	dev = find_dev(bus_no, dev_no);
 	if (!dev) {
-		LOGERR("%s busNo=%d, devNo=%d", __func__, (int)(bus_no),
+		pr_err("%s busNo=%d, devNo=%d", __func__, (int)(bus_no),
 		       (int)(dev_no));
 		return;
 	}
diff --git a/drivers/staging/unisys/uislib/uisqueue.c b/drivers/staging/unisys/uislib/uisqueue.c
index 71bb7b6..c74aa14 100644
--- a/drivers/staging/unisys/uislib/uisqueue.c
+++ b/drivers/staging/unisys/uislib/uisqueue.c
@@ -296,11 +296,11 @@ uisqueue_put_cmdrsp_with_lock_client(struct uisqueue_info *queueinfo,
 					(spinlock_t *)insertlock,
 					channel_id)) {
 		if (oktowait != OK_TO_WAIT) {
-			LOGERR("****FAILED visor_signal_insert failed; cannot wait; insert aborted\n");
+			pr_err("****FAILED visor_signal_insert failed; cannot wait; insert aborted\n");
 			return 0;	/* failed to queue */
 		}
 		/* try again */
-		LOGERR("****FAILED visor_signal_insert failed; waiting to try again\n");
+		pr_err("****FAILED visor_signal_insert failed; waiting to try again\n");
 		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(msecs_to_jiffies(10));
 	}
diff --git a/drivers/staging/unisys/uislib/uisthread.c b/drivers/staging/unisys/uislib/uisthread.c
index 25adf1a..1cc93b4 100644
--- a/drivers/staging/unisys/uislib/uisthread.c
+++ b/drivers/staging/unisys/uislib/uisthread.c
@@ -69,13 +69,13 @@ uisthread_stop(struct uisthread_info *thrinfo)
 	thrinfo->should_stop = 1;
 	ret = KILL(thrinfo->id, SIGHUP, 1);
 	if (ret) {
-		LOGERR("unable to signal thread %d\n", ret);
+		pr_err("unable to signal thread %d\n", ret);
 	} else {
 		/* give up if the thread has NOT died in 1 minute */
 		if (wait_for_completion_timeout(&thrinfo->has_stopped, 60 * HZ))
 			stopped = 1;
 		else
-			LOGERR("timed out trying to signal thread\n");
+			pr_err("timed out trying to signal thread\n");
 	}
 	if (stopped) {
 		LOGINF("uisthread_stop stopped id:%d\n", thrinfo->id);
diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index d9f527d..b4e5907 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -60,7 +60,7 @@ uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
 		*buffer += *buffer_remaining;
 		*total += *buffer_remaining;
 		*buffer_remaining = 0;
-		LOGERR("bytes remaining is too small!\n");
+		pr_err("bytes remaining is too small!\n");
 		return -1;
 	}
 	*buffer_remaining -= len;
@@ -90,7 +90,7 @@ uisctrl_register_req_handler(int type, void *fptr,
 		break;
 
 	default:
-		LOGERR("invalid type %d.\n", type);
+		pr_err("invalid type %d.\n", type);
 		return 0;
 	}
 	if (chipset_driver_info)
@@ -117,16 +117,16 @@ uisctrl_register_req_handler_ex(uuid_le switch_uuid,
 	LOGINF("type=%pUL, controlfunc=0x%p.\n",
 	       &switch_uuid, controlfunc);
 	if (!controlfunc) {
-		LOGERR("%pUL: controlfunc must be supplied\n", &switch_uuid);
+		pr_err("%pUL: controlfunc must be supplied\n", &switch_uuid);
 		return 0;
 	}
 	if (!server_channel_ok) {
-		LOGERR("%pUL: Server_Channel_Ok must be supplied\n",
+		pr_err("%pUL: Server_Channel_Ok must be supplied\n",
 				&switch_uuid);
 		return 0;
 	}
 	if (!server_channel_init) {
-		LOGERR("%pUL: Server_Channel_Init must be supplied\n",
+		pr_err("%pUL: Server_Channel_Init must be supplied\n",
 				&switch_uuid);
 		return 0;
 	}
@@ -136,7 +136,7 @@ uisctrl_register_req_handler_ex(uuid_le switch_uuid,
 				      min_channel_bytes,
 				      server_channel_ok, server_channel_init);
 	if (!req_handler) {
-		LOGERR("failed to add %pUL to server list\n", &switch_uuid);
+		pr_err("failed to add %pUL to server list\n", &switch_uuid);
 		return 0;
 	}
 
@@ -147,7 +147,7 @@ uisctrl_register_req_handler_ex(uuid_le switch_uuid,
 		return 1;
 	}
 
-	LOGERR("failed to register type %pUL.\n", &switch_uuid);
+	pr_err("failed to register type %pUL.\n", &switch_uuid);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(uisctrl_register_req_handler_ex);
@@ -157,7 +157,7 @@ uisctrl_unregister_req_handler_ex(uuid_le switch_uuid)
 {
 	LOGINF("type=%pUL.\n", &switch_uuid);
 	if (req_handler_del(switch_uuid) < 0) {
-		LOGERR("failed to remove %pUL from server list\n",
+		pr_err("failed to remove %pUL from server list\n",
 		       &switch_uuid);
 		return 0;
 	}
@@ -197,7 +197,7 @@ uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in,
 
 	while (firstfraglen) {
 		if (count == frags_max) {
-			LOGERR("%s frags array too small: max:%d count:%d\n",
+			pr_err("%s frags array too small: max:%d count:%d\n",
 			       calling_ctx, frags_max, count);
 			return -1;	/* failure */
 		}
@@ -220,7 +220,7 @@ uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in,
 		goto dolist;
 
 	if ((count + numfrags) > frags_max) {
-		LOGERR("**** FAILED %s frags array too small: max:%d count+nr_frags:%d\n",
+		pr_err("**** FAILED %s frags array too small: max:%d count+nr_frags:%d\n",
 		       calling_ctx, frags_max, count + numfrags);
 		return -1;	/* failure */
 	}
@@ -234,7 +234,7 @@ uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in,
 					size, count, frags_max,
 					frags);
 		if (count == 0) {
-			LOGERR("**** FAILED to add physinfo entries\n");
+			pr_err("**** FAILED to add physinfo entries\n");
 			return -1;	/* failure */
 		}
 	}
@@ -251,7 +251,7 @@ dolist: if (skb_shinfo(skb)->frag_list) {
 				frags_max - count,
 				&frags[count]);
 			if (c == -1) {
-				LOGERR("**** FAILED recursive call failed\n");
+				pr_err("**** FAILED recursive call failed\n");
 				return -1;
 			}
 			count += c;
diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index d7a629b..a424f96 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -261,7 +261,7 @@ add_scsipending_entry(struct virthba_info *vhbainfo, char cmdtype, void *new)
 	while (vhbainfo->pending[insert_location].sent != NULL) {
 		insert_location = (insert_location + 1) % MAX_PENDING_REQUESTS;
 		if (insert_location == (int) vhbainfo->nextinsert) {
-			LOGERR("Queue should be full. insert_location<<%d>>  Unable to find open slot for pending commands.\n",
+			pr_err("Queue should be full. insert_location<<%d>>  Unable to find open slot for pending commands.\n",
 			     insert_location);
 			spin_unlock_irqrestore(&vhbainfo->privlock, flags);
 			return -1;
@@ -283,7 +283,7 @@ add_scsipending_entry_with_wait(struct virthba_info *vhbainfo, char cmdtype,
 	int insert_location = add_scsipending_entry(vhbainfo, cmdtype, new);
 
 	while (insert_location == -1) {
-		LOGERR("Failed to find empty queue slot.  Waiting to try again\n");
+		pr_err("Failed to find empty queue slot.  Waiting to try again\n");
 		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(msecs_to_jiffies(10));
 		insert_location = add_scsipending_entry(vhbainfo, cmdtype, new);
@@ -299,13 +299,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del)
 	void *sent = NULL;
 
 	if (del >= MAX_PENDING_REQUESTS) {
-		LOGERR("Invalid queue position <<%lu>> given to delete. MAX_PENDING_REQUESTS <<%d>>\n",
+		pr_err("Invalid queue position <<%lu>> given to delete. MAX_PENDING_REQUESTS <<%d>>\n",
 		     (unsigned long) del, MAX_PENDING_REQUESTS);
 	} else {
 		spin_lock_irqsave(&vhbainfo->privlock, flags);
 
 		if (vhbainfo->pending[del].sent == NULL)
-			LOGERR("Deleting already cleared queue entry at <<%lu>>.\n",
+			pr_err("Deleting already cleared queue entry at <<%lu>>.\n",
 			     (unsigned long) del);
 
 		sent = vhbainfo->pending[del].sent;
@@ -355,11 +355,11 @@ SendDiskAddRemove(struct diskaddremove *dar)
 		    scsi_add_device(dar->shost, dar->channel, dar->id,
 				    dar->lun);
 		if (error)
-			LOGERR("Failed scsi_add_device: host_no=%d[chan=%d:id=%d:lun=%d]\n",
+			pr_err("Failed scsi_add_device: host_no=%d[chan=%d:id=%d:lun=%d]\n",
 			     dar->shost->host_no, dar->channel, dar->id,
 			     dar->lun);
 	} else
-		LOGERR("Failed scsi_device_lookup:[chan=%d:id=%d:lun=%d]\n",
+		pr_err("Failed scsi_device_lookup:[chan=%d:id=%d:lun=%d]\n",
 		       dar->channel, dar->id, dar->lun);
 	kfree(dar);
 }
@@ -406,7 +406,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
 		dar->lun = cmdrsp->disknotify.lun;
 		QUEUE_DISKADDREMOVE(dar);
 	} else {
-		LOGERR("kmalloc failed for dar. host_no=%d[chan=%d:id=%d:lun=%d]\n",
+		pr_err("kmalloc failed for dar. host_no=%d[chan=%d:id=%d:lun=%d]\n",
 		     shost->host_no, cmdrsp->disknotify.channel,
 		     cmdrsp->disknotify.id, cmdrsp->disknotify.lun);
 	}
@@ -535,7 +535,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	 */
 	error = scsi_add_host(scsihost, &virtpcidev->generic_dev);
 	if (error) {
-		LOGERR("scsi_add_host ****FAILED 0x%x  TBD - RECOVER\n", error);
+		pr_err("scsi_add_host ****FAILED 0x%x  TBD - RECOVER\n", error);
 		POSTCODE_LINUX_2(VHBA_PROBE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 		/* decr refcount on scsihost which was incremented by
 		 * scsi_add_host so the scsi_host gets deleted
@@ -593,7 +593,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	if (!uisthread_start(&virthbainfo->chinfo.threadinfo,
 			     process_incoming_rsps,
 			     virthbainfo, "vhba_incoming")) {
-		LOGERR("uisthread_start rsp ****FAILED\n");
+		pr_err("uisthread_start rsp ****FAILED\n");
 		/* decr refcount on scsihost which was incremented by
 		 * scsi_add_host so the scsi_host gets deleted
 		 */
@@ -615,14 +615,14 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	rsp = request_irq(virthbainfo->interrupt_vector, handler, IRQF_SHARED,
 			  scsihost->hostt->name, virthbainfo);
 	if (rsp != 0) {
-		LOGERR("request_irq(%d) uislib_virthba_ISR request failed with rsp=%d\n",
+		pr_err("request_irq(%d) uislib_virthba_ISR request failed with rsp=%d\n",
 		       virthbainfo->interrupt_vector, rsp);
 		virthbainfo->interrupt_vector = -1;
 		POSTCODE_LINUX_2(VHBA_PROBE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 	} else {
 		u64 __iomem *Features_addr =
 		    &virthbainfo->chinfo.queueinfo->chan->features;
-		LOGERR("request_irq(%d) uislib_virthba_ISR request succeeded\n",
+		pr_err("request_irq(%d) uislib_virthba_ISR request succeeded\n",
 		       virthbainfo->interrupt_vector);
 		mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
 			 ULTRA_IO_DRIVER_DISABLES_INTS);
@@ -692,10 +692,8 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 	}
 
 	cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
-	if (cmdrsp == NULL) {
-		LOGERR("kmalloc of cmdrsp failed.\n");
+	if (cmdrsp == NULL)
 		return FAILED;	/* reject */
-	}
 
 	init_waitqueue_head(&notifyevent);
 
@@ -755,10 +753,8 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 	}
 
 	cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
-	if (cmdrsp == NULL) {
-		LOGERR("kmalloc of cmdrsp failed.\n");
+	if (cmdrsp == NULL)
 		return FAILED;	/* reject */
-	}
 
 	init_waitqueue_head(&notifyevent);
 
@@ -879,7 +875,7 @@ static int
 virthba_host_reset_handler(struct scsi_cmnd *scsicmd)
 {
 	/* issue TASK_MGMT_TARGET_RESET for each target on each bus for host */
-	LOGERR("virthba_host_reset_handler Not yet implemented\n");
+	pr_err("virthba_host_reset_handler Not yet implemented\n");
 	return SUCCESS;
 }
 
@@ -926,10 +922,8 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	}
 
 	cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
-	if (cmdrsp == NULL) {
-		LOGERR("kmalloc of cmdrsp failed.\n");
+	if (cmdrsp == NULL)
 		return 1;	/* reject the command */
-	}
 
 	/* now saving everything we need from scsi_cmd into cmdrsp
 	 * before we queue cmdrsp set type to command - as opposed to
@@ -944,7 +938,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	if (insert_location != -1) {
 		cmdrsp->scsi.scsicmd = (void *) (uintptr_t) insert_location;
 	} else {
-		LOGERR("Queue is full. Returning busy.\n");
+		pr_err("Queue is full. Returning busy.\n");
 		kfree(cmdrsp);
 		return SCSI_MLQUEUE_DEVICE_BUSY;
 	}
@@ -965,7 +959,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 		MaxBuffLen = cmdrsp->scsi.bufflen;
 
 	if (scsi_sg_count(scsicmd) > MAX_PHYS_INFO) {
-		LOGERR("scsicmd use_sg:%d greater than MAX:%d\n",
+		pr_err("scsicmd use_sg:%d greater than MAX:%d\n",
 		       scsi_sg_count(scsicmd), MAX_PHYS_INFO);
 		del_scsipending_entry(virthbainfo, (uintptr_t) insert_location);
 		kfree(cmdrsp);
@@ -979,7 +973,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	/* convert buffer to phys information */
 	if (scsi_sg_count(scsicmd) == 0) {
 		if (scsi_bufflen(scsicmd) > 0) {
-			LOGERR("**** FAILED No scatter list for bufflen > 0\n");
+			pr_err("**** FAILED No scatter list for bufflen > 0\n");
 			BUG_ON(scsi_sg_count(scsicmd) == 0);
 		}
 		DBGINF("No sg; buffer:0x%p bufflen:%d\n",
@@ -998,15 +992,15 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 		}
 
 		if (sg_failed) {
-			LOGERR("Start sg_list dump (entries %d, bufflen %d)...\n",
+			pr_err("Start sg_list dump (entries %d, bufflen %d)...\n",
 			     scsi_sg_count(scsicmd), cmdrsp->scsi.bufflen);
 			for_each_sg(sgl, sg, scsi_sg_count(scsicmd), i) {
-				LOGERR("   Entry(%d): page->[0x%p], phys->[0x%Lx], off(%d), len(%d)\n",
+				pr_err("   Entry(%d): page->[0x%p], phys->[0x%Lx], off(%d), len(%d)\n",
 				     i, sg_page(sg),
 				     (unsigned long long) sg_phys(sg),
 				     sg->offset, sg->length);
 			}
-			LOGERR("Done sg_list dump.\n");
+			pr_err("Done sg_list dump.\n");
 			/* BUG(); ***** For now, let it fail in uissd
 			 * if it is a problem, as it might just
 			 * work
@@ -1025,7 +1019,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 						 (u64) NULL, DONT_WAIT, "vhba");
 	if (i == 0) {
 		/* queue must be full - and we said don't wait - return busy */
-		LOGERR("uisqueue_put_cmdrsp_with_lock ****FAILED\n");
+		pr_err("uisqueue_put_cmdrsp_with_lock ****FAILED\n");
 		kfree(cmdrsp);
 		del_scsipending_entry(virthbainfo, (uintptr_t) insert_location);
 		return SCSI_MLQUEUE_DEVICE_BUSY;
@@ -1051,7 +1045,7 @@ virthba_slave_alloc(struct scsi_device *scsidev)
 
 	virthbainfo = (struct virthba_info *) scsihost->hostdata;
 	if (!virthbainfo) {
-		LOGERR("Could not find virthba_info for scsihost\n");
+		pr_err("Could not find virthba_info for scsihost\n");
 		return 0;	/* even though we errored, treat as success */
 	}
 	for (vdisk = &virthbainfo->head; vdisk->next; vdisk = vdisk->next) {
@@ -1062,10 +1056,8 @@ virthba_slave_alloc(struct scsi_device *scsidev)
 			return 0;
 	}
 	tmpvdisk = kzalloc(sizeof(struct virtdisk_info), GFP_ATOMIC);
-	if (!tmpvdisk) {	/* error allocating */
-		LOGERR("Could not allocate memory for disk\n");
+	if (!tmpvdisk)
 		return 0;
-	}
 
 	tmpvdisk->channel = scsidev->channel;
 	tmpvdisk->id = scsidev->id;
@@ -1093,7 +1085,7 @@ virthba_slave_destroy(struct scsi_device *scsidev)
 
 	virthbainfo = (struct virthba_info *) scsihost->hostdata;
 	if (!virthbainfo)
-		LOGERR("Could not find virthba_info for scsihost\n");
+		pr_err("Could not find virthba_info for scsihost\n");
 	for (vdisk = &virthbainfo->head; vdisk->next; vdisk = vdisk->next) {
 		if (vdisk->next->valid &&
 		    (vdisk->next->channel == scsidev->channel) &&
@@ -1138,7 +1130,7 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 
 		if (atomic_read(&vdisk->error_count) < VIRTHBA_ERROR_COUNT) {
 			atomic_inc(&vdisk->error_count);
-			LOGERR("SCSICMD ****FAILED scsicmd:0x%p op:0x%x <%d:%d:%d:%llu> 0x%x-0x%x-0x%x-0x%x-0x%x.\n",
+			pr_err("SCSICMD ****FAILED scsicmd:0x%p op:0x%x <%d:%d:%d:%llu> 0x%x-0x%x-0x%x-0x%x-0x%x.\n",
 			       scsicmd, cmdrsp->scsi.cmnd[0],
 			       scsidev->host->host_no, scsidev->id,
 			       scsidev->channel, scsidev->lun,
@@ -1147,7 +1139,7 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 			       sd->additional_sense_code_qualifier);
 			if (atomic_read(&vdisk->error_count) ==
 			    VIRTHBA_ERROR_COUNT) {
-				LOGERR("Throtling SCSICMD errors disk <%d:%d:%d:%llu>\n",
+				pr_err("Throtling SCSICMD errors disk <%d:%d:%d:%llu>\n",
 				     scsidev->host->host_no, scsidev->id,
 				     scsidev->channel, scsidev->lun);
 			}
@@ -1186,7 +1178,7 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 
 		if (scsi_sg_count(scsicmd) == 0) {
 			if (scsi_bufflen(scsicmd) > 0) {
-				LOGERR("**** FAILED No scatter list for bufflen > 0\n");
+				pr_err("**** FAILED No scatter list for bufflen > 0\n");
 				BUG_ON(scsi_sg_count(scsicmd) ==
 				       0);
 			}
@@ -1218,7 +1210,7 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 			if (atomic_read(&vdisk->ios_threshold) > 0) {
 				atomic_dec(&vdisk->ios_threshold);
 				if (atomic_read(&vdisk->ios_threshold) == 0) {
-					LOGERR("Resetting error count for disk\n");
+					pr_err("Resetting error count for disk\n");
 					atomic_set(&vdisk->error_count, 0);
 				}
 			}
@@ -1317,7 +1309,7 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 				break;
 			complete_vdiskmgmt_command(cmdrsp);
 		} else
-			LOGERR("Invalid cmdtype %d\n", cmdrsp->cmdtype);
+			pr_err("Invalid cmdtype %d\n", cmdrsp->cmdtype);
 		/* cmdrsp is now available for reuse */
 	}
 }
@@ -1339,7 +1331,6 @@ process_incoming_rsps(void *v)
 	/* alloc once and reuse */
 	cmdrsp = kmalloc(SZ, GFP_ATOMIC);
 	if (cmdrsp == NULL) {
-		LOGERR("process_incoming_rsps ****FAILED to malloc - thread exiting\n");
 		complete_and_exit(&dc->threadinfo.has_stopped, 0);
 		return 0;
 	}
@@ -1433,7 +1424,7 @@ static ssize_t enable_ints_write(struct file *file,
 
 	buf[count] = '\0';
 	if (copy_from_user(buf, buffer, count)) {
-		LOGERR("copy_from_user failed. buf<<%.*s>> count<<%lu>>\n",
+		pr_err("copy_from_user failed. buf<<%.*s>> count<<%lu>>\n",
 		       (int) count, buf, count);
 		return -EFAULT;
 	}
@@ -1441,7 +1432,7 @@ static ssize_t enable_ints_write(struct file *file,
 	i = kstrtoint(buf, 10 , &new_value);
 
 	if (i != 0) {
-		LOGERR("Failed to scan value for enable_ints, buf<<%.*s>>",
+		pr_err("Failed to scan value for enable_ints, buf<<%.*s>>",
 		       (int) count, buf);
 		return -EFAULT;
 	}
@@ -1488,7 +1479,7 @@ virthba_serverup(struct virtpci_dev *virtpcidev)
 		return 1;
 	}
 	if (virthbainfo->serverchangingstate) {
-		LOGERR("Server already processing change state message\n");
+		pr_err("Server already processing change state message\n");
 		return 0;
 	}
 
@@ -1504,7 +1495,7 @@ virthba_serverup(struct virtpci_dev *virtpcidev)
 	if (!uisthread_start(&virthbainfo->chinfo.threadinfo,
 			     process_incoming_rsps,
 			     virthbainfo, "vhba_incoming")) {
-		LOGERR("uisthread_start rsp ****FAILED\n");
+		pr_err("uisthread_start rsp ****FAILED\n");
 		return 0;
 	}
 	virthbainfo->serverdown = false;
@@ -1561,7 +1552,7 @@ virthba_serverdown_complete(struct work_struct *work)
 			break;
 		default:
 			if (pendingdel->sent != NULL)
-				LOGERR("Unknown command type: 0x%x.  Only freeing list structure.\n",
+				pr_err("Unknown command type: 0x%x.  Only freeing list structure.\n",
 				     pendingdel->cmdtype);
 		}
 		pendingdel->cmdtype = 0;
@@ -1597,10 +1588,10 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 		queue_work(virthba_serverdown_workqueue,
 			   &virthbainfo->serverdown_completion);
 	} else if (virthbainfo->serverchangingstate) {
-		LOGERR("Server already processing change state message\n");
+		pr_err("Server already processing change state message\n");
 		return 0;
 	} else
-		LOGERR("Server already down, but another server down message received.");
+		pr_err("Server already down, but another server down message received.");
 
 	return 1;
 }
@@ -1651,7 +1642,7 @@ virthba_mod_init(void)
 
 	error = virtpci_register_driver(&virthba_driver);
 	if (error < 0) {
-		LOGERR("register ****FAILED 0x%x\n", error);
+		pr_err("register ****FAILED 0x%x\n", error);
 		POSTCODE_LINUX_3(VHBA_CREATE_FAILURE_PC, error,
 				 POSTCODE_SEVERITY_ERR);
 	} else {
@@ -1676,7 +1667,7 @@ virthba_mod_init(void)
 		virthba_serverdown_workqueue =
 		    create_singlethread_workqueue("virthba_serverdown");
 		if (virthba_serverdown_workqueue == NULL) {
-			LOGERR("**** FAILED virthba_serverdown_workqueue creation\n");
+			pr_err("**** FAILED virthba_serverdown_workqueue creation\n");
 			POSTCODE_LINUX_2(VHBA_CREATE_FAILURE_PC,
 					 POSTCODE_SEVERITY_ERR);
 			error = -1;
diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c
index 39b828d..eb73919 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -192,12 +192,12 @@ static int write_vbus_chp_info(struct spar_vbus_channel_protocol *chan,
 	int off;
 
 	if (!chan) {
-		LOGERR("vbus channel not present");
+		pr_err("vbus channel not present");
 		return -1;
 	}
 	off = sizeof(struct channel_header) + chan->hdr_info.chp_info_offset;
 	if (chan->hdr_info.chp_info_offset == 0) {
-		LOGERR("vbus channel not used, because chp_info_offset == 0");
+		pr_err("vbus channel not used, because chp_info_offset == 0");
 		return -1;
 	}
 	memcpy(((u8 *)(chan)) + off, info, sizeof(*info));
@@ -211,12 +211,12 @@ static int write_vbus_bus_info(struct spar_vbus_channel_protocol *chan,
 	int off;
 
 	if (!chan) {
-		LOGERR("vbus channel not present");
+		pr_err("vbus channel not present");
 		return -1;
 	}
 	off = sizeof(struct channel_header) + chan->hdr_info.bus_info_offset;
 	if (chan->hdr_info.bus_info_offset == 0) {
-		LOGERR("vbus channel not used, because bus_info_offset == 0");
+		pr_err("vbus channel not used, because bus_info_offset == 0");
 		return -1;
 	}
 	memcpy(((u8 *)(chan)) + off, info, sizeof(*info));
@@ -233,7 +233,7 @@ write_vbus_dev_info(struct spar_vbus_channel_protocol *chan,
 	int off;
 
 	if (!chan) {
-		LOGERR("vbus channel not present");
+		pr_err("vbus channel not present");
 		return -1;
 	}
 	off =
@@ -241,7 +241,7 @@ write_vbus_dev_info(struct spar_vbus_channel_protocol *chan,
 	     chan->hdr_info.dev_info_offset) +
 	    (chan->hdr_info.device_info_struct_bytes * devix);
 	if (chan->hdr_info.dev_info_offset == 0) {
-		LOGERR("vbus channel not used, because dev_info_offset == 0");
+		pr_err("vbus channel not used, because dev_info_offset == 0");
 		return -1;
 	}
 	memcpy(((u8 *)(chan)) + off, info, sizeof(*info));
@@ -275,7 +275,7 @@ static int add_vbus(struct add_vbus_guestpart *addparams)
 	 */
 	ret = device_register(vbus);
 	if (ret) {
-		LOGERR("device_register FAILED:%d\n", ret);
+		pr_err("device_register FAILED:%d\n", ret);
 		POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 		return 0;
 	}
@@ -316,7 +316,7 @@ static int add_vhba(struct add_virt_guestpart *addparams)
 	POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 	if (!WAIT_FOR_IO_CHANNEL
 	    ((struct spar_io_channel_protocol __iomem *)addparams->chanptr)) {
-		LOGERR("Timed out.  Channel not ready\n");
+		pr_err("Timed out.  Channel not ready\n");
 		POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 		return 0;
 	}
@@ -328,7 +328,7 @@ static int add_vhba(struct add_virt_guestpart *addparams)
 	vbus = bus_find_device(&virtpci_bus_type, NULL,
 			       (void *)busid, match_busid);
 	if (!vbus) {
-		LOGERR("**** FAILED to find vbus %s\n", busid);
+		pr_err("**** FAILED to find vbus %s\n", busid);
 		return 0;
 	}
 
@@ -379,7 +379,7 @@ add_vnic(struct add_virt_guestpart *addparams)
 	POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 	if (!WAIT_FOR_IO_CHANNEL
 	    ((struct spar_io_channel_protocol __iomem *)addparams->chanptr)) {
-		LOGERR("Timed out, channel not ready\n");
+		pr_err("Timed out, channel not ready\n");
 		POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 		return 0;
 	}
@@ -391,7 +391,7 @@ add_vnic(struct add_virt_guestpart *addparams)
 	vbus = bus_find_device(&virtpci_bus_type, NULL,
 			       (void *)busid, match_busid);
 	if (!vbus) {
-		LOGERR("**** FAILED to find vbus %s\n", busid);
+		pr_err("**** FAILED to find vbus %s\n", busid);
 		return 0;
 	}
 
@@ -425,7 +425,7 @@ delete_vbus(struct del_vbus_guestpart *delparams)
 	vbus = bus_find_device(&virtpci_bus_type, NULL,
 			       (void *)busid, match_busid);
 	if (!vbus) {
-		LOGERR("**** FAILED to find vbus %s\n", busid);
+		pr_err("**** FAILED to find vbus %s\n", busid);
 		return 0;
 	}
 
@@ -619,7 +619,7 @@ static void delete_all(void)
 	/* now delete each vbus */
 	if (bus_for_each_dev
 	    (&virtpci_bus_type, NULL, (void *)1, delete_vbus_device))
-		LOGERR("delete of all vbus failed\n");
+		pr_err("delete of all vbus failed\n");
 }
 
 /* deletes all vnics or vhbas
@@ -637,12 +637,12 @@ static int delete_all_virt(enum virtpci_dev_type devtype,
 	vbus = bus_find_device(&virtpci_bus_type, NULL,
 			       (void *)busid, match_busid);
 	if (!vbus) {
-		LOGERR("**** FAILED to find vbus %s\n", busid);
+		pr_err("**** FAILED to find vbus %s\n", busid);
 		return 0;
 	}
 
 	if ((devtype != VIRTHBA_TYPE) && (devtype != VIRTNIC_TYPE)) {
-		LOGERR("**** FAILED to delete all devices; devtype:%d not vhba:%d or vnic:%d\n",
+		pr_err("**** FAILED to delete all devices; devtype:%d not vhba:%d or vnic:%d\n",
 		       devtype, VIRTHBA_TYPE, VIRTNIC_TYPE);
 		return 0;
 	}
@@ -688,7 +688,7 @@ static int virtpci_ctrlchan_func(struct guest_msgs *msg)
 	case GUEST_RESUME_VNIC:
 		return resume_vnic(&msg->resume_vnic);
 	default:
-		LOGERR("invalid message type %d.\n", msg->msgtype);
+		pr_err("invalid message type %d.\n", msg->msgtype);
 		return 0;
 	}
 }
@@ -783,21 +783,21 @@ static void fix_vbus_dev_info(struct device *dev, int dev_no, int dev_type,
 	const char *stype;
 
 	if (!dev) {
-		LOGERR("%s dev is NULL", __func__);
+		pr_err("%s dev is NULL", __func__);
 		return;
 	}
 	if (!virtpcidrv) {
-		LOGERR("%s driver is NULL", __func__);
+		pr_err("%s driver is NULL", __func__);
 		return;
 	}
 	vbus = dev->parent;
 	if (!vbus) {
-		LOGERR("%s dev has no parent bus", __func__);
+		pr_err("%s dev has no parent bus", __func__);
 		return;
 	}
 	chan = vbus->platform_data;
 	if (!chan) {
-		LOGERR("%s dev bus has no channel", __func__);
+		pr_err("%s dev bus has no channel", __func__);
 		return;
 	}
 	switch (dev_type) {
@@ -937,7 +937,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
 	POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 
 	if ((devtype != VIRTHBA_TYPE) && (devtype != VIRTNIC_TYPE)) {
-		LOGERR("**** FAILED to add device; devtype:%d not vhba:%d or vnic:%d\n",
+		pr_err("**** FAILED to add device; devtype:%d not vhba:%d or vnic:%d\n",
 		       devtype, VIRTHBA_TYPE, VIRTNIC_TYPE);
 		POSTCODE_LINUX_3(VPCI_CREATE_FAILURE_PC, devtype,
 				 POSTCODE_SEVERITY_ERR);
@@ -947,7 +947,6 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
 	/* add a Virtual Device */
 	virtpcidev = kzalloc(sizeof(*virtpcidev), GFP_ATOMIC);
 	if (virtpcidev == NULL) {
-		LOGERR("can't add device - malloc FALLED\n");
 		POSTCODE_LINUX_2(MALLOC_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 		return 0;
 	}
@@ -1009,7 +1008,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
 		 */
 		write_unlock_irqrestore(&vpcidev_list_lock, flags);
 		kfree(virtpcidev);
-		LOGERR("**** FAILED vhba/vnic already exists in the list\n");
+		pr_err("**** FAILED vhba/vnic already exists in the list\n");
 		POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 		return 0;
 	}
@@ -1053,7 +1052,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
 	 * virtpci_device_probe is successful
 	 */
 	if (ret) {
-		LOGERR("device_register returned %d\n", ret);
+		pr_err("device_register returned %d\n", ret);
 		dev = &virtpcidev->generic_dev;
 		SPAR_CHANNEL_CLIENT_TRANSITION(addparams->chanptr,
 					       BUS_ID(dev),
@@ -1097,7 +1096,7 @@ static int virtpci_device_serverdown(struct device *parentbus,
 	int rc = 0;
 
 	if ((devtype != VIRTHBA_TYPE) && (devtype != VIRTNIC_TYPE)) {
-		LOGERR("**** FAILED to pause device; devtype:%d not vhba:%d or vnic:%d\n",
+		pr_err("**** FAILED to pause device; devtype:%d not vhba:%d or vnic:%d\n",
 		       devtype, VIRTHBA_TYPE, VIRTNIC_TYPE);
 		return 0;
 	}
@@ -1136,7 +1135,7 @@ static int virtpci_device_serverdown(struct device *parentbus,
 	write_unlock_irqrestore(&vpcidev_list_lock, flags);
 
 	if (!found) {
-		LOGERR("**** FAILED to find vhba/vnic in the list\n");
+		pr_err("**** FAILED to find vhba/vnic in the list\n");
 		return 0;
 	}
 
@@ -1156,7 +1155,7 @@ static int virtpci_device_serverup(struct device *parentbus,
 	int rc = 0;
 
 	if ((devtype != VIRTHBA_TYPE) && (devtype != VIRTNIC_TYPE)) {
-		LOGERR("**** FAILED to resume device; devtype:%d not vhba:%d or vnic:%d\n",
+		pr_err("**** FAILED to resume device; devtype:%d not vhba:%d or vnic:%d\n",
 		       devtype, VIRTHBA_TYPE, VIRTNIC_TYPE);
 		return 0;
 	}
@@ -1204,7 +1203,7 @@ static int virtpci_device_serverup(struct device *parentbus,
 	write_unlock_irqrestore(&vpcidev_list_lock, flags);
 
 	if (!found) {
-		LOGERR("**** FAILED to find vhba/vnic in the list\n");
+		pr_err("**** FAILED to find vhba/vnic in the list\n");
 		return 0;
 	}
 
@@ -1226,7 +1225,7 @@ static int virtpci_device_del(struct device *parentbus,
 }
 
 	if ((devtype != VIRTHBA_TYPE) && (devtype != VIRTNIC_TYPE)) {
-		LOGERR("**** FAILED to delete device; devtype:%d not vhba:%d or vnic:%d\n",
+		pr_err("**** FAILED to delete device; devtype:%d not vhba:%d or vnic:%d\n",
 		       devtype, VIRTHBA_TYPE, VIRTNIC_TYPE);
 		return 0;
 	}
@@ -1297,7 +1296,7 @@ static int virtpci_device_del(struct device *parentbus,
 	write_unlock_irqrestore(&vpcidev_list_lock, flags);
 
 	if (!all && (count == 0)) {
-		LOGERR("**** FAILED to find vhba/vnic in the list\n");
+		pr_err("**** FAILED to find vhba/vnic in the list\n");
 		return 0;
 	}
 
@@ -1385,7 +1384,7 @@ int virtpci_register_driver(struct virtpci_driver *drv)
 	DBGINF("In virtpci_register_driver\n");
 
 	if (drv->id_table == NULL) {
-		LOGERR("id_table missing\n");
+		pr_err("id_table missing\n");
 		return 1;
 	}
 	/* initialize core driver fields needed to call driver_register */
@@ -1471,7 +1470,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
 	printparam.len = &len;
 	if (bus_for_each_dev(&virtpci_bus_type, NULL,
 			     (void *)&printparam, print_vbus))
-		LOGERR("Failed to find bus\n");
+		pr_err("Failed to find bus\n");
 
 	str_pos += scnprintf(vbuf + str_pos, len - str_pos,
 			"\n Virtual PCI devices\n");
@@ -1534,7 +1533,7 @@ static int __init virtpci_mod_init(void)
 	 * drivers directory
 	 */
 	if (ret) {
-		LOGERR("bus_register ****FAILED:%d\n", ret);
+		pr_err("bus_register ****FAILED:%d\n", ret);
 		POSTCODE_LINUX_3(VPCI_CREATE_FAILURE_PC, ret,
 				 POSTCODE_SEVERITY_ERR);
 		return ret;
@@ -1546,7 +1545,7 @@ static int __init virtpci_mod_init(void)
 	/* create a root bus used to parent all the virtpci buses. */
 	ret = device_register(&virtpci_rootbus_device);
 	if (ret) {
-		LOGERR("device_register FAILED:%d\n", ret);
+		pr_err("device_register FAILED:%d\n", ret);
 		bus_unregister(&virtpci_bus_type);
 		POSTCODE_LINUX_3(VPCI_CREATE_FAILURE_PC, ret,
 				 POSTCODE_SEVERITY_ERR);
@@ -1556,7 +1555,7 @@ static int __init virtpci_mod_init(void)
 
 	if (!uisctrl_register_req_handler(2, (void *)&virtpci_ctrlchan_func,
 					  &chipset_driver_info)) {
-		LOGERR("uisctrl_register_req_handler ****FAILED.\n");
+		pr_err("uisctrl_register_req_handler ****FAILED.\n");
 		POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 		device_unregister(&virtpci_rootbus_device);
 		bus_unregister(&virtpci_bus_type);
@@ -1580,7 +1579,7 @@ static void __exit virtpci_mod_exit(void)
 
 	/* unregister the callback function */
 	if (!uisctrl_register_req_handler(2, NULL, NULL))
-		LOGERR("uisctrl_register_req_handler ****FAILED.\n");
+		pr_err("uisctrl_register_req_handler ****FAILED.\n");
 
 	device_unregister(&virtpci_rootbus_device);
 	bus_unregister(&virtpci_bus_type);
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 6c48ba1..70b6cf2 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -59,7 +59,6 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
 
 	p = kmalloc(sizeof(*p), GFP_KERNEL|__GFP_NORETRY);
 	if (p == NULL) {
-		ERRDRV("allocation failed: (status=0)\n");
 		rc = NULL;
 		goto cleanup;
 	}
@@ -78,13 +77,13 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
 		    visor_memregion_create_overlapped(parent->memregion,
 				off, sizeof(struct channel_header));
 	if (p->memregion == NULL) {
-		ERRDRV("visor_memregion_create failed failed: (status=0)\n");
+		pr_err("visor_memregion_create failed failed: (status=0)\n");
 		rc = NULL;
 		goto cleanup;
 	}
 	if (visor_memregion_read(p->memregion, 0, &p->chan_hdr,
 				 sizeof(struct channel_header)) < 0) {
-		ERRDRV("visor_memregion_read failed: (status=0)\n");
+		pr_err("visor_memregion_read failed: (status=0)\n");
 		rc = NULL;
 		goto cleanup;
 	}
@@ -95,7 +94,7 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
 		/* we had better be a CLIENT of this channel */
 		guid = p->chan_hdr.chtype;
 	if (visor_memregion_resize(p->memregion, channel_bytes) < 0) {
-		ERRDRV("visor_memregion_resize failed: (status=0)\n");
+		pr_err("visor_memregion_resize failed: (status=0)\n");
 		rc = NULL;
 		goto cleanup;
 	}
@@ -257,7 +256,7 @@ visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch,
 	u8 *buf = vmalloc(bufsize);
 
 	if (buf == NULL) {
-		ERRDRV("%s failed memory allocation", __func__);
+		pr_err("%s failed memory allocation", __func__);
 		goto cleanup;
 	}
 	memset(buf, ch, bufsize);
@@ -325,7 +324,7 @@ sig_read_header(struct visorchannel *channel, u32 queue,
 	BOOL rc = FALSE;
 
 	if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) {
-		ERRDRV("oChannelSpace too small: (status=%d)\n", rc);
+		pr_err("oChannelSpace too small: (status=%d)\n", rc);
 		goto cleanup;
 	}
 
@@ -335,9 +334,9 @@ sig_read_header(struct visorchannel *channel, u32 queue,
 				 SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
 				 sig_hdr,
 				 sizeof(struct signal_queue_header)) < 0) {
-		ERRDRV("queue=%d SIG_QUEUE_OFFSET=%d",
+		pr_err("queue=%d SIG_QUEUE_OFFSET=%d",
 		       queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue));
-		ERRDRV("visor_memregion_read of signal queue failed: (status=%d)\n",
+		pr_err("visor_memregion_read of signal queue failed: (status=%d)\n",
 		       rc);
 		goto cleanup;
 	}
@@ -358,14 +357,14 @@ sig_do_data(struct visorchannel *channel, u32 queue,
 		if (visor_memregion_write(channel->memregion,
 					  signal_data_offset,
 					  data, sig_hdr->signal_size) < 0) {
-			ERRDRV("visor_memregion_write of signal data failed: (status=%d)\n",
+			pr_err("visor_memregion_write of signal data failed: (status=%d)\n",
 			       rc);
 			goto cleanup;
 		}
 	} else {
 		if (visor_memregion_read(channel->memregion, signal_data_offset,
 					 data, sig_hdr->signal_size) < 0) {
-			ERRDRV("visor_memregion_read of signal data failed: (status=%d)\n",
+			pr_err("visor_memregion_read of signal data failed: (status=%d)\n",
 			       rc);
 			goto cleanup;
 		}
@@ -404,7 +403,7 @@ safe_sig_queue_validate(struct signal_queue_header *psafe_sqh,
 		punsafe_sqh->head = *phead;
 		punsafe_sqh->tail = *ptail;
 
-		ERRDRV("safe_sig_queue_validate: head = 0x%x, tail = 0x%x, MaxSlots = 0x%x",
+		pr_err("safe_sig_queue_validate: head = 0x%x, tail = 0x%x, MaxSlots = 0x%x",
 		       *phead, *ptail, psafe_sqh->max_slots);
 		return 0;
 	}
@@ -430,7 +429,7 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
 	}
 	sig_hdr.tail = (sig_hdr.tail + 1) % sig_hdr.max_slots;
 	if (!sig_read_data(channel, queue, &sig_hdr, sig_hdr.tail, msg)) {
-		ERRDRV("sig_read_data failed: (status=%d)\n", rc);
+		pr_err("sig_read_data failed: (status=%d)\n", rc);
 		goto cleanup;
 	}
 	sig_hdr.num_received++;
@@ -440,12 +439,12 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
 	 */
 	mb(); /* required for channel synch */
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, tail)) {
-		ERRDRV("visor_memregion_write of Tail failed: (status=%d)\n",
+		pr_err("visor_memregion_write of Tail failed: (status=%d)\n",
 		       rc);
 		goto cleanup;
 	}
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_received)) {
-		ERRDRV("visor_memregion_write of NumSignalsReceived failed: (status=%d)\n",
+		pr_err("visor_memregion_write of NumSignalsReceived failed: (status=%d)\n",
 		       rc);
 		goto cleanup;
 	}
@@ -476,7 +475,7 @@ visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 	if (sig_hdr.head == sig_hdr.tail) {
 		sig_hdr.num_overflows++;
 		if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_overflows)) {
-			ERRDRV("visor_memregion_write of NumOverflows failed: (status=%d)\n",
+			pr_err("visor_memregion_write of NumOverflows failed: (status=%d)\n",
 			       rc);
 			goto cleanup;
 		}
@@ -485,7 +484,7 @@ visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 	}
 
 	if (!sig_write_data(channel, queue, &sig_hdr, sig_hdr.head, msg)) {
-		ERRDRV("sig_write_data failed: (status=%d)\n", rc);
+		pr_err("sig_write_data failed: (status=%d)\n", rc);
 		goto cleanup;
 	}
 	sig_hdr.num_sent++;
@@ -495,12 +494,12 @@ visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg)
 	 */
 	mb(); /* required for channel synch */
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, head)) {
-		ERRDRV("visor_memregion_write of Head failed: (status=%d)\n",
+		pr_err("visor_memregion_write of Head failed: (status=%d)\n",
 		       rc);
 		goto cleanup;
 	}
 	if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, num_sent)) {
-		ERRDRV("visor_memregion_write of NumSignalsSent failed: (status=%d)\n",
+		pr_err("visor_memregion_write of NumSignalsSent failed: (status=%d)\n",
 		       rc);
 		goto cleanup;
 	}
@@ -580,12 +579,12 @@ visorchannel_debug(struct visorchannel *channel, int num_queues,
 	int errcode = 0;
 
 	if (channel == NULL) {
-		ERRDRV("%s no channel", __func__);
+		pr_err("%s no channel", __func__);
 		return;
 	}
 	memregion = channel->memregion;
 	if (memregion == NULL) {
-		ERRDRV("%s no memregion", __func__);
+		pr_err("%s no memregion", __func__);
 		return;
 	}
 	addr = visor_memregion_get_physaddr(memregion);
@@ -668,7 +667,7 @@ visorchannel_dump_section(struct visorchannel *chan, char *s,
 
 	errcode = visorchannel_read(chan, off, buf, len);
 	if (errcode < 0) {
-		ERRDRV("%s failed to read %s from channel errcode=%d",
+		pr_err("%s failed to read %s from channel errcode=%d",
 		       s, __func__, errcode);
 		goto read_failed;
 	}
diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index e51fd4e..24ffd92 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -60,7 +60,7 @@ visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel)
 	if (MAJOR(majordev) == 0) {
 		/* dynamic major device number registration required */
 		if (alloc_chrdev_region(&majordev, 0, 1, MYDRVNAME) < 0) {
-			ERRDRV("Unable to allocate+register char device %s",
+			pr_err("Unable to allocate+register char device %s",
 			       MYDRVNAME);
 			return -1;
 		}
@@ -69,7 +69,7 @@ visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel)
 	} else {
 		/* static major device number registration required */
 		if (register_chrdev_region(majordev, 1, MYDRVNAME) < 0) {
-			ERRDRV("Unable to register char device %s", MYDRVNAME);
+			pr_err("Unable to register char device %s", MYDRVNAME);
 			return -1;
 		}
 		registered = TRUE;
@@ -77,7 +77,7 @@ visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel)
 	}
 	rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1);
 	if (rc  < 0) {
-		ERRDRV("failed to create char device: (status=%d)\n", rc);
+		pr_err("failed to create char device: (status=%d)\n", rc);
 		return -1;
 	}
 	INFODRV("Registered char device for %s (major=%d)",
@@ -129,14 +129,14 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 	/* sv_enable_dfp(); */
 	DEBUGDRV("%s", __func__);
 	if (offset & (PAGE_SIZE - 1)) {
-		ERRDRV("%s virtual address NOT page-aligned!", __func__);
+		pr_err("%s virtual address NOT page-aligned!", __func__);
 		return -ENXIO;	/* need aligned offsets */
 	}
 	switch (offset) {
 	case VISORCHIPSET_MMAP_CONTROLCHANOFFSET:
 		vma->vm_flags |= VM_IO;
 		if (*file_controlvm_channel == NULL) {
-			ERRDRV("%s no controlvm channel yet", __func__);
+			pr_err("%s no controlvm channel yet", __func__);
 			return -ENXIO;
 		}
 		visorchannel_read(*file_controlvm_channel,
@@ -144,7 +144,7 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 				 gp_control_channel),
 			&addr, sizeof(addr));
 		if (addr == 0) {
-			ERRDRV("%s control channel address is 0", __func__);
+			pr_err("%s control channel address is 0", __func__);
 			return -ENXIO;
 		}
 		physaddr = (ulong)addr;
@@ -154,7 +154,7 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 				    vma->vm_end - vma->vm_start,
 				    /*pgprot_noncached */
 				    (vma->vm_page_prot))) {
-			ERRDRV("%s remap_pfn_range failed", __func__);
+			pr_err("%s remap_pfn_range failed", __func__);
 			return -EAGAIN;
 		}
 		break;
@@ -191,7 +191,7 @@ long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		       adjustment);
 		return issue_vmcall_update_physical_time(adjustment);
 	default:
-		LOGERR("visorchipset_ioctl received invalid command");
+		pr_err("visorchipset_ioctl received invalid command");
 		return -EFAULT;
 	}
 }
diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c
index 9edbd3b..aded3b44 100644
--- a/drivers/staging/unisys/visorchipset/parser.c
+++ b/drivers/staging/unisys/visorchipset/parser.c
@@ -59,7 +59,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 		allocbytes++;
 	if ((Controlvm_Payload_Bytes_Buffered + bytes)
 	    > MAX_CONTROLVM_PAYLOAD_BYTES) {
-		ERRDRV("%s (%s:%d) - prevented allocation of %d bytes to prevent exceeding throttling max (%d)",
+		pr_err("%s (%s:%d) - prevented allocation of %d bytes to prevent exceeding throttling max (%d)",
 		       __func__, __FILE__, __LINE__, allocbytes,
 		       MAX_CONTROLVM_PAYLOAD_BYTES);
 		if (tryAgain)
@@ -69,8 +69,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 	}
 	ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY);
 	if (ctx == NULL) {
-		ERRDRV("%s (%s:%d) - failed to allocate %d bytes",
-		       __func__, __FILE__, __LINE__, allocbytes);
 		if (tryAgain)
 			*tryAgain = TRUE;
 		rc = NULL;
@@ -86,7 +84,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 		void *p;
 
 		if (addr > virt_to_phys(high_memory - 1)) {
-			ERRDRV("%s - bad local address (0x%-16.16Lx for %lu)",
+			pr_err("%s - bad local address (0x%-16.16Lx for %lu)",
 			       __func__,
 			       (unsigned long long) addr, (ulong) bytes);
 			rc = NULL;
@@ -112,14 +110,14 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 	}
 	phdr = (struct spar_controlvm_parameters_header *)(ctx->data);
 	if (phdr->total_length != bytes) {
-		ERRDRV("%s - bad total length %lu (should be %lu)",
+		pr_err("%s - bad total length %lu (should be %lu)",
 		       __func__,
 		       (ulong) (phdr->total_length), (ulong) (bytes));
 		rc = NULL;
 		goto Away;
 	}
 	if (phdr->total_length < phdr->header_length) {
-		ERRDRV("%s - total length < header length (%lu < %lu)",
+		pr_err("%s - total length < header length (%lu < %lu)",
 		       __func__,
 		       (ulong) (phdr->total_length),
 		       (ulong) (phdr->header_length));
@@ -128,7 +126,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 	}
 	if (phdr->header_length <
 	    sizeof(struct spar_controlvm_parameters_header)) {
-		ERRDRV("%s - header is too small (%lu < %lu)",
+		pr_err("%s - header is too small (%lu < %lu)",
 		       __func__,
 		       (ulong) (phdr->header_length),
 		       (ulong)(sizeof(
@@ -201,7 +199,7 @@ parser_id_get(PARSER_CONTEXT *ctx)
 	struct spar_controlvm_parameters_header *phdr = NULL;
 
 	if (ctx == NULL) {
-		ERRDRV("%s (%s:%d) - no context",
+		pr_err("%s (%s:%d) - no context",
 		       __func__, __FILE__, __LINE__);
 		return NULL_UUID_LE;
 	}
@@ -215,7 +213,7 @@ parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string)
 	struct spar_controlvm_parameters_header *phdr = NULL;
 
 	if (ctx == NULL) {
-		ERRDRV("%s (%s:%d) - no context",
+		pr_err("%s (%s:%d) - no context",
 		       __func__, __FILE__, __LINE__);
 		goto Away;
 	}
@@ -238,7 +236,7 @@ parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string)
 		ctx->bytes_remaining = phdr->name_length;
 		break;
 	default:
-		ERRDRV("%s - bad which_string %d", __func__, which_string);
+		pr_err("%s - bad which_string %d", __func__, which_string);
 		break;
 	}
 
@@ -322,7 +320,7 @@ parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
 
 	while (*pscan != ':') {
 		if (namesize <= 0) {
-			ERRDRV("%s - name too big", __func__);
+			pr_err("%s - name too big", __func__);
 			return NULL;
 		}
 		*pnam = toupper(*pscan);
@@ -331,13 +329,13 @@ parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
 		pscan++;
 		nscan--;
 		if (nscan == 0) {
-			ERRDRV("%s - unexpected end of input parsing name",
+			pr_err("%s - unexpected end of input parsing name",
 			       __func__);
 			return NULL;
 		}
 	}
 	if (namesize <= 0) {
-		ERRDRV("%s - name too big", __func__);
+		pr_err("%s - name too big", __func__);
 		return NULL;
 	}
 	*pnam = '\0';
@@ -351,13 +349,13 @@ parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
 		pscan++;
 		nscan--;
 		if (nscan == 0) {
-			ERRDRV("%s - unexpected end of input looking for value",
+			pr_err("%s - unexpected end of input looking for value",
 			       __func__);
 			return NULL;
 		}
 	}
 	if (nscan == 0) {
-		ERRDRV("%s - unexpected end of input looking for value",
+		pr_err("%s - unexpected end of input looking for value",
 		       __func__);
 		return NULL;
 	}
@@ -366,7 +364,7 @@ parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
 		pscan++;
 		nscan--;
 		if (nscan == 0) {
-			ERRDRV("%s - unexpected end of input after %c",
+			pr_err("%s - unexpected end of input after %c",
 			       __func__, closing_quote);
 			return NULL;
 		}
@@ -378,7 +376,8 @@ parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
 	for (i = 0, value_length = -1; i < nscan; i++) {
 		if (closing_quote) {
 			if (pscan[i] == '\0') {
-				ERRDRV("%s - unexpected end of input parsing quoted value", __func__);
+				pr_err("%s - unexpected end of input parsing quoted value",
+				       __func__);
 				return NULL;
 			}
 			if (pscan[i] == closing_quote) {
@@ -394,7 +393,8 @@ parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
 	}
 	if (value_length < 0) {
 		if (closing_quote) {
-			ERRDRV("%s - unexpected end of input parsing quoted value", __func__);
+			pr_err("%s - unexpected end of input parsing quoted value",
+			       __func__);
 			return NULL;
 		}
 		value_length = nscan;
@@ -433,7 +433,8 @@ parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
 				pscan++;
 				nscan--;
 			} else if (*pscan != '\0') {
-				ERRDRV("%s - missing separator after quoted string", __func__);
+				pr_err("%s - missing separator after quoted string",
+				       __func__);
 				kfree(value);
 				value = NULL;
 				return NULL;
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 82e259d..b13eed7 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -664,7 +664,7 @@ chipset_init(struct controlvm_message *inmsg)
 
 	POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 	if (chipset_inited) {
-		LOGERR("CONTROLVM_CHIPSET_INIT Failed: Already Done.");
+		pr_err("CONTROLVM_CHIPSET_INIT Failed: Already Done.");
 		rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
 		goto Away;
 	}
@@ -724,7 +724,7 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response)
 	}
 	if (!visorchannel_signalinsert(ControlVm_channel,
 				       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
-		LOGERR("signalinsert failed!");
+		pr_err("signalinsert failed!");
 		return;
 	}
 }
@@ -740,7 +740,7 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msgHdr,
 	outmsg.cmd.init_chipset.features = features;
 	if (!visorchannel_signalinsert(ControlVm_channel,
 				       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
-		LOGERR("signalinsert failed!");
+		pr_err("signalinsert failed!");
 		return;
 	}
 }
@@ -756,7 +756,7 @@ static void controlvm_respond_physdev_changestate(
 	outmsg.cmd.device_change_state.flags.phys_device = 1;
 	if (!visorchannel_signalinsert(ControlVm_channel,
 				       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
-		LOGERR("signalinsert failed!");
+		pr_err("signalinsert failed!");
 		return;
 	}
 }
@@ -773,14 +773,14 @@ visorchipset_save_message(struct controlvm_message *msg,
 			      offsetof(struct spar_controlvm_channel_protocol,
 				       saved_crash_message_count),
 			      &localSavedCrashMsgCount, sizeof(u16)) < 0) {
-		LOGERR("failed to get Saved Message Count");
+		pr_err("failed to get Saved Message Count");
 		POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
 	}
 
 	if (localSavedCrashMsgCount != CONTROLVM_CRASHMSG_MAX) {
-		LOGERR("Saved Message Count incorrect %d",
+		pr_err("Saved Message Count incorrect %d",
 		       localSavedCrashMsgCount);
 		POSTCODE_LINUX_3(CRASH_DEV_COUNT_FAILURE_PC,
 				 localSavedCrashMsgCount,
@@ -793,7 +793,7 @@ visorchipset_save_message(struct controlvm_message *msg,
 			      offsetof(struct spar_controlvm_channel_protocol,
 				       saved_crash_message_offset),
 			      &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
-		LOGERR("failed to get Saved Message Offset");
+		pr_err("failed to get Saved Message Offset");
 		POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
@@ -804,7 +804,7 @@ visorchipset_save_message(struct controlvm_message *msg,
 				       localSavedCrashMsgOffset,
 				       msg,
 				       sizeof(struct controlvm_message)) < 0) {
-			LOGERR("SAVE_MSG_BUS_FAILURE: Failed to write CrashCreateBusMsg!");
+			pr_err("SAVE_MSG_BUS_FAILURE: Failed to write CrashCreateBusMsg!");
 			POSTCODE_LINUX_2(SAVE_MSG_BUS_FAILURE_PC,
 					 POSTCODE_SEVERITY_ERR);
 			return;
@@ -814,7 +814,7 @@ visorchipset_save_message(struct controlvm_message *msg,
 				       localSavedCrashMsgOffset +
 				       sizeof(struct controlvm_message), msg,
 				       sizeof(struct controlvm_message)) < 0) {
-			LOGERR("SAVE_MSG_DEV_FAILURE: Failed to write CrashCreateDevMsg!");
+			pr_err("SAVE_MSG_DEV_FAILURE: Failed to write CrashCreateDevMsg!");
 			POSTCODE_LINUX_2(SAVE_MSG_DEV_FAILURE_PC,
 					 POSTCODE_SEVERITY_ERR);
 			return;
@@ -831,7 +831,7 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response)
 
 	p = findbus(&BusInfoList, busNo);
 	if (!p) {
-		LOGERR("internal error busNo=%lu", busNo);
+		pr_err("internal error busNo=%lu", busNo);
 		return;
 	}
 	if (response < 0) {
@@ -847,11 +847,11 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response)
 	}
 
 	if (p->pending_msg_hdr.id == CONTROLVM_INVALID) {
-		LOGERR("bus_responder no pending msg");
+		pr_err("bus_responder no pending msg");
 		return;		/* no controlvm response needed */
 	}
 	if (p->pending_msg_hdr.id != (u32) cmdId) {
-		LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
+		pr_err("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
 		return;
 	}
 	controlvm_respond(&p->pending_msg_hdr, response);
@@ -872,15 +872,15 @@ device_changestate_responder(enum controlvm_id cmdId,
 
 	p = finddevice(&DevInfoList, busNo, devNo);
 	if (!p) {
-		LOGERR("internal error; busNo=%lu, devNo=%lu", busNo, devNo);
+		pr_err("internal error; busNo=%lu, devNo=%lu", busNo, devNo);
 		return;
 	}
 	if (p->pending_msg_hdr.id == CONTROLVM_INVALID) {
-		LOGERR("device_responder no pending msg");
+		pr_err("device_responder no pending msg");
 		return;		/* no controlvm response needed */
 	}
 	if (p->pending_msg_hdr.id != cmdId) {
-		LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
+		pr_err("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
 		return;
 	}
 
@@ -892,7 +892,7 @@ device_changestate_responder(enum controlvm_id cmdId,
 
 	if (!visorchannel_signalinsert(ControlVm_channel,
 				       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
-		LOGERR("signalinsert failed!");
+		pr_err("signalinsert failed!");
 		return;
 	}
 
@@ -908,7 +908,7 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo,
 
 	p = finddevice(&DevInfoList, busNo, devNo);
 	if (!p) {
-		LOGERR("internal error; busNo=%lu, devNo=%lu", busNo, devNo);
+		pr_err("internal error; busNo=%lu, devNo=%lu", busNo, devNo);
 		return;
 	}
 	if (response >= 0) {
@@ -919,11 +919,11 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo,
 	}
 
 	if (p->pending_msg_hdr.id == CONTROLVM_INVALID) {
-		LOGERR("device_responder no pending msg");
+		pr_err("device_responder no pending msg");
 		return;		/* no controlvm response needed */
 	}
 	if (p->pending_msg_hdr.id != (u32) cmdId) {
-		LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
+		pr_err("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
 		return;
 	}
 	controlvm_respond(&p->pending_msg_hdr, response);
@@ -942,7 +942,7 @@ bus_epilog(u32 busNo,
 	struct visorchipset_bus_info *pBusInfo = findbus(&BusInfoList, busNo);
 
 	if (!pBusInfo) {
-		LOGERR("HUH? bad busNo=%d", busNo);
+		pr_err("HUH? bad busNo=%d", busNo);
 		return;
 	}
 	if (needResponse) {
@@ -1015,7 +1015,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
 	};
 
 	if (!pDevInfo) {
-		LOGERR("HUH? bad busNo=%d, devNo=%d", busNo, devNo);
+		pr_err("HUH? bad busNo=%d, devNo=%d", busNo, devNo);
 		return;
 	}
 	if (for_visorbus)
@@ -1109,7 +1109,7 @@ bus_create(struct controlvm_message *inmsg)
 
 	pBusInfo = findbus(&BusInfoList, busNo);
 	if (pBusInfo && (pBusInfo->state.created == 1)) {
-		LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu already exists",
+		pr_err("CONTROLVM_BUS_CREATE Failed: bus %lu already exists",
 		       busNo);
 		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1118,8 +1118,6 @@ bus_create(struct controlvm_message *inmsg)
 	}
 	pBusInfo = kzalloc(sizeof(struct visorchipset_bus_info), GFP_KERNEL);
 	if (pBusInfo == NULL) {
-		LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu kzalloc failed",
-		       busNo);
 		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,
 				 POSTCODE_SEVERITY_ERR);
 		rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
@@ -1163,12 +1161,12 @@ bus_destroy(struct controlvm_message *inmsg)
 
 	pBusInfo = findbus(&BusInfoList, busNo);
 	if (!pBusInfo) {
-		LOGERR("CONTROLVM_BUS_DESTROY Failed: bus %lu invalid", busNo);
+		pr_err("CONTROLVM_BUS_DESTROY Failed: bus %lu invalid", busNo);
 		rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
 		goto Away;
 	}
 	if (pBusInfo->state.created == 0) {
-		LOGERR("CONTROLVM_BUS_DESTROY Failed: bus %lu already destroyed",
+		pr_err("CONTROLVM_BUS_DESTROY Failed: bus %lu already destroyed",
 		     busNo);
 		rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
 		goto Away;
@@ -1193,7 +1191,7 @@ bus_configure(struct controlvm_message *inmsg, PARSER_CONTEXT *parser_ctx)
 
 	pBusInfo = findbus(&BusInfoList, busNo);
 	if (!pBusInfo) {
-		LOGERR("CONTROLVM_BUS_CONFIGURE Failed: bus %lu invalid",
+		pr_err("CONTROLVM_BUS_CONFIGURE Failed: bus %lu invalid",
 		       busNo);
 		POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1201,7 +1199,7 @@ bus_configure(struct controlvm_message *inmsg, PARSER_CONTEXT *parser_ctx)
 		goto Away;
 	}
 	if (pBusInfo->state.created == 0) {
-		LOGERR("CONTROLVM_BUS_CONFIGURE Failed: Invalid bus %lu - not created yet",
+		pr_err("CONTROLVM_BUS_CONFIGURE Failed: Invalid bus %lu - not created yet",
 		     busNo);
 		POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1210,7 +1208,7 @@ bus_configure(struct controlvm_message *inmsg, PARSER_CONTEXT *parser_ctx)
 	}
 	/* TBD - add this check to other commands also... */
 	if (pBusInfo->pending_msg_hdr.id != CONTROLVM_INVALID) {
-		LOGERR("CONTROLVM_BUS_CONFIGURE Failed: bus %lu MsgId=%u outstanding",
+		pr_err("CONTROLVM_BUS_CONFIGURE Failed: bus %lu MsgId=%u outstanding",
 		     busNo, (uint) pBusInfo->pending_msg_hdr.id);
 		POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1242,7 +1240,7 @@ my_device_create(struct controlvm_message *inmsg)
 
 	pDevInfo = finddevice(&DevInfoList, busNo, devNo);
 	if (pDevInfo && (pDevInfo->state.created == 1)) {
-		LOGERR("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu already exists",
+		pr_err("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu already exists",
 		     busNo, devNo);
 		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1251,7 +1249,7 @@ my_device_create(struct controlvm_message *inmsg)
 	}
 	pBusInfo = findbus(&BusInfoList, busNo);
 	if (!pBusInfo) {
-		LOGERR("CONTROLVM_DEVICE_CREATE Failed: Invalid bus %lu - out of range",
+		pr_err("CONTROLVM_DEVICE_CREATE Failed: Invalid bus %lu - out of range",
 		     busNo);
 		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1259,7 +1257,7 @@ my_device_create(struct controlvm_message *inmsg)
 		goto Away;
 	}
 	if (pBusInfo->state.created == 0) {
-		LOGERR("CONTROLVM_DEVICE_CREATE Failed: Invalid bus %lu - not created yet",
+		pr_err("CONTROLVM_DEVICE_CREATE Failed: Invalid bus %lu - not created yet",
 		     busNo);
 		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1268,8 +1266,6 @@ my_device_create(struct controlvm_message *inmsg)
 	}
 	pDevInfo = kzalloc(sizeof(struct visorchipset_device_info), GFP_KERNEL);
 	if (pDevInfo == NULL) {
-		LOGERR("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu kmaloc failed",
-		     busNo, devNo);
 		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
 				 POSTCODE_SEVERITY_ERR);
 		rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
@@ -1322,7 +1318,7 @@ my_device_changestate(struct controlvm_message *inmsg)
 
 	pDevInfo = finddevice(&DevInfoList, busNo, devNo);
 	if (!pDevInfo) {
-		LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: busNo=%lu, devNo=%lu invalid (doesn't exist)",
+		pr_err("CONTROLVM_DEVICE_CHANGESTATE Failed: busNo=%lu, devNo=%lu invalid (doesn't exist)",
 		     busNo, devNo);
 		POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1330,7 +1326,7 @@ my_device_changestate(struct controlvm_message *inmsg)
 		goto Away;
 	}
 	if (pDevInfo->state.created == 0) {
-		LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: busNo=%lu, devNo=%lu invalid (not created)",
+		pr_err("CONTROLVM_DEVICE_CHANGESTATE Failed: busNo=%lu, devNo=%lu invalid (not created)",
 		     busNo, devNo);
 		POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo,
 				 POSTCODE_SEVERITY_ERR);
@@ -1356,13 +1352,13 @@ my_device_destroy(struct controlvm_message *inmsg)
 
 	pDevInfo = finddevice(&DevInfoList, busNo, devNo);
 	if (!pDevInfo) {
-		LOGERR("CONTROLVM_DEVICE_DESTROY Failed: busNo=%lu, devNo=%lu invalid",
+		pr_err("CONTROLVM_DEVICE_DESTROY Failed: busNo=%lu, devNo=%lu invalid",
 		     busNo, devNo);
 		rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
 		goto Away;
 	}
 	if (pDevInfo->state.created == 0) {
-		LOGERR("CONTROLVM_DEVICE_DESTROY Failed: busNo=%lu, devNo=%lu already destroyed",
+		pr_err("CONTROLVM_DEVICE_DESTROY Failed: busNo=%lu, devNo=%lu already destroyed",
 		     busNo, devNo);
 		rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
 	}
@@ -1390,21 +1386,21 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,
 	int rc = CONTROLVM_RESP_SUCCESS;
 
 	if (info == NULL) {
-		LOGERR("HUH ? CONTROLVM_PAYLOAD_INIT Failed : Programmer check at %s:%d",
+		pr_err("HUH ? CONTROLVM_PAYLOAD_INIT Failed : Programmer check at %s:%d",
 		     __FILE__, __LINE__);
 		rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
 		goto Away;
 	}
 	memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO));
 	if ((offset == 0) || (bytes == 0)) {
-		LOGERR("CONTROLVM_PAYLOAD_INIT Failed: request_payload_offset=%llu request_payload_bytes=%llu!",
+		pr_err("CONTROLVM_PAYLOAD_INIT Failed: request_payload_offset=%llu request_payload_bytes=%llu!",
 		     (u64) offset, (u64) bytes);
 		rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
 		goto Away;
 	}
 	payload = ioremap_cache(phys_addr + offset, bytes);
 	if (payload == NULL) {
-		LOGERR("CONTROLVM_PAYLOAD_INIT Failed: ioremap_cache %llu for %llu bytes failed",
+		pr_err("CONTROLVM_PAYLOAD_INIT Failed: ioremap_cache %llu for %llu bytes failed",
 		     (u64) offset, (u64) bytes);
 		rc = -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
 		goto Away;
@@ -1447,7 +1443,7 @@ initialize_controlvm_payload(void)
 			      offsetof(struct spar_controlvm_channel_protocol,
 				       request_payload_offset),
 			      &payloadOffset, sizeof(payloadOffset)) < 0) {
-		LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!");
+		pr_err("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!");
 		POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
@@ -1456,7 +1452,7 @@ initialize_controlvm_payload(void)
 			      offsetof(struct spar_controlvm_channel_protocol,
 				       request_payload_bytes),
 			      &payloadBytes, sizeof(payloadBytes)) < 0) {
-		LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!");
+		pr_err("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!");
 		POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
@@ -1551,7 +1547,7 @@ read_controlvm_event(struct controlvm_message *msg)
 				      CONTROLVM_QUEUE_EVENT, msg)) {
 		/* got a message */
 		if (msg->hdr.flags.test_message == 1) {
-			LOGERR("ignoring bad CONTROLVM_QUEUE_EVENT msg with controlvm_msg_id=0x%x because Flags.testMessage is nonsensical (=1)",
+			pr_err("ignoring bad CONTROLVM_QUEUE_EVENT msg with controlvm_msg_id=0x%x because Flags.testMessage is nonsensical (=1)",
 			       msg->hdr.id);
 			return FALSE;
 		}
@@ -1739,7 +1735,7 @@ parahotplug_process_message(struct controlvm_message *inmsg)
 	req = parahotplug_request_create(inmsg);
 
 	if (req == NULL) {
-		LOGERR("parahotplug_process_message: couldn't allocate request");
+		pr_err("parahotplug_process_message: couldn't allocate request");
 		return;
 	}
 
@@ -1796,7 +1792,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
 	/* create parsing context if necessary */
 	isLocalAddr = (inmsg.hdr.flags.test_message == 1);
 	if (channel_addr == 0) {
-		LOGERR("HUH? channel_addr is 0!");
+		pr_err("HUH? channel_addr is 0!");
 		return TRUE;
 	}
 	parametersAddr = channel_addr + inmsg.hdr.payload_vm_offset;
@@ -1908,7 +1904,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
 		chipset_notready(&inmsg.hdr);
 		break;
 	default:
-		LOGERR("unrecognized controlvm cmd=%d", (int) inmsg.hdr.id);
+		pr_err("unrecognized controlvm cmd=%d", (int) inmsg.hdr.id);
 		if (inmsg.hdr.flags.response_expected)
 			controlvm_respond(&inmsg.hdr,
 					  -CONTROLVM_RESP_ERROR_MESSAGE_ID_UNKNOWN);
@@ -1928,7 +1924,7 @@ static HOSTADDRESS controlvm_get_channel_address(void)
 	u32 size = 0;
 
 	if (!VMCALL_SUCCESSFUL(issue_vmcall_io_controlvm_addr(&addr, &size))) {
-		ERRDRV("%s - vmcall to determine controlvm channel addr failed",
+		pr_err("%s - vmcall to determine controlvm channel addr failed",
 		       __func__);
 		return 0;
 	}
@@ -1977,7 +1973,7 @@ controlvm_periodic_work(struct work_struct *work)
 					 CONTROLVM_QUEUE_RESPONSE,
 					 &inmsg)) {
 		if (inmsg.hdr.payload_max_bytes != 0) {
-			LOGERR("Payload of size %lu returned @%lu with unexpected message id %d.",
+			pr_err("Payload of size %lu returned @%lu with unexpected message id %d.",
 			     (ulong) inmsg.hdr.payload_max_bytes,
 			     (ulong) inmsg.hdr.payload_vm_offset,
 			     inmsg.hdr.id);
@@ -2076,14 +2072,14 @@ setup_crash_devices_work_queue(struct work_struct *work)
 			      offsetof(struct spar_controlvm_channel_protocol,
 				       saved_crash_message_count),
 			      &localSavedCrashMsgCount, sizeof(u16)) < 0) {
-		LOGERR("failed to get Saved Message Count");
+		pr_err("failed to get Saved Message Count");
 		POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
 	}
 
 	if (localSavedCrashMsgCount != CONTROLVM_CRASHMSG_MAX) {
-		LOGERR("Saved Message Count incorrect %d",
+		pr_err("Saved Message Count incorrect %d",
 		       localSavedCrashMsgCount);
 		POSTCODE_LINUX_3(CRASH_DEV_COUNT_FAILURE_PC,
 				 localSavedCrashMsgCount,
@@ -2096,7 +2092,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
 			      offsetof(struct spar_controlvm_channel_protocol,
 				       saved_crash_message_offset),
 			      &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
-		LOGERR("failed to get Saved Message Offset");
+		pr_err("failed to get Saved Message Offset");
 		POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
@@ -2107,7 +2103,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
 			      localSavedCrashMsgOffset,
 			      &localCrashCreateBusMsg,
 			      sizeof(struct controlvm_message)) < 0) {
-		LOGERR("CRASH_DEV_RD_BUS_FAIULRE: Failed to read CrashCreateBusMsg!");
+		pr_err("CRASH_DEV_RD_BUS_FAIULRE: Failed to read CrashCreateBusMsg!");
 		POSTCODE_LINUX_2(CRASH_DEV_RD_BUS_FAIULRE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
@@ -2119,7 +2115,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
 			      sizeof(struct controlvm_message),
 			      &localCrashCreateDevMsg,
 			      sizeof(struct controlvm_message)) < 0) {
-		LOGERR("CRASH_DEV_RD_DEV_FAIULRE: Failed to read CrashCreateDevMsg!");
+		pr_err("CRASH_DEV_RD_DEV_FAIULRE: Failed to read CrashCreateDevMsg!");
 		POSTCODE_LINUX_2(CRASH_DEV_RD_DEV_FAIULRE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
@@ -2129,7 +2125,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
 	if (localCrashCreateBusMsg.cmd.create_bus.channel_addr != 0)
 		bus_create(&localCrashCreateBusMsg);
 	else {
-		LOGERR("CrashCreateBusMsg is null, no dump will be taken");
+		pr_err("CrashCreateBusMsg is null, no dump will be taken");
 		POSTCODE_LINUX_2(CRASH_DEV_BUS_NULL_FAILURE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
@@ -2139,7 +2135,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
 	if (localCrashCreateDevMsg.cmd.create_device.channel_addr != 0)
 		my_device_create(&localCrashCreateDevMsg);
 	else {
-		LOGERR("CrashCreateDevMsg is null, no dump will be taken");
+		pr_err("CrashCreateDevMsg is null, no dump will be taken");
 		POSTCODE_LINUX_2(CRASH_DEV_DEV_NULL_FAILURE_PC,
 				 POSTCODE_SEVERITY_ERR);
 		return;
@@ -2204,7 +2200,7 @@ visorchipset_get_bus_info(ulong bus_no, struct visorchipset_bus_info *bus_info)
 	void *p = findbus(&BusInfoList, bus_no);
 
 	if (!p) {
-		LOGERR("(%lu) failed", bus_no);
+		pr_err("(%lu) failed", bus_no);
 		return FALSE;
 	}
 	memcpy(bus_info, p, sizeof(struct visorchipset_bus_info));
@@ -2218,7 +2214,7 @@ visorchipset_set_bus_context(ulong bus_no, void *context)
 	struct visorchipset_bus_info *p = findbus(&BusInfoList, bus_no);
 
 	if (!p) {
-		LOGERR("(%lu) failed", bus_no);
+		pr_err("(%lu) failed", bus_no);
 		return FALSE;
 	}
 	p->bus_driver_context = context;
@@ -2233,7 +2229,7 @@ visorchipset_get_device_info(ulong bus_no, ulong dev_no,
 	void *p = finddevice(&DevInfoList, bus_no, dev_no);
 
 	if (!p) {
-		LOGERR("(%lu,%lu) failed", bus_no, dev_no);
+		pr_err("(%lu,%lu) failed", bus_no, dev_no);
 		return FALSE;
 	}
 	memcpy(dev_info, p, sizeof(struct visorchipset_device_info));
@@ -2248,7 +2244,7 @@ visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context)
 			finddevice(&DevInfoList, bus_no, dev_no);
 
 	if (!p) {
-		LOGERR("(%lu,%lu) failed", bus_no, dev_no);
+		pr_err("(%lu,%lu) failed", bus_no, dev_no);
 		return FALSE;
 	}
 	p->bus_driver_context = context;
@@ -2279,7 +2275,7 @@ visorchipset_cache_alloc(struct kmem_cache *pool, BOOL ok_to_block,
 	gfp |= __GFP_NORETRY;
 	p = kmem_cache_alloc(pool, gfp);
 	if (!p) {
-		LOGERR("kmem_cache_alloc failed early @%s:%d\n", fn, ln);
+		pr_err("kmem_cache_alloc failed early @%s:%d\n", fn, ln);
 		return NULL;
 	}
 	atomic_inc(&Visorchipset_cache_buffers_in_use);
@@ -2292,7 +2288,7 @@ void
 visorchipset_cache_free(struct kmem_cache *pool, void *p, char *fn, int ln)
 {
 	if (!p) {
-		LOGERR("NULL pointer @%s:%d\n", fn, ln);
+		pr_err("NULL pointer @%s:%d\n", fn, ln);
 		return;
 	}
 	atomic_dec(&Visorchipset_cache_buffers_in_use);
@@ -2379,7 +2375,7 @@ visorchipset_init(void)
 	atomic_set(&LiveDump_info.buffers_in_use, 0);
 
 	if (visorchipset_testvnic) {
-		ERRDRV("testvnic option no longer supported: (status = %d)\n",
+		pr_err("testvnic option no longer supported: (status = %d)\n",
 		       x);
 		POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, x, DIAG_SEVERITY_ERR);
 		rc = x;
@@ -2399,20 +2395,21 @@ visorchipset_init(void)
 			       visorchannel_id(ControlVm_channel, s));
 			initialize_controlvm_payload();
 		} else {
-			LOGERR("controlvm channel is invalid");
+			pr_err("controlvm channel is invalid");
 			visorchannel_destroy(ControlVm_channel);
 			ControlVm_channel = NULL;
 			return -ENODEV;
 		}
 	} else {
-		LOGERR("no controlvm channel discovered");
+		pr_err("no controlvm channel discovered");
 		return -ENODEV;
 	}
 
 	MajorDev = MKDEV(visorchipset_major, 0);
 	rc = visorchipset_file_init(MajorDev, &ControlVm_channel);
 	if (rc < 0) {
-		ERRDRV("visorchipset_file_init(MajorDev, &ControlVm_channel): error (status=%d)\n", rc);
+		pr_err("visorchipset_file_init(MajorDev, &ControlVm_channel): error (status=%d)\n",
+		       rc);
 		POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR);
 		goto Away;
 	}
@@ -2428,7 +2425,7 @@ visorchipset_init(void)
 			      sizeof(struct putfile_buffer_entry),
 			      0, SLAB_HWCACHE_ALIGN, NULL);
 	if (!Putfile_buffer_list_pool) {
-		ERRDRV("failed to alloc Putfile_buffer_list_pool: (status=-1)\n");
+		pr_err("failed to alloc Putfile_buffer_list_pool: (status=-1)\n");
 		POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR);
 		rc = -1;
 		goto Away;
@@ -2447,7 +2444,7 @@ visorchipset_init(void)
 		    create_singlethread_workqueue("visorchipset_controlvm");
 
 		if (Periodic_controlvm_workqueue == NULL) {
-			ERRDRV("cannot create controlvm workqueue: (status=%d)\n",
+			pr_err("cannot create controlvm workqueue: (status=%d)\n",
 			       -ENOMEM);
 			POSTCODE_LINUX_2(CREATE_WORKQUEUE_FAILED_PC,
 					 DIAG_SEVERITY_ERR);
@@ -2459,7 +2456,8 @@ visorchipset_init(void)
 		rc = queue_delayed_work(Periodic_controlvm_workqueue,
 					&Periodic_controlvm_work, Poll_jiffies);
 		if (rc < 0) {
-			ERRDRV("queue_delayed_work(Periodic_controlvm_workqueue, &Periodic_controlvm_work, Poll_jiffies): error (status=%d)\n", rc);
+			pr_err("queue_delayed_work(Periodic_controlvm_workqueue, &Periodic_controlvm_work, Poll_jiffies): error (status=%d)\n",
+			       rc);
 			POSTCODE_LINUX_2(QUEUE_DELAYED_WORK_PC,
 					 DIAG_SEVERITY_ERR);
 			goto Away;
@@ -2469,7 +2467,7 @@ visorchipset_init(void)
 
 	Visorchipset_platform_device.dev.devt = MajorDev;
 	if (platform_device_register(&Visorchipset_platform_device) < 0) {
-		ERRDRV("platform_device_register(visorchipset) failed: (status=-1)\n");
+		pr_err("platform_device_register(visorchipset) failed: (status=-1)\n");
 		POSTCODE_LINUX_2(DEVICE_REGISTER_FAILURE_PC, DIAG_SEVERITY_ERR);
 		rc = -1;
 		goto Away;
@@ -2479,7 +2477,7 @@ visorchipset_init(void)
 	rc = 0;
 Away:
 	if (rc) {
-		LOGERR("visorchipset_init failed");
+		pr_err("visorchipset_init failed");
 		POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, rc,
 				 POSTCODE_SEVERITY_ERR);
 	}
diff --git a/drivers/staging/unisys/visorutil/charqueue.c b/drivers/staging/unisys/visorutil/charqueue.c
index ac7acb7..468e411 100644
--- a/drivers/staging/unisys/visorutil/charqueue.c
+++ b/drivers/staging/unisys/visorutil/charqueue.c
@@ -39,7 +39,7 @@ struct charqueue *visor_charqueue_create(ulong nslots)
 	struct charqueue *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY);
 
 	if (cq == NULL) {
-		ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)",
+		pr_err("visor_charqueue_create allocation failed (alloc_size=%d)",
 		       alloc_size);
 		return NULL;
 	}
diff --git a/drivers/staging/unisys/visorutil/easyproc.c b/drivers/staging/unisys/visorutil/easyproc.c
index 40f1ae9..abda3a8 100644
--- a/drivers/staging/unisys/visorutil/easyproc.c
+++ b/drivers/staging/unisys/visorutil/easyproc.c
@@ -63,7 +63,7 @@ static struct proc_dir_entry *
 	struct proc_dir_entry *p = proc_mkdir_mode(name, S_IFDIR, parent);
 
 	if (p == NULL)
-		ERRDRV("failed to create /proc directory %s", name);
+		pr_err("failed to create /proc directory %s", name);
 	return p;
 }
 
@@ -115,7 +115,7 @@ void visor_easyproc_InitDriver(struct easyproc_driver_info *pdriver,
 	memset(pdriver, 0, sizeof(struct easyproc_driver_info));
 	pdriver->ProcId = procId;
 	if (pdriver->ProcId == NULL)
-		ERRDRV("ProcId cannot be NULL (trouble ahead)!");
+		pr_err("ProcId cannot be NULL (trouble ahead)!");
 	pdriver->Show_driver_info = show_driver_info;
 	pdriver->Show_device_info = show_device_info;
 	if (pdriver->ProcDir == NULL)
@@ -133,7 +133,7 @@ void visor_easyproc_InitDriver(struct easyproc_driver_info *pdriver,
 					 pdriver->ProcDriverDir,
 					 &proc_fops_driver, pdriver);
 		if (pdriver->ProcDriverDiagFile == NULL)
-			ERRDRV("failed to register /proc/%s/driver/diag entry",
+			pr_err("failed to register /proc/%s/driver/diag entry",
 			       pdriver->ProcId);
 	}
 }
@@ -210,9 +210,9 @@ void visor_easyproc_InitDevice(struct easyproc_driver_info *pdriver,
 			proc_create_data("diag", 0, p->procDevicexDir,
 					 &proc_fops_device, p);
 		if (p->procDevicexDiagFile == NULL)
-			ERRDEVX(devno, "failed to register /proc/%s/device/%d/diag entry",
-				pdriver->ProcId, devno
-			       );
+			pr_err("dev%d: failed to register /proc/%s/device/%d/diag entry",
+			       devno, pdriver->ProcId, devno
+			      );
 	}
 	memset(&(p->device_property_info[0]), 0,
 	       sizeof(p->device_property_info));
@@ -230,7 +230,7 @@ void visor_easyproc_CreateDeviceProperty(struct easyproc_device_info *p,
 	struct easyproc_device_property_info *px = NULL;
 
 	if (p->procDevicexDir == NULL) {
-		ERRDRV("state error");
+		pr_err("state error");
 		return;
 	}
 	for (i = 0; i < ARRAY_SIZE(p->device_property_info); i++) {
@@ -240,7 +240,7 @@ void visor_easyproc_CreateDeviceProperty(struct easyproc_device_info *p,
 		}
 	}
 	if (!px) {
-		ERRDEVX(p->devno, "too many device properties");
+		pr_err("dev%d: too many device properties", p->devno);
 		return;
 	}
 	px->devdata = p->devdata;
@@ -248,15 +248,14 @@ void visor_easyproc_CreateDeviceProperty(struct easyproc_device_info *p,
 	px->procEntry = proc_create_data(property_name, 0, p->procDevicexDir,
 					 &proc_fops_device_property, px);
 	if (strlen(property_name)+1 > sizeof(px->property_name)) {
-		ERRDEVX(p->devno, "device property name %s too long",
-			property_name);
+		pr_err("dev%d: device property name %s too long", p->devno,
+		       property_name);
 		return;
 	}
 	strcpy(px->property_name, property_name);
 	if (px->procEntry == NULL) {
-		ERRDEVX(p->devno,
-			"failed to register /proc/%s/device/%d/%s entry",
-			p->pdriver->ProcId, p->devno, property_name);
+		pr_err("dev%d: failed to register /proc/%s/device/%d/%s entry",
+		       p->devno, p->pdriver->ProcId, p->devno, property_name);
 		return;
 	}
 	px->show_device_property_info = show_property_info;
diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c
index 33522cc..a72dcb4 100644
--- a/drivers/staging/unisys/visorutil/memregion_direct.c
+++ b/drivers/staging/unisys/visorutil/memregion_direct.c
@@ -44,7 +44,7 @@ visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes)
 	struct memregion *memregion = kzalloc(sizeof(*memregion),
 					      GFP_KERNEL | __GFP_NORETRY);
 	if (memregion == NULL) {
-		ERRDRV("visor_memregion_create allocation failed");
+		pr_err("visor_memregion_create allocation failed");
 		return NULL;
 	}
 	memregion->physaddr = physaddr;
@@ -71,24 +71,22 @@ visor_memregion_create_overlapped(struct memregion *parent, ulong offset,
 	struct memregion *memregion = NULL;
 
 	if (parent == NULL) {
-		ERRDRV("%s parent is NULL", __func__);
+		pr_err("%s parent is NULL", __func__);
 		return NULL;
 	}
 	if (parent->mapped == NULL) {
-		ERRDRV("%s parent is not mapped!", __func__);
+		pr_err("%s parent is not mapped!", __func__);
 		return NULL;
 	}
 	if ((offset >= parent->nbytes) ||
 	    ((offset + nbytes) >= parent->nbytes)) {
-		ERRDRV("%s range (%lu,%lu) out of parent range",
+		pr_err("%s range (%lu,%lu) out of parent range",
 		       __func__, offset, nbytes);
 		return NULL;
 	}
 	memregion = kzalloc(sizeof(*memregion), GFP_KERNEL|__GFP_NORETRY);
-	if (memregion == NULL) {
-		ERRDRV("%s allocation failed", __func__);
+	if (memregion == NULL)
 		return NULL;
-	}
 
 	memregion->physaddr = parent->physaddr + offset;
 	memregion->nbytes = nbytes;
@@ -107,13 +105,13 @@ mapit(struct memregion *memregion)
 
 	memregion->requested = FALSE;
 	if (!request_mem_region(physaddr, nbytes, MYDRVNAME))
-		ERRDRV("cannot reserve channel memory @0x%lx for 0x%lx-- no big deal",
+		pr_err("cannot reserve channel memory @0x%lx for 0x%lx-- no big deal",
 		       physaddr, nbytes);
 	else
 		memregion->requested = TRUE;
 	memregion->mapped = ioremap_cache(physaddr, nbytes);
 	if (memregion->mapped == NULL) {
-		ERRDRV("cannot ioremap_cache channel memory @0x%lx for 0x%lx",
+		pr_err("cannot ioremap_cache channel memory @0x%lx for 0x%lx",
 		       physaddr, nbytes);
 		return FALSE;
 	}
@@ -181,7 +179,7 @@ memregion_readwrite(BOOL is_write,
 		    void *local, ulong nbytes)
 {
 	if (offset + nbytes > memregion->nbytes) {
-		ERRDRV("memregion_readwrite offset out of range!!");
+		pr_err("memregion_readwrite offset out of range!!");
 		return -EIO;
 	}
 	if (is_write)
diff --git a/drivers/staging/unisys/visorutil/periodic_work.c b/drivers/staging/unisys/visorutil/periodic_work.c
index 0908bf9..0d86fbb 100644
--- a/drivers/staging/unisys/visorutil/periodic_work.c
+++ b/drivers/staging/unisys/visorutil/periodic_work.c
@@ -90,7 +90,7 @@ BOOL visor_periodic_work_nextperiod(struct periodic_work *pw)
 		goto unlock;
 	} else if (queue_delayed_work(pw->workqueue, &pw->work,
 				      pw->jiffy_interval) < 0) {
-		ERRDEV(pw->devnam, "queue_delayed_work failed!");
+		pr_err("%s: queue_delayed_work failed!", pw->devnam);
 		pw->is_scheduled = FALSE;
 		rc = FALSE;
 		goto unlock;
@@ -116,15 +116,15 @@ BOOL visor_periodic_work_start(struct periodic_work *pw)
 		goto unlock;
 	}
 	if (pw->want_to_stop) {
-		ERRDEV(pw->devnam,
-		       "dev_start_periodic_work failed!");
+		pr_err("%s: dev_start_periodic_work failed!", pw->devnam);
 		rc = FALSE;
 		goto unlock;
 	}
 	INIT_DELAYED_WORK(&pw->work, &periodic_work_func);
 	if (queue_delayed_work(pw->workqueue, &pw->work,
 			       pw->jiffy_interval) < 0) {
-		ERRDEV(pw->devnam, "%s queue_delayed_work failed!", __func__);
+		pr_err("%s: %s queue_delayed_work failed!", pw->devnam,
+		       __func__);
 		rc = FALSE;
 		goto unlock;
 	}
diff --git a/drivers/staging/unisys/visorutil/procobjecttree.c b/drivers/staging/unisys/visorutil/procobjecttree.c
index 195772d..c2793f6 100644
--- a/drivers/staging/unisys/visorutil/procobjecttree.c
+++ b/drivers/staging/unisys/visorutil/procobjecttree.c
@@ -97,7 +97,7 @@ createProcDir(const char *name, struct proc_dir_entry *parent)
 	struct proc_dir_entry *p = proc_mkdir_mode(name, S_IFDIR, parent);
 
 	if (p == NULL)
-		ERRDRV("failed to create /proc directory %s", name);
+		pr_err("failed to create /proc directory %s", name);
 	return p;
 }
 
@@ -108,7 +108,7 @@ createProcFile(const char *name, struct proc_dir_entry *parent,
 	struct proc_dir_entry *p = proc_create_data(name, 0, parent,
 						    fops, data);
 	if (p == NULL)
-		ERRDRV("failed to create /proc file %s", name);
+		pr_err("failed to create /proc file %s", name);
 	return p;
 }
 
@@ -138,18 +138,17 @@ MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procDirRoot,
 	struct proc_dir_entry *parent = NULL;
 
 	if (procDirRoot == NULL) {
-		ERRDRV("procDirRoot cannot be NULL!\n");
+		pr_err("procDirRoot cannot be NULL!\n");
 		goto Away;
 	}
 	if (name == NULL || name[0] == NULL) {
-		ERRDRV("name must contain at least 1 node name!\n");
+		pr_err("name must contain at least 1 node name!\n");
 		goto Away;
 	}
 	type = kzalloc(sizeof(MYPROCTYPE), GFP_KERNEL | __GFP_NORETRY);
-	if (type == NULL) {
-		ERRDRV("out of memory\n");
+	if (type == NULL)
 		goto Away;
-	}
+
 	type->name = name;
 	type->propertyNames = propertyNames;
 	type->nProperties = 0;
@@ -165,7 +164,7 @@ MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procDirRoot,
 				 sizeof(struct proc_dir_entry *),
 				 GFP_KERNEL | __GFP_NORETRY);
 	if (type->procDirs == NULL) {
-		ERRDRV("out of memory\n");
+		pr_err("out of memory\n");
 		goto Away;
 	}
 	parent = procDirRoot;
@@ -227,14 +226,13 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
 	int i = 0;
 
 	if (type == NULL) {
-		ERRDRV("type cannot be NULL\n");
+		pr_err("type cannot be NULL\n");
 		goto Away;
 	}
 	obj = kzalloc(sizeof(MYPROCOBJECT), GFP_KERNEL | __GFP_NORETRY);
-	if (obj == NULL) {
-		ERRDRV("out of memory\n");
+	if (obj == NULL)
 		goto Away;
-	}
+
 	obj->type = type;
 	obj->context = context;
 	if (name == NULL) {
@@ -245,7 +243,7 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
 		obj->name = kmalloc(obj->namesize, GFP_KERNEL | __GFP_NORETRY);
 		if (obj->name == NULL) {
 			obj->namesize = 0;
-			ERRDRV("out of memory\n");
+			pr_err("out of memory\n");
 			goto Away;
 		}
 		strcpy(obj->name, name);
@@ -257,14 +255,14 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
 		kzalloc((type->nProperties + 1) * sizeof(PROCDIRENTRYCONTEXT),
 			GFP_KERNEL | __GFP_NORETRY);
 	if (obj->procDirPropertyContexts == NULL) {
-		ERRDRV("out of memory\n");
+		pr_err("out of memory\n");
 		goto Away;
 	}
 	obj->procDirProperties =
 		kzalloc((type->nProperties + 1) * sizeof(struct proc_dir_entry *),
 			GFP_KERNEL | __GFP_NORETRY);
 	if (obj->procDirProperties == NULL) {
-		ERRDRV("out of memory\n");
+		pr_err("out of memory\n");
 		goto Away;
 	}
 	for (i = 0; i < type->nProperties; i++) {
@@ -343,7 +341,7 @@ static int seq_show(struct seq_file *seq, void *offset)
 	PROCDIRENTRYCONTEXT *ctx = (PROCDIRENTRYCONTEXT *)(seq->private);
 
 	if (ctx == NULL) {
-		ERRDRV("I don't have a freakin' clue...");
+		pr_err("I don't have a freakin' clue...");
 		return 0;
 	}
 	(*ctx->show_property)(seq, ctx->procObject->context,
-- 
2.1.0

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

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

* [PATCH 52/69] staging: unisys: remove DBGINF() macros
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (50 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 51/69] staging: unisys: remove ERRDRV and related macros Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2015-01-10  1:37   ` Greg KH
  2014-12-05 22:09 ` [PATCH 53/69] staging: unisys: get rid of LOGINFO() macros Benjamin Romer
                   ` (16 subsequent siblings)
  68 siblings, 1 reply; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Remove the DBGINF() group of logging macros and use pr_debug() instead. Fix
places that used the DBGINF() macro so they actually print the expected value,
because they were not being compiled at all before the switchover.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/include/timskmod.h  |  2 --
 drivers/staging/unisys/include/uniklog.h   | 39 --------------------
 drivers/staging/unisys/uislib/uislib.c     |  8 ++---
 drivers/staging/unisys/uislib/uisutils.c   |  2 +-
 drivers/staging/unisys/virthba/virthba.c   | 57 +++++++++++++++---------------
 drivers/staging/unisys/virtpci/virtpci.c   | 41 ++++++++++-----------
 drivers/staging/unisys/visorchipset/file.c | 18 +++++-----
 7 files changed, 64 insertions(+), 103 deletions(-)

diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h
index 7831dbc..3d563c4 100644
--- a/drivers/staging/unisys/include/timskmod.h
+++ b/drivers/staging/unisys/include/timskmod.h
@@ -91,14 +91,12 @@
 #define WARNDRV(fmt, args...)   LOGWRN(fmt, ## args)
 #define SECUREDRV(fmt, args...) LOGWRN(fmt, ## args)
 #define INFODRV(fmt, args...)   LOGINF(fmt, ## args)
-#define DEBUGDRV(fmt, args...)  DBGINF(fmt, ## args)
 
 #define PRINTKDEV(devname, fmt, args...)  LOGINFDEV(devname, fmt, ## args)
 #define WARNDEV(devname, fmt, args...)    LOGWRNDEV(devname, fmt, ## args)
 #define SECUREDEV(devname, fmt, args...)  LOGWRNDEV(devname, fmt, ## args)
 #define INFODEV(devname, fmt, args...)    LOGINFDEV(devname, fmt, ## args)
 #define INFODEVX(devno, fmt, args...)     LOGINFDEVX(devno, fmt, ## args)
-#define DEBUGDEV(devname, fmt, args...)   DBGINFDEV(devname, fmt, ## args)
 
 /** Verifies the consistency of your PRIVATEDEVICEDATA structure using
  *  conventional "signature" fields:
diff --git a/drivers/staging/unisys/include/uniklog.h b/drivers/staging/unisys/include/uniklog.h
index e94120b..edc12f0 100644
--- a/drivers/staging/unisys/include/uniklog.h
+++ b/drivers/staging/unisys/include/uniklog.h
@@ -26,45 +26,6 @@
 #include <linux/printk.h>
 
 /*
- * # DBGINF
- *
- * \brief Log debug informational message - log a LOG_INFO message only
- *        if DEBUG compiletime option enabled
- *
- * \param devname the device name of the device reporting this message, or
- *                NULL if this message is NOT device-related.
- * \param fmt printf()-style format string containing the message to log.
- * \param args Optional arguments to be formatted and inserted into the
- *             format string.
- * \return nothing
- *
- * Log a message at the LOG_INFO level, but only if DEBUG is enabled.  If
- * DEBUG is disabled, this expands to a no-op.
- */
-
-/*
- * # DBGVER
- *
- * \brief Log debug verbose message - log a LOG_DEBUG message only if
- *        DEBUG compiletime option enabled
- *
- * \param devname the device name of the device reporting this message, or
- *                NULL if this message is NOT device-related.
- * \param fmt printf()-style format string containing the message to log.
- * \param args Optional arguments to be formatted and inserted into the
- *             format string.
- * \return nothing
- *
- * Log a message at the LOG_DEBUG level, but only if DEBUG is enabled.  If
- * DEBUG is disabled, this expands to a no-op.  Note also that LOG_DEBUG
- * messages can be enabled/disabled at runtime as well.
- */
-#define DBGINFDEV(devname, fmt, args...)        do { } while (0)
-#define DBGVERDEV(devname, fmt, args...)        do { } while (0)
-#define DBGINF(fmt, args...)                    do { } while (0)
-#define DBGVER(fmt, args...)                    do { } while (0)
-
-/*
  * # LOGINF
  *
  * \brief Log informational message - logs a message at the LOG_INFO level
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index eb58449..d986fde 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1161,7 +1161,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
 
 /* *start = buf; */
 	if (debug_buf == NULL) {
-		DBGINF("debug_buf == NULL; allocating buffer.\n.");
+		pr_debug("debug_buf == NULL; allocating buffer.\n.");
 		debug_buf = vmalloc(PROC_READ_BUFFER_SIZE);
 
 		if (debug_buf == NULL) {
@@ -1173,7 +1173,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
 	temp = debug_buf;
 
 	if ((*offset == 0) || (!debug_buf_valid)) {
-		DBGINF("calling info_debugfs_read_helper.\n");
+		pr_debug("calling info_debugfs_read_helper.\n");
 		/* if the read fails, then -1 will be returned */
 		total_bytes = info_debugfs_read_helper(&temp, &remaining_bytes);
 		debug_buf_valid = 1;
@@ -1333,7 +1333,7 @@ static int process_incoming(void *v)
 			idle_cycles = idle_cycles + delta_cycles;
 		}
 	}
-	DBGINF("exiting.\n");
+	pr_debug("exiting.\n");
 	complete_and_exit(&incoming_ti.has_stopped, 0);
 }
 
@@ -1513,7 +1513,7 @@ uislib_mod_exit(void)
 	debugfs_remove(platformnumber_debugfs_read);
 	debugfs_remove(dir_debugfs);
 
-	DBGINF("goodbye.\n");
+	pr_debug("goodbye.\n");
 }
 
 module_init(uislib_mod_init);
diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index b4e5907..637cedc 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -53,7 +53,7 @@ uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
 	va_list args;
 	int len;
 
-	DBGINF("buffer = 0x%p : *buffer = 0x%p.\n", buffer, *buffer);
+	pr_debug("buffer = 0x%p : *buffer = 0x%p.\n", buffer, *buffer);
 	va_start(args, format);
 	len = vsnprintf(*buffer, *buffer_remaining, format, args);
 	if (len >= *buffer_remaining) {
diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index a424f96..2decac4 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -26,7 +26,7 @@
  * which start with an 8 digit sequence number, a colon, and then
  * letters after that */
 
-#undef DBGINF
+#undef pr_debug
 
 #include <linux/kernel.h>
 #ifdef CONFIG_MODVERSIONS
@@ -479,7 +479,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	 * initializatoin.  The host is not published to the scsi
 	 * midlayer until scsi_add_host is called.
 	 */
-	DBGINF("calling scsi_host_alloc.\n");
+	pr_debug("calling scsi_host_alloc.\n");
 
 	/* arg 2 passed in length of extra space we want allocated
 	 * with scsi_host struct for our own use scsi_host_alloc
@@ -490,7 +490,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	if (scsihost == NULL)
 		return -ENODEV;
 
-	DBGINF("scsihost: 0x%p, scsihost->this_id: %d, host_no: %d.\n",
+	pr_debug("scsihost: 0x%p, scsihost->this_id: %d, host_no: %d.\n",
 	       scsihost, scsihost->this_id, scsihost->host_no);
 
 	scsihost->this_id = UIS_MAGIC_VHBA;
@@ -524,7 +524,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	     scsihost->can_queue, scsihost->cmd_per_lun, scsihost->max_sectors,
 	     scsihost->sg_tablesize);
 
-	DBGINF("calling scsi_add_host\n");
+	pr_debug("calling scsi_add_host\n");
 
 	/* this creates "host%d" in sysfs.  If 2nd argument is NULL,
 	 * then this generic /sys/devices/platform/host?  device is
@@ -557,7 +557,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	virthbainfo->virtpcidev = virtpcidev;
 	spin_lock_init(&virthbainfo->chinfo.insertlock);
 
-	DBGINF("generic_dev: 0x%p, queueinfo: 0x%p.\n",
+	pr_debug("generic_dev: 0x%p, queueinfo: 0x%p.\n",
 	       &virtpcidev->generic_dev, &virtpcidev->queueinfo);
 
 	init_waitqueue_head(&virthbainfo->rsp_queue);
@@ -581,7 +581,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	       ULTRA_IO_CHANNEL_IS_POLLING,
 	       &virthbainfo->chinfo.queueinfo->chan->features);
 	/* start thread that will receive scsicmnd responses */
-	DBGINF("starting rsp thread -- queueinfo: 0x%p, threadinfo: 0x%p.\n",
+	pr_debug("starting rsp thread -- queueinfo: 0x%p, threadinfo: 0x%p.\n",
 	       virthbainfo->chinfo.queueinfo, &virthbainfo->chinfo.threadinfo);
 
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
@@ -632,9 +632,9 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		rsltq_wait_usecs = 4000000;
 	}
 
-	DBGINF("calling scsi_scan_host.\n");
+	pr_debug("calling scsi_scan_host.\n");
 	scsi_scan_host(scsihost);
-	DBGINF("return from scsi_scan_host.\n");
+	pr_debug("return from scsi_scan_host.\n");
 
 	LOGINF("virthba added scsihost:0x%p\n", scsihost);
 	POSTCODE_LINUX_2(VHBA_PROBE_EXIT_PC, POSTCODE_SEVERITY_INFO);
@@ -656,14 +656,14 @@ virthba_remove(struct virtpci_dev *virtpcidev)
 	LOGINF("Removing virtpcidev: 0x%p, virthbainfo: 0x%p\n", virtpcidev,
 	       virthbainfo);
 
-	DBGINF("removing scsihost: 0x%p, scsihost->this_id: %d\n", scsihost,
+	pr_debug("removing scsihost: 0x%p, scsihost->this_id: %d\n", scsihost,
 	       scsihost->this_id);
 	scsi_remove_host(scsihost);
 
-	DBGINF("stopping thread.\n");
+	pr_debug("stopping thread.\n");
 	uisthread_stop(&virthbainfo->chinfo.threadinfo);
 
-	DBGINF("calling scsi_host_put\n");
+	pr_debug("calling scsi_host_put\n");
 
 	/* decr refcount on scsihost which was incremented by
 	 * scsi_add_host so the scsi_host gets deleted
@@ -687,7 +687,7 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 	       vdest->channel, vdest->id, vdest->lun);
 
 	if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
-		DBGINF("Server is down/changing state. Returning Failure.\n");
+		pr_debug("Server is down/changing state. Returning Failure.\n");
 		return FAILED;
 	}
 
@@ -748,7 +748,7 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 	       scsidev->channel, scsidev->id, scsidev->lun);
 
 	if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
-		DBGINF("Server is down/changing state. Returning Failure.\n");
+		pr_debug("Server is down/changing state. Returning Failure.\n");
 		return FAILED;
 	}
 
@@ -892,7 +892,7 @@ virthba_get_info(struct Scsi_Host *shp)
 static int
 virthba_ioctl(struct scsi_device *dev, int cmd, void __user *arg)
 {
-	DBGINF("In virthba_ioctl: ioctl: cmd=0x%x\n", cmd);
+	pr_debug("In virthba_ioctl: ioctl: cmd=0x%x\n", cmd);
 	return -EINVAL;
 }
 
@@ -917,7 +917,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	int sg_failed = 0;
 
 	if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
-		DBGINF("Server is down/changing state. Returning SCSI_MLQUEUE_DEVICE_BUSY.\n");
+		pr_debug("Server is down/changing state. Returning SCSI_MLQUEUE_DEVICE_BUSY.\n");
 		return SCSI_MLQUEUE_DEVICE_BUSY;
 	}
 
@@ -976,7 +976,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 			pr_err("**** FAILED No scatter list for bufflen > 0\n");
 			BUG_ON(scsi_sg_count(scsicmd) == 0);
 		}
-		DBGINF("No sg; buffer:0x%p bufflen:%d\n",
+		pr_debug("No sg; buffer:0x%p bufflen:%d\n",
 		       scsi_sglist(scsicmd), scsi_bufflen(scsicmd));
 	} else {
 		/* buffer is scatterlist - copy it out */
@@ -1189,7 +1189,7 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 
 		sg = scsi_sglist(scsicmd);
 		for (i = 0; i < scsi_sg_count(scsicmd); i++) {
-			DBGVER("copying OUT OF buf into 0x%p %d\n",
+			pr_debug("copying OUT OF buf into 0x%p %d\n",
 			     sg_page(sg + i), sg[i].length);
 			thispage_orig = kmap_atomic(sg_page(sg + i));
 			thispage = (void *) ((unsigned long)thispage_orig |
@@ -1221,7 +1221,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 static void
 complete_scsi_command(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 {
-	DBGINF("cmdrsp: 0x%p, scsistat:0x%x.\n", cmdrsp, cmdrsp->scsi.scsistat);
+	pr_debug("cmdrsp: 0x%p, scsistat:0x%x.\n", cmdrsp,
+		 cmdrsp->scsi.scsistat);
 
 	/* take what we need out of cmdrsp and complete the scsicmd */
 	scsicmd->result = cmdrsp->scsi.linuxstat;
@@ -1231,7 +1232,7 @@ complete_scsi_command(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 		do_scsi_nolinuxstat(cmdrsp, scsicmd);
 
 	if (scsicmd->scsi_done) {
-		DBGVER("Scsi_DONE\n");
+		pr_debug("Scsi_DONE\n");
 		scsicmd->scsi_done(scsicmd);
 	}
 }
@@ -1349,7 +1350,7 @@ process_incoming_rsps(void *v)
 
 	kfree(cmdrsp);
 
-	DBGINF("exiting processing incoming rsps.\n");
+	pr_debug("exiting processing incoming rsps.\n");
 	complete_and_exit(&dc->threadinfo.has_stopped, 0);
 }
 
@@ -1471,11 +1472,11 @@ virthba_serverup(struct virtpci_dev *virtpcidev)
 	    (struct virthba_info *) ((struct Scsi_Host *) virtpcidev->scsi.
 				     scsihost)->hostdata;
 
-	DBGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
+	pr_debug("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
 	       virtpcidev->device_no);
 
 	if (!virthbainfo->serverdown) {
-		DBGINF("Server up message received while server is already up.\n");
+		pr_debug("Server up message received while server is already up.\n");
 		return 1;
 	}
 	if (virthbainfo->serverchangingstate) {
@@ -1536,7 +1537,7 @@ virthba_serverdown_complete(struct work_struct *work)
 			break;
 		case CMD_SCSITASKMGMT_TYPE:
 			cmdrsp = (struct uiscmdrsp *) pendingdel->sent;
-			DBGINF("cmdrsp=0x%x, notify=0x%x\n", cmdrsp,
+			pr_debug("cmdrsp=0x%p, notify=0x%p\n", cmdrsp,
 			       cmdrsp->scsitaskmgmt.notify);
 			*(int *) cmdrsp->scsitaskmgmt.notifyresult =
 			    TASK_MGMT_FAILED;
@@ -1562,7 +1563,7 @@ virthba_serverdown_complete(struct work_struct *work)
 
 	virtpcidev = virthbainfo->virtpcidev;
 
-	DBGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
+	pr_debug("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
 	       virtpcidev->device_no);
 	virthbainfo->serverdown = true;
 	virthbainfo->serverchangingstate = false;
@@ -1579,8 +1580,8 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 	    (struct virthba_info *) ((struct Scsi_Host *) virtpcidev->scsi.
 				     scsihost)->hostdata;
 
-	DBGINF("virthba_serverdown");
-	DBGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
+	pr_debug("virthba_serverdown");
+	pr_debug("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
 	       virtpcidev->device_no);
 
 	if (!virthbainfo->serverdown && !virthbainfo->serverchangingstate) {
@@ -1603,7 +1604,7 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 static int __init
 virthba_parse_line(char *str)
 {
-	DBGINF("In virthba_parse_line %s\n", str);
+	pr_debug("In virthba_parse_line %s\n", str);
 	return 1;
 }
 
@@ -1620,7 +1621,7 @@ virthba_parse_options(char *line)
 		if (next != NULL)
 			*next++ = 0;
 		if (!virthba_parse_line(line))
-			DBGINF("Unknown option '%s'\n", line);
+			pr_debug("Unknown option '%s'\n", line);
 	}
 
 	POSTCODE_LINUX_2(VHBA_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c
index eb73919..7432850 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -712,8 +712,8 @@ virtpci_match_device(const struct pci_device_id *ids,
 		     const struct virtpci_dev *dev)
 {
 	while (ids->vendor || ids->subvendor || ids->class_mask) {
-		DBGINF("ids->vendor:%x dev->vendor:%x ids->device:%x dev->device:%x\n",
-		       ids->vendor, dev->vendor, ids->device, dev->device);
+		pr_debug("ids->vendor:%x dev->vendor:%x ids->device:%x dev->device:%x\n",
+			 ids->vendor, dev->vendor, ids->device, dev->device);
 
 		if ((ids->vendor == dev->vendor) &&
 		    (ids->device == dev->device))
@@ -735,20 +735,20 @@ static int virtpci_bus_match(struct device *dev, struct device_driver *drv)
 	struct virtpci_driver *virtpcidrv = driver_to_virtpci_driver(drv);
 	int match = 0;
 
-	DBGINF("In virtpci_bus_match dev->bus_id:%s drv->name:%s\n",
-	       dev->bus_id, drv->name);
+	pr_debug("In virtpci_bus_match dev->bus->name:%s drv->name:%s\n",
+		 dev->bus->name, drv->name);
 
 	/* check ids list for a match */
 	if (virtpci_match_device(virtpcidrv->id_table, virtpcidev))
 		match = 1;
 
-	DBGINF("returning match:%d\n", match);
+	pr_debug("returning match:%d\n", match);
 	return match;		/* 0 - no match; 1 - yes it matches */
 }
 
 static int virtpci_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
-	DBGINF("In virtpci_hotplug\n");
+	pr_debug("In virtpci_hotplug\n");
 	/* add variables to the environment prior to the generation of
 	 * hotplug events to user space
 	 */
@@ -759,13 +759,13 @@ static int virtpci_uevent(struct device *dev, struct kobj_uevent_env *env)
 
 static int virtpci_device_suspend(struct device *dev, pm_message_t state)
 {
-	DBGINF("In virtpci_device_suspend -NYI ****\n");
+	pr_debug("In virtpci_device_suspend -NYI ****\n");
 	return 0;
 }
 
 static int virtpci_device_resume(struct device *dev)
 {
-	DBGINF("In virtpci_device_resume -NYI ****\n");
+	pr_debug("In virtpci_device_resume -NYI ****\n");
 	return 0;
 }
 
@@ -892,10 +892,10 @@ static int virtpci_device_remove(struct device *dev_)
 		virtpcidev->mydriver = NULL;
 	}
 
-	DBGINF("calling putdevice\n");
+	pr_debug("calling putdevice\n");
 	put_device(dev_);
 
-	DBGINF("Leaving\n");
+	pr_debug("Leaving\n");
 	return 0;
 }
 
@@ -908,7 +908,7 @@ static void virtpci_bus_release(struct device *dev)
 	/* this function is called when the last reference to the
 	 * device is removed
 	 */
-	DBGINF("In virtpci_bus_release\n");
+	pr_debug("In virtpci_bus_release\n");
 	/* what else is supposed to happen here? */
 }
 
@@ -1039,8 +1039,8 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
 	* list. Otherwise, a device_unregister from this function can
 	* cause a "scheduling while atomic".
 	*/
-	DBGINF("registering device:%p with bus_id:%s\n",
-	       &virtpcidev->generic_dev, virtpcidev->generic_dev.bus_id);
+	pr_debug("registering device:%p with bus name:%s\n",
+		 &virtpcidev->generic_dev, virtpcidev->generic_dev.bus->name);
 	ret = device_register(&virtpcidev->generic_dev);
 	/* NOTE: THIS IS CALLING HOTPLUG virtpci_hotplug!!!
 	 * This call to device_register results in virtpci_bus_match
@@ -1344,7 +1344,7 @@ static ssize_t virtpci_driver_attr_show(struct kobject *kobj,
 	else
 		driver = NULL;
 
-	DBGINF("In virtpci_driver_attr_show driver->name:%s\n", driver->name);
+	pr_debug("In virtpci_driver_attr_show driver->name:%s\n", driver->name);
 	if (driver) {
 		if (dattr->show)
 			ret = dattr->show(driver, buf);
@@ -1367,7 +1367,8 @@ static ssize_t virtpci_driver_attr_store(struct kobject *kobj,
 	else
 		driver = NULL;
 
-	DBGINF("In virtpci_driver_attr_store driver->name:%s\n", driver->name);
+	pr_debug("In virtpci_driver_attr_store driver->name:%s\n",
+		 driver->name);
 
 	if (driver) {
 		if (dattr->store)
@@ -1381,7 +1382,7 @@ int virtpci_register_driver(struct virtpci_driver *drv)
 {
 	int result = 0;
 
-	DBGINF("In virtpci_register_driver\n");
+	pr_debug("In virtpci_register_driver\n");
 
 	if (drv->id_table == NULL) {
 		pr_err("id_table missing\n");
@@ -1415,7 +1416,7 @@ EXPORT_SYMBOL_GPL(virtpci_register_driver);
 
 void virtpci_unregister_driver(struct virtpci_driver *drv)
 {
-	DBGINF("In virtpci_unregister_driver drv:%p\n", drv);
+	pr_debug("In virtpci_unregister_driver drv:%p\n", drv);
 	driver_unregister(&drv->core_driver);
 	/* driver_unregister calls bus_remove_driver
 	 * bus_remove_driver calls device_detach
@@ -1425,7 +1426,7 @@ void virtpci_unregister_driver(struct virtpci_driver *drv)
 	 * virtpci_device_remove
 	 * virtpci_device_remove calls virthba_remove
 	 */
-	DBGINF("Leaving\n");
+	pr_debug("Leaving\n");
 }
 EXPORT_SYMBOL_GPL(virtpci_unregister_driver);
 
@@ -1538,7 +1539,7 @@ static int __init virtpci_mod_init(void)
 				 POSTCODE_SEVERITY_ERR);
 		return ret;
 	}
-	DBGINF("bus_register successful\n");
+	pr_debug("bus_register successful\n");
 	bus_device_info_init(&bus_driver_info, "clientbus", "virtpci",
 			     VERSION, NULL);
 
@@ -1551,7 +1552,7 @@ static int __init virtpci_mod_init(void)
 				 POSTCODE_SEVERITY_ERR);
 		return ret;
 	}
-	DBGINF("device_register successful ret:%x\n", ret);
+	pr_debug("device_register successful ret:%x\n", ret);
 
 	if (!uisctrl_register_req_handler(2, (void *)&virtpci_ctrlchan_func,
 					  &chipset_driver_info)) {
diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index 24ffd92..aca0be0 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -105,7 +105,7 @@ visorchipset_open(struct inode *inode, struct file *file)
 {
 	unsigned minor_number = iminor(inode);
 
-	DEBUGDRV("%s", __func__);
+	pr_debug("%s", __func__);
 	if (minor_number != 0)
 		return -ENODEV;
 	file->private_data = NULL;
@@ -115,7 +115,7 @@ visorchipset_open(struct inode *inode, struct file *file)
 static int
 visorchipset_release(struct inode *inode, struct file *file)
 {
-	DEBUGDRV("%s", __func__);
+	pr_debug("%s", __func__);
 	return 0;
 }
 
@@ -127,7 +127,7 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 	GUEST_PHYSICAL_ADDRESS addr = 0;
 
 	/* sv_enable_dfp(); */
-	DEBUGDRV("%s", __func__);
+	pr_debug("%s", __func__);
 	if (offset & (PAGE_SIZE - 1)) {
 		pr_err("%s virtual address NOT page-aligned!", __func__);
 		return -ENXIO;	/* need aligned offsets */
@@ -148,7 +148,7 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 			return -ENXIO;
 		}
 		physaddr = (ulong)addr;
-		DEBUGDRV("mapping physical address = 0x%lx", physaddr);
+		pr_debug("mapping physical address = 0x%lx", physaddr);
 		if (remap_pfn_range(vma, vma->vm_start,
 				    physaddr >> PAGE_SHIFT,
 				    vma->vm_end - vma->vm_start,
@@ -161,7 +161,7 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
 	default:
 		return -ENOSYS;
 	}
-	DEBUGDRV("%s success!", __func__);
+	pr_debug("%s success!", __func__);
 	return 0;
 }
 
@@ -170,7 +170,7 @@ long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	s64 adjustment;
 	s64 vrtc_offset;
 
-	DBGINF("entered visorchipset_ioctl, cmd=%d", cmd);
+	pr_debug("entered visorchipset_ioctl, cmd=%d", cmd);
 	switch (cmd) {
 	case VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET:
 		/* get the physical rtc offset */
@@ -179,7 +179,7 @@ long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		    ((void __user *)arg, &vrtc_offset, sizeof(vrtc_offset))) {
 			return -EFAULT;
 		}
-		DBGINF("insde visorchipset_ioctl, cmd=%d, vrtc_offset=%lld",
+		pr_debug("insde visorchipset_ioctl, cmd=%d, vrtc_offset=%lld",
 		       cmd, vrtc_offset);
 		return SUCCESS;
 	case VMCALL_UPDATE_PHYSICAL_TIME:
@@ -187,8 +187,8 @@ long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		    (&adjustment, (void __user *)arg, sizeof(adjustment))) {
 			return -EFAULT;
 		}
-		DBGINF("insde visorchipset_ioctl, cmd=%d, adjustment=%lld", cmd,
-		       adjustment);
+		pr_debug("insde visorchipset_ioctl, cmd=%d, adjustment=%lld",
+			 cmd, adjustment);
 		return issue_vmcall_update_physical_time(adjustment);
 	default:
 		pr_err("visorchipset_ioctl received invalid command");
-- 
2.1.0

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

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

* [PATCH 53/69] staging: unisys: get rid of LOGINFO() macros
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (51 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 52/69] staging: unisys: remove DBGINF() macros Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2015-01-10  1:38   ` Greg KH
  2014-12-05 22:09 ` [PATCH 54/69] staging: unisys: remove LOGVER() macros Benjamin Romer
                   ` (15 subsequent siblings)
  68 siblings, 1 reply; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Remove the entire set of LOGINFO() macros and replace them with calls to
pr_info() instead.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/include/timskmod.h          |  5 --
 drivers/staging/unisys/include/uniklog.h           | 29 --------
 drivers/staging/unisys/uislib/uislib.c             | 40 +++++-----
 drivers/staging/unisys/uislib/uisthread.c          |  6 +-
 drivers/staging/unisys/uislib/uisutils.c           |  6 +-
 drivers/staging/unisys/virthba/virthba.c           | 54 +++++++-------
 drivers/staging/unisys/virtpci/virtpci.c           | 72 +++++++++---------
 .../unisys/visorchannel/visorchannel_main.c        |  4 +-
 drivers/staging/unisys/visorchipset/file.c         |  6 +-
 .../unisys/visorchipset/visorchipset_main.c        | 86 +++++++++++-----------
 10 files changed, 137 insertions(+), 171 deletions(-)

diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h
index 3d563c4..5f33d5c 100644
--- a/drivers/staging/unisys/include/timskmod.h
+++ b/drivers/staging/unisys/include/timskmod.h
@@ -87,16 +87,11 @@
 		(void *)(p2) = SWAPPOINTERS_TEMP;	\
 	} while (0)
 
-#define PRINTKDRV(fmt, args...) LOGINF(fmt, ## args)
 #define WARNDRV(fmt, args...)   LOGWRN(fmt, ## args)
 #define SECUREDRV(fmt, args...) LOGWRN(fmt, ## args)
-#define INFODRV(fmt, args...)   LOGINF(fmt, ## args)
 
-#define PRINTKDEV(devname, fmt, args...)  LOGINFDEV(devname, fmt, ## args)
 #define WARNDEV(devname, fmt, args...)    LOGWRNDEV(devname, fmt, ## args)
 #define SECUREDEV(devname, fmt, args...)  LOGWRNDEV(devname, fmt, ## args)
-#define INFODEV(devname, fmt, args...)    LOGINFDEV(devname, fmt, ## args)
-#define INFODEVX(devno, fmt, args...)     LOGINFDEVX(devno, fmt, ## args)
 
 /** Verifies the consistency of your PRIVATEDEVICEDATA structure using
  *  conventional "signature" fields:
diff --git a/drivers/staging/unisys/include/uniklog.h b/drivers/staging/unisys/include/uniklog.h
index edc12f0..74a723e 100644
--- a/drivers/staging/unisys/include/uniklog.h
+++ b/drivers/staging/unisys/include/uniklog.h
@@ -26,35 +26,6 @@
 #include <linux/printk.h>
 
 /*
- * # LOGINF
- *
- * \brief Log informational message - logs a message at the LOG_INFO level
- *
- * \param devname the device name of the device reporting this message, or
- *                NULL if this message is NOT device-related.
- * \param fmt printf()-style format string containing the message to log.
- * \param args Optional arguments to be formatted and inserted into the
- *             format string.
- * \return nothing
- *
- * Logs the specified message at the LOG_INFO level.
- */
-
-#define LOGINF(fmt, args...) pr_info(fmt, ## args)
-#define LOGINFDEV(devname, fmt, args...) \
-	pr_info("%s " fmt, devname, ## args)
-#define LOGINFDEVX(devno, fmt, args...) \
-	pr_info("dev%d " fmt, devno, ## args)
-#define LOGINFNAME(vnic, fmt, args...)				\
-	do {								\
-		if (vnic != NULL) {					\
-			pr_info("%s " fmt, vnic->name, ## args);	\
-		} else {						\
-			pr_info(fmt, ## args);				\
-		}							\
-	} while (0)
-
-/*
  * # LOGVER
  *
  * \brief Log verbose message - logs a message at the LOG_DEBUG level,
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index d986fde..b6a7fb0 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -671,7 +671,7 @@ static int destroy_device(struct controlvm_message *msg, char *buf)
 	dev_no = msg->cmd.destroy_device.bus_no;
 
 	read_lock(&bus_list_lock);
-	LOGINF("destroy_device called for bus_no=%u, dev_no=%u", bus_no,
+	pr_info("destroy_device called for bus_no=%u, dev_no=%u", bus_no,
 	       dev_no);
 	for (bus = bus_list; bus; bus = bus->next) {
 		if (bus->bus_no == bus_no) {
@@ -733,12 +733,12 @@ static int destroy_device(struct controlvm_message *msg, char *buf)
  * kernel paging request"
  */
 		if (dev->polling) {
-			LOGINF("calling uislib_disable_channel_interrupts");
+			pr_info("calling uislib_disable_channel_interrupts");
 			uislib_disable_channel_interrupts(bus_no, dev_no);
 		}
 		/* unmap the channel memory for the device. */
 		if (!msg->hdr.flags.test_message) {
-			LOGINF("destroy_device, doing iounmap");
+			pr_info("destroy_device, doing iounmap");
 			uislib_iounmap(dev->chanptr);
 		}
 		kfree(dev);
@@ -806,7 +806,7 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
 {
 	struct controlvm_message msg;
 
-	LOGINF("enter busNo=0x%x\n", bus_no);
+	pr_info("enter busNo=0x%x\n", bus_no);
 	/* step 0: init the chipset */
 	POSTCODE_LINUX_3(CHIPSET_INIT_ENTRY_PC, bus_no, POSTCODE_SEVERITY_INFO);
 
@@ -826,7 +826,7 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
 			pr_err("init_chipset failed.\n");
 			return 0;
 		}
-		LOGINF("chipset initialized\n");
+		pr_info("chipset initialized\n");
 		POSTCODE_LINUX_3(CHIPSET_INIT_EXIT_PC, bus_no,
 				 POSTCODE_SEVERITY_INFO);
 	}
@@ -906,7 +906,7 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no,
 {
 	struct controlvm_message msg;
 
-	LOGINF(" enter busNo=0x%x devNo=0x%x\n", bus_no, dev_no);
+	pr_info(" enter busNo=0x%x devNo=0x%x\n", bus_no, dev_no);
 	/* chipset init'ed with bus bus has been previously created -
 	* Verify it still exists step 2: create the VHBA device on the
 	* bus
@@ -965,7 +965,7 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no,
 {
 	struct controlvm_message msg;
 
-	LOGINF(" enter busNo=0x%x devNo=0x%x\n", bus_no, dev_no);
+	pr_info(" enter busNo=0x%x devNo=0x%x\n", bus_no, dev_no);
 	/* chipset init'ed with bus bus has been previously created -
 	* Verify it still exists step 2: create the VNIC device on the
 	* bus
@@ -1251,7 +1251,7 @@ static int process_incoming(void *v)
 				wait_cycles = (cur_cycles - old_cycles);
 		}
 	}
-	LOGINF("wait_cycles=%llu", wait_cycles);
+	pr_info("wait_cycles=%llu", wait_cycles);
 	cycles_before_wait = wait_cycles;
 	idle_cycles = 0;
 	poll_dev_start = 0;
@@ -1312,7 +1312,7 @@ static int process_incoming(void *v)
 		if (incoming_ti.should_stop)
 			break;
 		if (en_smart_wakeup == 0xFF) {
-			LOGINF("en_smart_wakeup set to 0xff, to force exiting process_incoming");
+			pr_info("en_smart_wakeup set to 0xff, to force exiting process_incoming");
 			break;
 		}
 		/* wait for POLLJIFFIES_NORMAL jiffies, or until
@@ -1444,26 +1444,26 @@ uislib_mod_init(void)
 	if (!unisys_spar_platform)
 		return -ENODEV;
 
-	LOGINF("MONITORAPIS");
+	pr_info("MONITORAPIS");
 
-	LOGINF("sizeof(struct uiscmdrsp):%lu bytes\n",
+	pr_info("sizeof(struct uiscmdrsp):%lu bytes\n",
 	       (ulong)sizeof(struct uiscmdrsp));
-	LOGINF("sizeof(struct phys_info):%lu\n",
+	pr_info("sizeof(struct phys_info):%lu\n",
 	       (ulong)sizeof(struct phys_info));
-	LOGINF("sizeof(uiscmdrsp_scsi):%lu\n",
+	pr_info("sizeof(uiscmdrsp_scsi):%lu\n",
 	       (ulong)sizeof(struct uiscmdrsp_scsi));
-	LOGINF("sizeof(uiscmdrsp_net):%lu\n",
+	pr_info("sizeof(uiscmdrsp_net):%lu\n",
 	       (ulong)sizeof(struct uiscmdrsp_net));
-	LOGINF("sizeof(CONTROLVM_MESSAGE):%lu bytes\n",
+	pr_info("sizeof(CONTROLVM_MESSAGE):%lu bytes\n",
 	       (ulong)sizeof(struct controlvm_message));
-	LOGINF("sizeof(struct spar_controlvm_channel_protocol):%lu bytes\n",
+	pr_info("sizeof(struct spar_controlvm_channel_protocol):%lu bytes\n",
 	       (ulong)sizeof(struct spar_controlvm_channel_protocol));
-	LOGINF("sizeof(CHANNEL_HEADER):%lu bytes\n",
+	pr_info("sizeof(CHANNEL_HEADER):%lu bytes\n",
 	       (ulong)sizeof(struct channel_header));
-	LOGINF("sizeof(struct spar_io_channel_protocol):%lu bytes\n",
+	pr_info("sizeof(struct spar_io_channel_protocol):%lu bytes\n",
 	       (ulong)sizeof(struct spar_io_channel_protocol));
-	LOGINF("SIZEOF_CMDRSP:%lu bytes\n", SIZEOF_CMDRSP);
-	LOGINF("SIZEOF_PROTOCOL:%lu bytes\n", SIZEOF_PROTOCOL);
+	pr_info("SIZEOF_CMDRSP:%lu bytes\n", SIZEOF_CMDRSP);
+	pr_info("SIZEOF_PROTOCOL:%lu bytes\n", SIZEOF_PROTOCOL);
 
 	/* initialize global pointers to NULL */
 	bus_list = NULL;
diff --git a/drivers/staging/unisys/uislib/uisthread.c b/drivers/staging/unisys/uislib/uisthread.c
index 1cc93b4..9aae374 100644
--- a/drivers/staging/unisys/uislib/uisthread.c
+++ b/drivers/staging/unisys/uislib/uisthread.c
@@ -51,7 +51,7 @@ uisthread_start(struct uisthread_info *thrinfo,
 	}
 	thrinfo->id = thrinfo->task->pid;
 	wake_up_process(thrinfo->task);
-	LOGINF("started thread pid:%d\n", thrinfo->id);
+	pr_info("started thread pid:%d\n", thrinfo->id);
 	return 1;
 }
 EXPORT_SYMBOL_GPL(uisthread_start);
@@ -65,7 +65,7 @@ uisthread_stop(struct uisthread_info *thrinfo)
 	if (thrinfo->id == 0)
 		return;		/* thread not running */
 
-	LOGINF("uisthread_stop stopping id:%d\n", thrinfo->id);
+	pr_info("uisthread_stop stopping id:%d\n", thrinfo->id);
 	thrinfo->should_stop = 1;
 	ret = KILL(thrinfo->id, SIGHUP, 1);
 	if (ret) {
@@ -78,7 +78,7 @@ uisthread_stop(struct uisthread_info *thrinfo)
 			pr_err("timed out trying to signal thread\n");
 	}
 	if (stopped) {
-		LOGINF("uisthread_stop stopped id:%d\n", thrinfo->id);
+		pr_info("uisthread_stop stopped id:%d\n", thrinfo->id);
 		thrinfo->id = 0;
 	}
 }
diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index 637cedc..f724e9d 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -74,7 +74,7 @@ int
 uisctrl_register_req_handler(int type, void *fptr,
 			     struct ultra_vbus_deviceinfo *chipset_driver_info)
 {
-	LOGINF("type = %d, fptr = 0x%p.\n", type, fptr);
+	pr_info("type = %d, fptr = 0x%p.\n", type, fptr);
 
 	switch (type) {
 	case 2:
@@ -114,7 +114,7 @@ uisctrl_register_req_handler_ex(uuid_le switch_uuid,
 {
 	struct req_handler_info *req_handler;
 
-	LOGINF("type=%pUL, controlfunc=0x%p.\n",
+	pr_info("type=%pUL, controlfunc=0x%p.\n",
 	       &switch_uuid, controlfunc);
 	if (!controlfunc) {
 		pr_err("%pUL: controlfunc must be supplied\n", &switch_uuid);
@@ -155,7 +155,7 @@ EXPORT_SYMBOL_GPL(uisctrl_register_req_handler_ex);
 int
 uisctrl_unregister_req_handler_ex(uuid_le switch_uuid)
 {
-	LOGINF("type=%pUL.\n", &switch_uuid);
+	pr_info("type=%pUL.\n", &switch_uuid);
 	if (req_handler_del(switch_uuid) < 0) {
 		pr_err("failed to remove %pUL from server list\n",
 		       &switch_uuid);
diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 2decac4..0f70a71 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -468,8 +468,8 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	LOGVER("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
 	       virtpcidev->device_no);
 
-	LOGINF("entering virthba_probe...\n");
-	LOGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
+	pr_info("entering virthba_probe...\n");
+	pr_info("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
 	       virtpcidev->device_no);
 	POSTCODE_LINUX_2(VHBA_PROBE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 	/* call scsi_host_alloc to register a scsi host adapter
@@ -500,7 +500,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	 * scan is 0 to max (inclusive); so we will subtract one from
 	 * the max-channel value.
 	 */
-	LOGINF("virtpcidev->scsi.max.max_channel=%u, max_id=%u, max_lun=%u, cmd_per_lun=%u, max_io_size=%u\n",
+	pr_info("virtpcidev->scsi.max.max_channel=%u, max_id=%u, max_lun=%u, cmd_per_lun=%u, max_io_size=%u\n",
 	     (unsigned) virtpcidev->scsi.max.max_channel - 1,
 	     (unsigned) virtpcidev->scsi.max.max_id,
 	     (unsigned) virtpcidev->scsi.max.max_lun,
@@ -516,11 +516,11 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	    (unsigned short) (virtpcidev->scsi.max.max_io_size / PAGE_SIZE);
 	if (scsihost->sg_tablesize > MAX_PHYS_INFO)
 		scsihost->sg_tablesize = MAX_PHYS_INFO;
-	LOGINF("scsihost->max_channel=%u, max_id=%u, max_lun=%llu, cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
+	pr_info("scsihost->max_channel=%u, max_id=%u, max_lun=%llu, cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
 	     scsihost->max_channel, scsihost->max_id, scsihost->max_lun,
 	     scsihost->cmd_per_lun, scsihost->max_sectors,
 	     scsihost->sg_tablesize);
-	LOGINF("scsihost->can_queue=%u, scsihost->cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
+	pr_info("scsihost->can_queue=%u, scsihost->cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
 	     scsihost->can_queue, scsihost->cmd_per_lun, scsihost->max_sectors,
 	     scsihost->sg_tablesize);
 
@@ -601,15 +601,15 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		scsi_host_put(scsihost);
 		return -ENODEV;
 	}
-	LOGINF("sendInterruptHandle=0x%16llX",
+	pr_info("sendInterruptHandle=0x%16llX",
 	       virthbainfo->intr.send_irq_handle);
-	LOGINF("recvInterruptHandle=0x%16llX",
+	pr_info("recvInterruptHandle=0x%16llX",
 	       virthbainfo->intr.recv_irq_handle);
-	LOGINF("recvInterruptVector=0x%8X",
+	pr_info("recvInterruptVector=0x%8X",
 	       virthbainfo->intr.recv_irq_vector);
-	LOGINF("recvInterruptShared=0x%2X",
+	pr_info("recvInterruptShared=0x%2X",
 	       virthbainfo->intr.recv_irq_shared);
-	LOGINF("scsihost.hostt->name=%s", scsihost->hostt->name);
+	pr_info("scsihost.hostt->name=%s", scsihost->hostt->name);
 	virthbainfo->interrupt_vector =
 	    virthbainfo->intr.recv_irq_handle & INTERRUPT_VECTOR_MASK;
 	rsp = request_irq(virthbainfo->interrupt_vector, handler, IRQF_SHARED,
@@ -636,7 +636,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	scsi_scan_host(scsihost);
 	pr_debug("return from scsi_scan_host.\n");
 
-	LOGINF("virthba added scsihost:0x%p\n", scsihost);
+	pr_info("virthba added scsihost:0x%p\n", scsihost);
 	POSTCODE_LINUX_2(VHBA_PROBE_EXIT_PC, POSTCODE_SEVERITY_INFO);
 	return 0;
 }
@@ -648,12 +648,12 @@ virthba_remove(struct virtpci_dev *virtpcidev)
 	struct Scsi_Host *scsihost =
 	    (struct Scsi_Host *) virtpcidev->scsi.scsihost;
 
-	LOGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
+	pr_info("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
 	       virtpcidev->device_no);
 	virthbainfo = (struct virthba_info *) scsihost->hostdata;
 	if (virthbainfo->interrupt_vector != -1)
 		free_irq(virthbainfo->interrupt_vector, virthbainfo);
-	LOGINF("Removing virtpcidev: 0x%p, virthbainfo: 0x%p\n", virtpcidev,
+	pr_info("Removing virtpcidev: 0x%p, virthbainfo: 0x%p\n", virtpcidev,
 	       virthbainfo);
 
 	pr_debug("removing scsihost: 0x%p, scsihost->this_id: %d\n", scsihost,
@@ -669,7 +669,7 @@ virthba_remove(struct virtpci_dev *virtpcidev)
 	 * scsi_add_host so the scsi_host gets deleted
 	 */
 	scsi_host_put(scsihost);
-	LOGINF("virthba removed scsi_host.\n");
+	pr_info("virthba removed scsi_host.\n");
 }
 
 static int
@@ -683,7 +683,7 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 	int notifyresult = 0xffff;
 	wait_queue_head_t notifyevent;
 
-	LOGINF("vDiskMgmt:%d %d:%d:%d\n", vdiskcmdtype,
+	pr_info("vDiskMgmt:%d %d:%d:%d\n", vdiskcmdtype,
 	       vdest->channel, vdest->id, vdest->lun);
 
 	if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
@@ -722,10 +722,10 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 					     &virthbainfo->chinfo.insertlock,
 					     DONT_ISSUE_INTERRUPT, (u64) NULL,
 					     OK_TO_WAIT, "vhba");
-	LOGINF("VdiskMgmt waiting on event notifyevent=0x%p\n",
+	pr_info("VdiskMgmt waiting on event notifyevent=0x%p\n",
 	       cmdrsp->scsitaskmgmt.notify);
 	wait_event(notifyevent, notifyresult != 0xffff);
-	LOGINF("VdiskMgmt complete; result:%d\n", cmdrsp->vdiskmgmt.result);
+	pr_info("VdiskMgmt complete; result:%d\n", cmdrsp->vdiskmgmt.result);
 	kfree(cmdrsp);
 	return SUCCESS;
 }
@@ -744,7 +744,7 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 	int notifyresult = 0xffff;
 	wait_queue_head_t notifyevent;
 
-	LOGINF("TaskMgmt:%d %d:%d:%llu\n", tasktype,
+	pr_info("TaskMgmt:%d %d:%d:%llu\n", tasktype,
 	       scsidev->channel, scsidev->id, scsidev->lun);
 
 	if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
@@ -782,10 +782,10 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 					     &virthbainfo->chinfo.insertlock,
 					     DONT_ISSUE_INTERRUPT, (u64) NULL,
 					     OK_TO_WAIT, "vhba");
-	LOGINF("TaskMgmt waiting on event notifyevent=0x%p\n",
+	pr_info("TaskMgmt waiting on event notifyevent=0x%p\n",
 	       cmdrsp->scsitaskmgmt.notify);
 	wait_event(notifyevent, notifyresult != 0xffff);
-	LOGINF("TaskMgmt complete; result:%d\n", cmdrsp->scsitaskmgmt.result);
+	pr_info("TaskMgmt complete; result:%d\n", cmdrsp->scsitaskmgmt.result);
 	kfree(cmdrsp);
 	return SUCCESS;
 }
@@ -987,7 +987,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 			cmdrsp->scsi.gpi_list[i].address = sg_phys(sg);
 			cmdrsp->scsi.gpi_list[i].length = sg->length;
 			if ((i != 0) && (sg->offset != 0))
-				LOGINF("Offset on a sg_entry other than zero =<<%d>>.\n",
+				pr_info("Offset on a sg_entry other than zero =<<%d>>.\n",
 				     sg->offset);
 		}
 
@@ -1244,7 +1244,7 @@ complete_vdiskmgmt_command(struct uiscmdrsp *cmdrsp)
 	/* wake up the error handler that is waiting for this */
 	*(int *) cmdrsp->vdiskmgmt.notifyresult = cmdrsp->vdiskmgmt.result;
 	wake_up_all((wait_queue_head_t *) cmdrsp->vdiskmgmt.notify);
-	LOGINF("set notify result to %d\n", cmdrsp->vdiskmgmt.result);
+	pr_info("set notify result to %d\n", cmdrsp->vdiskmgmt.result);
 }
 
 static inline void
@@ -1255,7 +1255,7 @@ complete_taskmgmt_command(struct uiscmdrsp *cmdrsp)
 	*(int *) cmdrsp->scsitaskmgmt.notifyresult =
 	    cmdrsp->scsitaskmgmt.result;
 	wake_up_all((wait_queue_head_t *) cmdrsp->scsitaskmgmt.notify);
-	LOGINF("set notify result to %d\n", cmdrsp->scsitaskmgmt.result);
+	pr_info("set notify result to %d\n", cmdrsp->scsitaskmgmt.result);
 }
 
 static void
@@ -1636,7 +1636,7 @@ virthba_mod_init(void)
 	if (!unisys_spar_platform)
 		return -ENODEV;
 
-	LOGINF("Entering virthba_mod_init...\n");
+	pr_info("Entering virthba_mod_init...\n");
 
 	POSTCODE_LINUX_2(VHBA_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 	virthba_parse_options(virthba_options);
@@ -1676,7 +1676,7 @@ virthba_mod_init(void)
 	}
 
 	POSTCODE_LINUX_2(VHBA_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
-	LOGINF("Leaving virthba_mod_init\n");
+	pr_info("Leaving virthba_mod_init\n");
 	return error;
 }
 
@@ -1726,7 +1726,7 @@ static DEVICE_ATTRIBUTE *virthba_shost_attrs[] = {
 static void __exit
 virthba_mod_exit(void)
 {
-	LOGINF("entering virthba_mod_exit...\n");
+	pr_info("entering virthba_mod_exit...\n");
 
 	virtpci_unregister_driver(&virthba_driver);
 	/* unregister is going to call virthba_remove */
@@ -1737,7 +1737,7 @@ virthba_mod_exit(void)
 	}
 
 	debugfs_remove_recursive(virthba_debugfs_dir);
-	LOGINF("Leaving virthba_mod_exit\n");
+	pr_info("Leaving virthba_mod_exit\n");
 
 }
 
diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c
index 7432850..b7276cb 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -283,7 +283,7 @@ static int add_vbus(struct add_vbus_guestpart *addparams)
 			    &chipset_driver_info);
 	write_vbus_bus_info(vbus->platform_data /* chanptr */ ,
 			    &bus_driver_info);
-	LOGINF("Added vbus %d; device %s created successfully\n",
+	pr_info("Added vbus %d; device %s created successfully\n",
 	       addparams->bus_no, BUS_ID(vbus));
 	POSTCODE_LINUX_2(VPCI_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
 	return 1;
@@ -332,13 +332,13 @@ static int add_vhba(struct add_virt_guestpart *addparams)
 		return 0;
 	}
 
-	LOGINF("Adding vhba wwnn:%x:%x config:%d-%d-%d-%d chanptr:%p\n",
+	pr_info("Adding vhba wwnn:%x:%x config:%d-%d-%d-%d chanptr:%p\n",
 	       scsi.wwnn.wwnn1, scsi.wwnn.wwnn2,
 	       scsi.max.max_channel, scsi.max.max_id, scsi.max.max_lun,
 	       scsi.max.cmd_per_lun, addparams->chanptr);
 	i = virtpci_device_add(vbus, VIRTHBA_TYPE, addparams, &scsi, NULL);
 	if (i) {
-		LOGINF("Added vhba wwnn:%x:%x chanptr:%p\n", scsi.wwnn.wwnn1,
+		pr_info("Added vhba wwnn:%x:%x chanptr:%p\n", scsi.wwnn.wwnn1,
 		       scsi.wwnn.wwnn2, addparams->chanptr);
 		POSTCODE_LINUX_3(VPCI_CREATE_EXIT_PC, i,
 				 POSTCODE_SEVERITY_INFO);
@@ -395,13 +395,13 @@ add_vnic(struct add_virt_guestpart *addparams)
 		return 0;
 	}
 
-	LOGINF("Adding vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x rcvbufs:%d mtu:%d chanptr:%p%pUL\n",
+	pr_info("Adding vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x rcvbufs:%d mtu:%d chanptr:%p%pUL\n",
 	       net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
 	       net.mac_addr[3], net.mac_addr[4], net.mac_addr[5],
 	       net.num_rcv_bufs, net.mtu, addparams->chanptr, &net.zone_uuid);
 	i = virtpci_device_add(vbus, VIRTNIC_TYPE, addparams, NULL, &net);
 	if (i) {
-		LOGINF("Added vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
+		pr_info("Added vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
 		       net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
 		       net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
 		POSTCODE_LINUX_3(VPCI_CREATE_EXIT_PC, i,
@@ -430,10 +430,10 @@ delete_vbus(struct del_vbus_guestpart *delparams)
 	}
 
 	/* ensure that bus has no devices? -- TBD */
-	LOGINF("Deleting %s\n", BUS_ID(vbus));
+	pr_info("Deleting %s\n", BUS_ID(vbus));
 	if (delete_vbus_device(vbus, NULL))
 		return 0;	/* failure */
-	LOGINF("Deleted vbus %d\n", delparams->bus_no);
+	pr_info("Deleted vbus %d\n", delparams->bus_no);
 	return 1;
 }
 
@@ -445,13 +445,13 @@ delete_vbus_device(struct device *vbus, void *data)
 
 	if ((checkforroot) && match_busid(vbus, (void *)BUS_ID(dev))) {
 		/* skip it - don't delete root bus */
-		LOGINF("skipping root bus\n");
+		pr_info("skipping root bus\n");
 		return 0;	/* pretend no error */
 	}
-	LOGINF("Calling unregister for %s\n", BUS_ID(vbus));
+	pr_info("Calling unregister for %s\n", BUS_ID(vbus));
 	device_unregister(vbus);
 	kfree(vbus);
-	LOGINF("VBus unregister and freed\n");
+	pr_info("VBus unregister and freed\n");
 	return 0;		/* no error */
 }
 
@@ -465,11 +465,11 @@ static int pause_vhba(struct pause_virt_guestpart *pauseparams)
 
 	GET_SCSIADAPINFO_FROM_CHANPTR(pauseparams->chanptr);
 
-	LOGINF("Pausing vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
+	pr_info("Pausing vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
 	i = virtpci_device_serverdown(NULL /*no parent bus */ , VIRTHBA_TYPE,
 				      &scsi.wwnn, NULL);
 	if (i)
-		LOGINF("Paused vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
+		pr_info("Paused vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
 		       scsi.wwnn.wwnn2);
 	return i;
 }
@@ -484,13 +484,13 @@ static int pause_vnic(struct pause_virt_guestpart *pauseparams)
 
 	GET_NETADAPINFO_FROM_CHANPTR(pauseparams->chanptr);
 
-	LOGINF("Pausing vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
+	pr_info("Pausing vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
 	       net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
 	       net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
 	i = virtpci_device_serverdown(NULL /*no parent bus */ , VIRTNIC_TYPE,
 				      NULL, net.mac_addr);
 	if (i) {
-		LOGINF(" Paused vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
+		pr_info(" Paused vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
 		       net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
 		       net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
 	}
@@ -507,11 +507,11 @@ static int resume_vhba(struct resume_virt_guestpart *resumeparams)
 
 	GET_SCSIADAPINFO_FROM_CHANPTR(resumeparams->chanptr);
 
-	LOGINF("Resuming vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
+	pr_info("Resuming vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
 	i = virtpci_device_serverup(NULL /*no parent bus */ , VIRTHBA_TYPE,
 				    &scsi.wwnn, NULL);
 	if (i)
-		LOGINF("Resumed vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
+		pr_info("Resumed vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
 		       scsi.wwnn.wwnn2);
 	return i;
 }
@@ -527,13 +527,13 @@ resume_vnic(struct resume_virt_guestpart *resumeparams)
 
 	GET_NETADAPINFO_FROM_CHANPTR(resumeparams->chanptr);
 
-	LOGINF("Resuming vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
+	pr_info("Resuming vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
 	       net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
 	       net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
 	i = virtpci_device_serverup(NULL /*no parent bus */ , VIRTNIC_TYPE,
 				    NULL, net.mac_addr);
 	if (i) {
-		LOGINF(" Resumed vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
+		pr_info(" Resumed vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
 		       net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
 		       net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
 	}
@@ -550,11 +550,11 @@ static int delete_vhba(struct del_virt_guestpart *delparams)
 
 	GET_SCSIADAPINFO_FROM_CHANPTR(delparams->chanptr);
 
-	LOGINF("Deleting vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
+	pr_info("Deleting vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
 	i = virtpci_device_del(NULL /*no parent bus */ , VIRTHBA_TYPE,
 			       &scsi.wwnn, NULL);
 	if (i) {
-		LOGINF("Deleted vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
+		pr_info("Deleted vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
 		       scsi.wwnn.wwnn2);
 		return 1;
 	}
@@ -571,13 +571,13 @@ static int delete_vnic(struct del_virt_guestpart *delparams)
 
 	GET_NETADAPINFO_FROM_CHANPTR(delparams->chanptr);
 
-	LOGINF("Deleting vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
+	pr_info("Deleting vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
 	       net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
 	       net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
 	i = virtpci_device_del(NULL /*no parent bus */ , VIRTNIC_TYPE, NULL,
 			       net.mac_addr);
 	if (i) {
-		LOGINF("Deleted vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
+		pr_info("Deleted vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
 		       net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
 		       net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
 	}
@@ -585,9 +585,9 @@ static int delete_vnic(struct del_virt_guestpart *delparams)
 }
 
 #define DELETE_ONE_VPCIDEV(vpcidev) { \
-	LOGINF("calling device_unregister:%p\n", &vpcidev->generic_dev); \
+	pr_info("calling device_unregister:%p\n", &vpcidev->generic_dev); \
 	device_unregister(&vpcidev->generic_dev); \
-	LOGINF("Deleted %p\n", vpcidev); \
+	pr_info("Deleted %p\n", vpcidev); \
 	kfree(vpcidev); \
 }
 
@@ -614,7 +614,7 @@ static void delete_all(void)
 		tmpvpcidev = nextvpcidev;
 		count++;
 	}
-	LOGINF("Deleted %d vhbas/vnics.\n", count);
+	pr_info("Deleted %d vhbas/vnics.\n", count);
 
 	/* now delete each vbus */
 	if (bus_for_each_dev
@@ -647,12 +647,12 @@ static int delete_all_virt(enum virtpci_dev_type devtype,
 		return 0;
 	}
 
-	LOGINF("Deleting all %s in vbus %s\n",
+	pr_info("Deleting all %s in vbus %s\n",
 	       devtype == VIRTHBA_TYPE ? "vhbas" : "vnics", busid);
 	/* delete all vhbas/vnics */
 	i = virtpci_device_del(vbus, devtype, NULL, NULL);
 	if (i > 0)
-		LOGINF("Deleted %d %s\n", i,
+		pr_info("Deleted %d %s\n", i,
 		       devtype == VIRTHBA_TYPE ? "vhbas" : "vnics");
 	return 1;
 }
@@ -836,7 +836,7 @@ static int virtpci_device_probe(struct device *dev)
 	const struct pci_device_id *id;
 	int error = 0;
 
-	LOGINF("In virtpci_device_probe dev:%p virtpcidev:%p virtpcidrv:%p\n",
+	pr_info("In virtpci_device_probe dev:%p virtpcidev:%p virtpcidrv:%p\n",
 	       dev, virtpcidev, virtpcidrv);	/* VERBOSE/DEBUG ? */
 	POSTCODE_LINUX_2(VPCI_PROBE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 	/* static match and static probe vs dynamic match & dynamic
@@ -882,7 +882,7 @@ static int virtpci_device_remove(struct device *dev_)
 	struct virtpci_dev *virtpcidev = device_to_virtpci_dev(dev_);
 	struct virtpci_driver *virtpcidrv = virtpcidev->mydriver;
 
-	LOGINF("In virtpci_device_remove bus_id:%s dev_:%p virtpcidev:%p dev->driver:%p drivername:%s\n",
+	pr_info("In virtpci_device_remove bus_id:%s dev_:%p virtpcidev:%p dev->driver:%p drivername:%s\n",
 	       BUS_ID(dev_), dev_, virtpcidev, dev_->driver,
 	       dev_->driver->name);	/* VERBOSE/DEBUG */
 	if (virtpcidrv) {
@@ -931,7 +931,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
 	struct spar_io_channel_protocol __iomem *io_chan = NULL;
 	struct device *dev;
 
-	LOGINF("virtpci_device_add parentbus:%p chanptr:%p\n", parentbus,
+	pr_info("virtpci_device_add parentbus:%p chanptr:%p\n", parentbus,
 	       addparams->chanptr);
 
 	POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
@@ -1075,7 +1075,7 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
 		return 0;
 	}
 
-	LOGINF("Added %s:%d:%d &virtpcidev->generic_dev:%p\n",
+	pr_info("Added %s:%d:%d &virtpcidev->generic_dev:%p\n",
 	       (devtype == VIRTHBA_TYPE) ? "virthba" : "virtnic",
 	       addparams->bus_no, addparams->device_no,
 	       &virtpcidev->generic_dev);
@@ -1318,7 +1318,7 @@ static void virtpci_device_release(struct device *dev_)
 	/* this function is called when the last reference to the
 	 * device is removed
 	 */
-	LOGINF("In virtpci_device_release:%p - NOT YET IMPLEMENTED\n", dev_);
+	pr_info("In virtpci_device_release:%p - NOT YET IMPLEMENTED\n", dev_);
 }
 
 /*****************************************************/
@@ -1563,20 +1563,20 @@ static int __init virtpci_mod_init(void)
 		return -1;
 	}
 
-	LOGINF("successfully registered virtpci_ctrlchan_func (0x%p) as callback.\n",
+	pr_info("successfully registered virtpci_ctrlchan_func (0x%p) as callback.\n",
 	       (void *)&virtpci_ctrlchan_func);
 	/* create debugfs directory and info file inside. */
 	virtpci_debugfs_dir = debugfs_create_dir("virtpci", NULL);
 	debugfs_create_file("info", S_IRUSR, virtpci_debugfs_dir,
 			    NULL, &debugfs_info_fops);
-	LOGINF("Leaving\n");
+	pr_info("Leaving\n");
 	POSTCODE_LINUX_2(VPCI_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
 	return 0;
 }
 
 static void __exit virtpci_mod_exit(void)
 {
-	LOGINF("virtpci_mod_exit...\n");
+	pr_info("virtpci_mod_exit...\n");
 
 	/* unregister the callback function */
 	if (!uisctrl_register_req_handler(2, NULL, NULL))
@@ -1585,7 +1585,7 @@ static void __exit virtpci_mod_exit(void)
 	device_unregister(&virtpci_rootbus_device);
 	bus_unregister(&virtpci_bus_type);
 	debugfs_remove_recursive(virtpci_debugfs_dir);
-	LOGINF("Leaving\n");
+	pr_info("Leaving\n");
 }
 
 module_init(virtpci_mod_init);
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_main.c b/drivers/staging/unisys/visorchannel/visorchannel_main.c
index f4be2e6..5dee28f 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_main.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_main.c
@@ -32,14 +32,14 @@ visorchannel_init(void)
 	if (!unisys_spar_platform)
 		return -ENODEV;
 
-	INFODRV("driver version %s loaded", VERSION);
+	pr_info("driver version %s loaded", VERSION);
 	return 0;
 }
 
 static void
 visorchannel_exit(void)
 {
-	INFODRV("driver unloaded");
+	pr_info("driver unloaded");
 }
 
 module_init(visorchannel_init);
diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index aca0be0..f4bdac5 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -65,7 +65,7 @@ visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel)
 			return -1;
 		}
 		registered = TRUE;
-		INFODRV("New major number %d registered\n", MAJOR(majordev));
+		pr_info("New major number %d registered\n", MAJOR(majordev));
 	} else {
 		/* static major device number registration required */
 		if (register_chrdev_region(majordev, 1, MYDRVNAME) < 0) {
@@ -73,14 +73,14 @@ visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel)
 			return -1;
 		}
 		registered = TRUE;
-		INFODRV("Static major number %d registered\n", MAJOR(majordev));
+		pr_info("Static major number %d registered\n", MAJOR(majordev));
 	}
 	rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1);
 	if (rc  < 0) {
 		pr_err("failed to create char device: (status=%d)\n", rc);
 		return -1;
 	}
-	INFODRV("Registered char device for %s (major=%d)",
+	pr_info("Registered char device for %s (major=%d)",
 		MYDRVNAME, MAJOR(majordev));
 	return 0;
 }
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index b13eed7..71e0b85 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -522,19 +522,19 @@ testUnicode(void)
 	 *       trailed NUL byte!!   REALLY!!!!!    Arrrrgggghhhhh
 	 */
 
-	LOGINF("sizeof(wchar_t) = %d", sizeof(wchar_t));
-	LOGINF("utf8_wcstombs=%d",
+	pr_info("sizeof(wchar_t) = %d", sizeof(wchar_t));
+	pr_info("utf8_wcstombs=%d",
 	       chrs = utf8_wcstombs(s, unicodeString, sizeof(s)));
 	if (chrs >= 0)
 		s[chrs] = '\0';	/* GRRRRRRRR */
-	LOGINF("s='%s'", s);
-	LOGINF("utf8_mbstowcs=%d", chrs = utf8_mbstowcs(unicode2, s, 100));
+	pr_info("s='%s'", s);
+	pr_info("utf8_mbstowcs=%d", chrs = utf8_mbstowcs(unicode2, s, 100));
 	if (chrs >= 0)
 		unicode2[chrs] = 0;	/* GRRRRRRRR */
 	if (memcmp(unicodeString, unicode2, sizeof(unicodeString)) == 0)
-		LOGINF("strings match... good");
+		pr_info("strings match... good");
 	else
-		LOGINF("strings did not match!!");
+		pr_info("strings did not match!!");
 }
 #endif
 
@@ -718,7 +718,7 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response)
 	    g_diagpoolDevNo)
 		outmsg.cmd = g_DeviceChangeStatePacket;
 	if (outmsg.hdr.flags.test_message == 1) {
-		LOGINF("%s controlvm_msg=0x%x response=%d for test message",
+		pr_info("%s controlvm_msg=0x%x response=%d for test message",
 		       __func__, outmsg.hdr.id, response);
 		return;
 	}
@@ -1068,7 +1068,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
 				 */
 				if (busNo == g_diagpoolBusNo
 				    && devNo == g_diagpoolDevNo) {
-					LOGINF("DEVICE_CHANGESTATE(DiagpoolChannel busNo=%d devNo=%d is pausing...)",
+					pr_info("DEVICE_CHANGESTATE(DiagpoolChannel busNo=%d devNo=%d is pausing...)",
 					     busNo, devNo);
 					/* this will trigger the
 					 * diag_shutdown.sh script in
@@ -1297,7 +1297,7 @@ Away:
 	    is_diagpool_channel(pDevInfo->chan_info.channel_type_uuid)) {
 		g_diagpoolBusNo = busNo;
 		g_diagpoolDevNo = devNo;
-		LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu",
+		pr_info("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu",
 		     g_diagpoolBusNo, g_diagpoolDevNo);
 	}
 	device_epilog(busNo, devNo, segment_state_running,
@@ -1409,7 +1409,7 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,
 	info->offset = offset;
 	info->bytes = bytes;
 	info->ptr = payload;
-	LOGINF("offset=%llu, bytes=%lu, ptr=%p",
+	pr_info("offset=%llu, bytes=%lu, ptr=%p",
 	       (u64) (info->offset), (ulong) (info->bytes), info->ptr);
 
 Away:
@@ -1511,7 +1511,7 @@ chipset_ready(struct controlvm_message_header *msgHdr)
 		 * and disks mounted for the partition
 		 */
 		g_ChipSetMsgHdr = *msgHdr;
-		LOGINF("Holding CHIPSET_READY response");
+		pr_info("Holding CHIPSET_READY response");
 	}
 }
 
@@ -1648,7 +1648,7 @@ parahotplug_request_kickoff(struct parahotplug_request *req)
 	sprintf(env_func, "SPAR_PARAHOTPLUG_FUNCTION=%d",
 		cmd->device_change_state.dev_no & 0x7);
 
-	LOGINF("parahotplug_request_kickoff: state=%d, bdf=%d/%d/%d, id=%u\n",
+	pr_info("parahotplug_request_kickoff: state=%d, bdf=%d/%d/%d, id=%u\n",
 	       cmd->device_change_state.state.active,
 	       cmd->device_change_state.bus_no,
 	       cmd->device_change_state.dev_no >> 3,
@@ -1832,40 +1832,40 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
 	}
 	switch (inmsg.hdr.id) {
 	case CONTROLVM_CHIPSET_INIT:
-		LOGINF("CHIPSET_INIT(#busses=%lu,#switches=%lu)",
+		pr_info("CHIPSET_INIT(#busses=%lu,#switches=%lu)",
 		       (ulong) inmsg.cmd.init_chipset.bus_count,
 		       (ulong) inmsg.cmd.init_chipset.switch_count);
 		chipset_init(&inmsg);
 		break;
 	case CONTROLVM_BUS_CREATE:
-		LOGINF("BUS_CREATE(%lu,#devs=%lu)",
+		pr_info("BUS_CREATE(%lu,#devs=%lu)",
 		       (ulong) cmd->create_bus.bus_no,
 		       (ulong) cmd->create_bus.dev_count);
 		bus_create(&inmsg);
 		break;
 	case CONTROLVM_BUS_DESTROY:
-		LOGINF("BUS_DESTROY(%lu)", (ulong) cmd->destroy_bus.bus_no);
+		pr_info("BUS_DESTROY(%lu)", (ulong)cmd->destroy_bus.bus_no);
 		bus_destroy(&inmsg);
 		break;
 	case CONTROLVM_BUS_CONFIGURE:
-		LOGINF("BUS_CONFIGURE(%lu)", (ulong) cmd->configure_bus.bus_no);
+		pr_info("BUS_CONFIGURE(%lu)", (ulong)cmd->configure_bus.bus_no);
 		bus_configure(&inmsg, parser_ctx);
 		break;
 	case CONTROLVM_DEVICE_CREATE:
-		LOGINF("DEVICE_CREATE(%lu,%lu)",
+		pr_info("DEVICE_CREATE(%lu,%lu)",
 		       (ulong) cmd->create_device.bus_no,
 		       (ulong) cmd->create_device.dev_no);
 		my_device_create(&inmsg);
 		break;
 	case CONTROLVM_DEVICE_CHANGESTATE:
 		if (cmd->device_change_state.flags.phys_device) {
-			LOGINF("DEVICE_CHANGESTATE for physical device (%lu,%lu, active=%lu)",
+			pr_info("DEVICE_CHANGESTATE for physical device (%lu,%lu, active=%lu)",
 			     (ulong) cmd->device_change_state.bus_no,
 			     (ulong) cmd->device_change_state.dev_no,
 			     (ulong) cmd->device_change_state.state.active);
 			parahotplug_process_message(&inmsg);
 		} else {
-			LOGINF("DEVICE_CHANGESTATE for virtual device (%lu,%lu, state.Alive=0x%lx)",
+			pr_info("DEVICE_CHANGESTATE for virtual device (%lu,%lu, state.Alive=0x%lx)",
 			     (ulong) cmd->device_change_state.bus_no,
 			     (ulong) cmd->device_change_state.dev_no,
 			     (ulong) cmd->device_change_state.state.alive);
@@ -1878,13 +1878,13 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
 		}
 		break;
 	case CONTROLVM_DEVICE_DESTROY:
-		LOGINF("DEVICE_DESTROY(%lu,%lu)",
+		pr_info("DEVICE_DESTROY(%lu,%lu)",
 		       (ulong) cmd->destroy_device.bus_no,
 		       (ulong) cmd->destroy_device.dev_no);
 		my_device_destroy(&inmsg);
 		break;
 	case CONTROLVM_DEVICE_CONFIGURE:
-		LOGINF("DEVICE_CONFIGURE(%lu,%lu)",
+		pr_info("DEVICE_CONFIGURE(%lu,%lu)",
 		       (ulong) cmd->configure_device.bus_no,
 		       (ulong) cmd->configure_device.dev_no);
 		/* no op for now, just send a respond that we passed */
@@ -1892,15 +1892,15 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
 			controlvm_respond(&inmsg.hdr, CONTROLVM_RESP_SUCCESS);
 		break;
 	case CONTROLVM_CHIPSET_READY:
-		LOGINF("CHIPSET_READY");
+		pr_info("CHIPSET_READY");
 		chipset_ready(&inmsg.hdr);
 		break;
 	case CONTROLVM_CHIPSET_SELFTEST:
-		LOGINF("CHIPSET_SELFTEST");
+		pr_info("CHIPSET_SELFTEST");
 		chipset_selftest(&inmsg.hdr);
 		break;
 	case CONTROLVM_CHIPSET_STOP:
-		LOGINF("CHIPSET_STOP");
+		pr_info("CHIPSET_STOP");
 		chipset_notready(&inmsg.hdr);
 		break;
 	default:
@@ -1928,7 +1928,7 @@ static HOSTADDRESS controlvm_get_channel_address(void)
 		       __func__);
 		return 0;
 	}
-	INFODRV("controlvm addr=%Lx", addr);
+	pr_info("controlvm addr=%Lx", addr);
 	return addr;
 }
 
@@ -1961,7 +1961,7 @@ controlvm_periodic_work(struct work_struct *work)
 	if (visorchipset_holdchipsetready
 	    && (g_ChipSetMsgHdr.id != CONTROLVM_INVALID)) {
 		if (check_chipset_events() == 1) {
-			LOGINF("Sending CHIPSET_READY response");
+			pr_info("Sending CHIPSET_READY response");
 			controlvm_respond(&g_ChipSetMsgHdr, 0);
 			clear_chipset_events();
 			memset(&g_ChipSetMsgHdr, 0,
@@ -2024,13 +2024,13 @@ Away:
 		* polling
 		*/
 		if (Poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_SLOW) {
-			LOGINF("switched to slow controlvm polling");
+			pr_info("switched to slow controlvm polling");
 			Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
 		}
 	} else {
 		if (Poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_FAST) {
 			Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
-			LOGINF("switched to fast controlvm polling");
+			pr_info("switched to fast controlvm polling");
 		}
 	}
 
@@ -2140,7 +2140,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
 				 POSTCODE_SEVERITY_ERR);
 		return;
 	}
-	LOGINF("Bus and device ready for dumping");
+	pr_info("Bus and device ready for dumping");
 	POSTCODE_LINUX_2(CRASH_DEV_EXIT_PC, POSTCODE_SEVERITY_INFO);
 	return;
 
@@ -2355,18 +2355,18 @@ visorchipset_init(void)
 	if (!unisys_spar_platform)
 		return -ENODEV;
 
-	LOGINF("chipset driver version %s loaded", VERSION);
+	pr_info("chipset driver version %s loaded", VERSION);
 	/* process module options */
 	POSTCODE_LINUX_2(DRIVER_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 
-	LOGINF("option - testvnic=%d", visorchipset_testvnic);
-	LOGINF("option - testvnicclient=%d", visorchipset_testvnicclient);
-	LOGINF("option - testmsg=%d", visorchipset_testmsg);
-	LOGINF("option - testteardown=%d", visorchipset_testteardown);
-	LOGINF("option - major=%d", visorchipset_major);
-	LOGINF("option - serverregwait=%d", visorchipset_serverregwait);
-	LOGINF("option - clientregwait=%d", visorchipset_clientregwait);
-	LOGINF("option - holdchipsetready=%d", visorchipset_holdchipsetready);
+	pr_info("option - testvnic=%d", visorchipset_testvnic);
+	pr_info("option - testvnicclient=%d", visorchipset_testvnicclient);
+	pr_info("option - testmsg=%d", visorchipset_testmsg);
+	pr_info("option - testteardown=%d", visorchipset_testteardown);
+	pr_info("option - major=%d", visorchipset_major);
+	pr_info("option - serverregwait=%d", visorchipset_serverregwait);
+	pr_info("option - clientregwait=%d", visorchipset_clientregwait);
+	pr_info("option - holdchipsetready=%d", visorchipset_holdchipsetready);
 
 	memset(&BusDev_Server_Notifiers, 0, sizeof(BusDev_Server_Notifiers));
 	memset(&BusDev_Client_Notifiers, 0, sizeof(BusDev_Client_Notifiers));
@@ -2391,7 +2391,7 @@ visorchipset_init(void)
 		     spar_controlvm_channel_protocol_uuid);
 		if (SPAR_CONTROLVM_CHANNEL_OK_CLIENT(
 				visorchannel_get_header(ControlVm_channel))) {
-			LOGINF("Channel %s (ControlVm) discovered",
+			pr_info("Channel %s (ControlVm) discovered",
 			       visorchannel_id(ControlVm_channel, s));
 			initialize_controlvm_payload();
 		} else {
@@ -2431,7 +2431,7 @@ visorchipset_init(void)
 		goto Away;
 	}
 	if (visorchipset_disable_controlvm) {
-		LOGINF("visorchipset_init:controlvm disabled");
+		pr_info("visorchipset_init:controlvm disabled");
 	} else {
 		/* if booting in a crash kernel */
 		if (visorchipset_crash_kernel)
@@ -2472,7 +2472,7 @@ visorchipset_init(void)
 		rc = -1;
 		goto Away;
 	}
-	LOGINF("visorchipset device created");
+	pr_info("visorchipset device created");
 	POSTCODE_LINUX_2(CHIPSET_INIT_SUCCESS_PC, POSTCODE_SEVERITY_INFO);
 	rc = 0;
 Away:
@@ -2514,13 +2514,13 @@ visorchipset_exit(void)
 
 	memset(&g_DelDumpMsgHdr, 0, sizeof(struct controlvm_message_header));
 
-	LOGINF("Channel %s (ControlVm) disconnected",
+	pr_info("Channel %s (ControlVm) disconnected",
 	       visorchannel_id(ControlVm_channel, s));
 	visorchannel_destroy(ControlVm_channel);
 
 	visorchipset_file_cleanup();
 	POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);
-	LOGINF("chipset driver unloaded");
+	pr_info("chipset driver unloaded");
 }
 
 module_param_named(testvnic, visorchipset_testvnic, int, S_IRUGO);
-- 
2.1.0


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

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

* [PATCH 54/69] staging: unisys: remove LOGVER() macros
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (52 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 53/69] staging: unisys: get rid of LOGINFO() macros Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h Benjamin Romer
                   ` (14 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Delete these entirely as the only place that was using it had existing
pr_info() statements with the exact same content.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/include/uniklog.h | 28 ----------------------------
 drivers/staging/unisys/virthba/virthba.c |  4 ----
 2 files changed, 32 deletions(-)

diff --git a/drivers/staging/unisys/include/uniklog.h b/drivers/staging/unisys/include/uniklog.h
index 74a723e..cca662a 100644
--- a/drivers/staging/unisys/include/uniklog.h
+++ b/drivers/staging/unisys/include/uniklog.h
@@ -26,34 +26,6 @@
 #include <linux/printk.h>
 
 /*
- * # LOGVER
- *
- * \brief Log verbose message - logs a message at the LOG_DEBUG level,
- *        which can be disabled at runtime
- *
- * \param devname the device name of the device reporting this message, or
- *                NULL if this message is NOT device-related.
- * \param fmt printf()-style format string containing the message to log.
- * \param args Optional arguments to be formatted and inserted into the format
- * \param string.
- * \return nothing
- *
- * Logs the specified message at the LOG_DEBUG level.  Note also that
- * LOG_DEBUG messages can be enabled/disabled at runtime as well.
- */
-#define LOGVER(fmt, args...) pr_debug(fmt, ## args)
-#define LOGVERDEV(devname, fmt, args...) \
-	pr_debug("%s " fmt, devname, ## args)
-#define LOGVERNAME(vnic, fmt, args...)					\
-	do {								\
-		if (vnic != NULL) {					\
-			pr_debug("%s " fmt, vnic->name, ## args);	\
-		} else {						\
-			pr_debug(fmt, ## args);				\
-		}							\
-	} while (0)
-
-/*
  * # LOGWRN
  *
  * \brief Log warning message - Logs a message at the LOG_WARNING level,
diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 0f70a71..071c4bf 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -464,10 +464,6 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	struct signal_queue_header __iomem *pqhdr;
 	u64 mask;
 
-	LOGVER("entering virthba_probe...\n");
-	LOGVER("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
-	       virtpcidev->device_no);
-
 	pr_info("entering virthba_probe...\n");
 	pr_info("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
 	       virtpcidev->device_no);
-- 
2.1.0

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

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

* [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (53 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 54/69] staging: unisys: remove LOGVER() macros Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2015-01-10  1:40   ` Greg KH
  2014-12-05 22:09 ` [PATCH 56/69] staging: unisys: virthba: Remove unneeded spaces after casts Benjamin Romer
                   ` (13 subsequent siblings)
  68 siblings, 1 reply; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

Get rid of LOGWRN() and all related macros, and call pr_warn() directly instead.

Removing the LOGWRN() macro set makes uisklog.h empty, so remove the file too.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/include/procobjecttree.h    |  1 -
 drivers/staging/unisys/include/timskmod.h          |  6 ---
 drivers/staging/unisys/include/uisqueue.h          |  1 -
 drivers/staging/unisys/include/uniklog.h           | 57 ----------------------
 drivers/staging/unisys/uislib/uislib.c             |  1 -
 drivers/staging/unisys/uislib/uisthread.c          |  1 -
 drivers/staging/unisys/uislib/uisutils.c           |  1 -
 drivers/staging/unisys/virthba/virthba.c           |  1 -
 drivers/staging/unisys/virtpci/virtpci.c           |  1 -
 drivers/staging/unisys/visorchannel/globals.h      |  1 -
 drivers/staging/unisys/visorchipset/globals.h      |  1 -
 drivers/staging/unisys/visorchipset/parser.h       |  1 -
 .../unisys/visorchipset/visorchipset_main.c        | 15 +++---
 drivers/staging/unisys/visorutil/charqueue.h       |  1 -
 drivers/staging/unisys/visorutil/easyproc.c        |  1 -
 .../staging/unisys/visorutil/memregion_direct.c    |  1 -
 drivers/staging/unisys/visorutil/periodic_work.c   |  4 +-
 drivers/staging/unisys/visorutil/visorkmodutils.c  |  1 -
 18 files changed, 8 insertions(+), 88 deletions(-)
 delete mode 100644 drivers/staging/unisys/include/uniklog.h

diff --git a/drivers/staging/unisys/include/procobjecttree.h b/drivers/staging/unisys/include/procobjecttree.h
index 1174056..809c679 100644
--- a/drivers/staging/unisys/include/procobjecttree.h
+++ b/drivers/staging/unisys/include/procobjecttree.h
@@ -26,7 +26,6 @@
 #ifndef __PROCOBJECTTREE_H__
 #define __PROCOBJECTTREE_H__
 
-#include "uniklog.h"
 #include "timskmod.h"
 
 /* These are opaque structures to users.
diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h
index 5f33d5c..403827d 100644
--- a/drivers/staging/unisys/include/timskmod.h
+++ b/drivers/staging/unisys/include/timskmod.h
@@ -87,12 +87,6 @@
 		(void *)(p2) = SWAPPOINTERS_TEMP;	\
 	} while (0)
 
-#define WARNDRV(fmt, args...)   LOGWRN(fmt, ## args)
-#define SECUREDRV(fmt, args...) LOGWRN(fmt, ## args)
-
-#define WARNDEV(devname, fmt, args...)    LOGWRNDEV(devname, fmt, ## args)
-#define SECUREDEV(devname, fmt, args...)  LOGWRNDEV(devname, fmt, ## args)
-
 /** Verifies the consistency of your PRIVATEDEVICEDATA structure using
  *  conventional "signature" fields:
  *  <p>
diff --git a/drivers/staging/unisys/include/uisqueue.h b/drivers/staging/unisys/include/uisqueue.h
index 25b6181..08ba16e 100644
--- a/drivers/staging/unisys/include/uisqueue.h
+++ b/drivers/staging/unisys/include/uisqueue.h
@@ -25,7 +25,6 @@
 
 #include "linux/version.h"
 #include "iochannel.h"
-#include "uniklog.h"
 #include <linux/atomic.h>
 #include <linux/semaphore.h>
 #include <linux/uuid.h>
diff --git a/drivers/staging/unisys/include/uniklog.h b/drivers/staging/unisys/include/uniklog.h
deleted file mode 100644
index cca662a..0000000
--- a/drivers/staging/unisys/include/uniklog.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* uniklog.h
- *
- * Copyright (C) 2010 - 2013 UNISYS CORPORATION
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- */
-
-/* This module contains macros to aid developers in logging messages.
- *
- * This module is affected by the DEBUG compiletime option.
- *
- */
-#ifndef __UNIKLOG_H__
-#define __UNIKLOG_H__
-
-#include <linux/printk.h>
-
-/*
- * # LOGWRN
- *
- * \brief Log warning message - Logs a message at the LOG_WARNING level,
- *        including source line number information
- *
- * \param devname the device name of the device reporting this message, or
- *                NULL if this message is NOT device-related.
- * \param fmt printf()-style format string containing the message to log.
- * \param args Optional arguments to be formatted and inserted into the format
- * \param string.
- * \return nothing
- *
- * Logs the specified error message at the LOG_WARNING level.  It will also
- * include the file, line number, and function name of where the error
- * originated in the log message.
- */
-#define LOGWRN(fmt, args...) pr_warn(fmt, ## args)
-#define LOGWRNDEV(devname, fmt, args...) \
-	pr_warn("%s " fmt, devname, ## args)
-#define LOGWRNNAME(vnic, fmt, args...) \
-	do {								\
-		if (vnic != NULL) {					\
-			pr_warn("%s " fmt, vnic->name, ## args);	\
-		} else {						\
-			pr_warn(fmt, ## args);				\
-		}							\
-	} while (0)
-
-#endif /* __UNIKLOG_H__ */
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index b6a7fb0..89fd861 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -29,7 +29,6 @@
 #include <linux/uuid.h>
 
 #include <linux/version.h>
-#include "uniklog.h"
 #include "diagnostics/appos_subsystems.h"
 #include "uisutils.h"
 #include "vbuschannel.h"
diff --git a/drivers/staging/unisys/uislib/uisthread.c b/drivers/staging/unisys/uislib/uisthread.c
index 9aae374..9005514 100644
--- a/drivers/staging/unisys/uislib/uisthread.c
+++ b/drivers/staging/unisys/uislib/uisthread.c
@@ -20,7 +20,6 @@
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/kthread.h>
-#include "uniklog.h"
 #include "uisutils.h"
 #include "uisthread.h"
 
diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c
index f724e9d..b96d66e 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -21,7 +21,6 @@
 #include <linux/uuid.h>
 #include <linux/spinlock.h>
 #include <linux/list.h>
-#include "uniklog.h"
 #include "uisutils.h"
 #include "version.h"
 #include "vbushelper.h"
diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 071c4bf..8684580 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -33,7 +33,6 @@
 #include <config/modversions.h>
 #endif
 
-#include "uniklog.h"
 #include "diagnostics/appos_subsystems.h"
 #include "uisutils.h"
 #include "uisqueue.h"
diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c
index b7276cb..d3d5cac 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -21,7 +21,6 @@
 #ifdef CONFIG_MODVERSIONS
 #include <config/modversions.h>
 #endif
-#include "uniklog.h"
 #include "diagnostics/appos_subsystems.h"
 #include "uisutils.h"
 #include "vbuschannel.h"
diff --git a/drivers/staging/unisys/visorchannel/globals.h b/drivers/staging/unisys/visorchannel/globals.h
index 581ed83..0ed8e1d 100644
--- a/drivers/staging/unisys/visorchannel/globals.h
+++ b/drivers/staging/unisys/visorchannel/globals.h
@@ -18,7 +18,6 @@
 #ifndef __VISORCHANNEL_GLOBALS_H__
 #define __VISORCHANNEL_GLOBALS_H__
 
-#include "uniklog.h"
 #include "timskmod.h"
 #include "memregion.h"
 #include "version.h"
diff --git a/drivers/staging/unisys/visorchipset/globals.h b/drivers/staging/unisys/visorchipset/globals.h
index a1d35d4..f76e498 100644
--- a/drivers/staging/unisys/visorchipset/globals.h
+++ b/drivers/staging/unisys/visorchipset/globals.h
@@ -18,7 +18,6 @@
 #ifndef __VISORCHIPSET_GLOBALS_H__
 #define __VISORCHIPSET_GLOBALS_H__
 
-#include "uniklog.h"
 #include "diagnostics/appos_subsystems.h"
 #include "timskmod.h"
 #include "visorchipset.h"
diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h
index 9fbe3b5..7e015d1 100644
--- a/drivers/staging/unisys/visorchipset/parser.h
+++ b/drivers/staging/unisys/visorchipset/parser.h
@@ -20,7 +20,6 @@
 
 #include <linux/uuid.h>
 
-#include "uniklog.h"
 #include "timskmod.h"
 #include "channel.h"
 
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 71e0b85..f485d1a 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -22,7 +22,6 @@
 #include "periodic_work.h"
 #include "file.h"
 #include "parser.h"
-#include "uniklog.h"
 #include "uisutils.h"
 #include "controlvmcompletionstatus.h"
 #include "guestlinuxdebug.h"
@@ -1810,14 +1809,14 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
 					   isLocalAddr, &retry);
 		if (!parser_ctx) {
 			if (retry) {
-				LOGWRN("throttling to copy payload");
+				pr_warn("throttling to copy payload");
 				return FALSE;
 			}
-			LOGWRN("parsing failed");
-			LOGWRN("inmsg.hdr.Id=0x%lx", (ulong) inmsg.hdr.id);
-			LOGWRN("parametersAddr=0x%llx", (u64) parametersAddr);
-			LOGWRN("parametersBytes=%lu", (ulong) parametersBytes);
-			LOGWRN("isLocalAddr=%d", isLocalAddr);
+			pr_warn("parsing failed");
+			pr_warn("inmsg.hdr.Id=0x%lx", (ulong) inmsg.hdr.id);
+			pr_warn("parametersAddr=0x%llx", (u64) parametersAddr);
+			pr_warn("parametersBytes=%lu", (ulong) parametersBytes);
+			pr_warn("isLocalAddr=%d", isLocalAddr);
 		}
 	}
 
@@ -1828,7 +1827,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
 		    &&
 		    (!visorchannel_signalinsert
 		     (ControlVm_channel, CONTROLVM_QUEUE_ACK, &ackmsg)))
-			LOGWRN("failed to send ACK failed");
+			pr_warn("failed to send ACK failed");
 	}
 	switch (inmsg.hdr.id) {
 	case CONTROLVM_CHIPSET_INIT:
diff --git a/drivers/staging/unisys/visorutil/charqueue.h b/drivers/staging/unisys/visorutil/charqueue.h
index 56c1f79..f46a776 100644
--- a/drivers/staging/unisys/visorutil/charqueue.h
+++ b/drivers/staging/unisys/visorutil/charqueue.h
@@ -18,7 +18,6 @@
 #ifndef __CHARQUEUE_H__
 #define __CHARQUEUE_H__
 
-#include "uniklog.h"
 #include "timskmod.h"
 
 /* struct charqueue is an opaque structure to users.
diff --git a/drivers/staging/unisys/visorutil/easyproc.c b/drivers/staging/unisys/visorutil/easyproc.c
index abda3a8..c401037 100644
--- a/drivers/staging/unisys/visorutil/easyproc.c
+++ b/drivers/staging/unisys/visorutil/easyproc.c
@@ -34,7 +34,6 @@
 
 #include <linux/proc_fs.h>
 
-#include "uniklog.h"
 #include "timskmod.h"
 #include "easyproc.h"
 
diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c
index a72dcb4..1380e65 100644
--- a/drivers/staging/unisys/visorutil/memregion_direct.c
+++ b/drivers/staging/unisys/visorutil/memregion_direct.c
@@ -20,7 +20,6 @@
  *  channel memory (in main memory of the host system) from code running in
  *  a virtual partition.
  */
-#include "uniklog.h"
 #include "timskmod.h"
 #include "memregion.h"
 
diff --git a/drivers/staging/unisys/visorutil/periodic_work.c b/drivers/staging/unisys/visorutil/periodic_work.c
index 0d86fbb..914e5c5 100644
--- a/drivers/staging/unisys/visorutil/periodic_work.c
+++ b/drivers/staging/unisys/visorutil/periodic_work.c
@@ -19,7 +19,6 @@
  *  Helper functions to schedule periodic work in Linux kernel mode.
  */
 
-#include "uniklog.h"
 #include "timskmod.h"
 #include "periodic_work.h"
 
@@ -197,8 +196,7 @@ BOOL visor_periodic_work_stop(struct periodic_work *pw)
 		}
 		if (pw->is_scheduled) {
 			write_unlock(&pw->lock);
-			WARNDEV(pw->devnam,
-				"waiting for delayed work...");
+			pr_warn("%s: waiting for delayed work...", pw->devnam);
 			/* We rely on the delayed work function running here,
 			 * and eventually calling
 			 * visor_periodic_work_nextperiod(),
diff --git a/drivers/staging/unisys/visorutil/visorkmodutils.c b/drivers/staging/unisys/visorutil/visorkmodutils.c
index 556e264..62f0f70 100644
--- a/drivers/staging/unisys/visorutil/visorkmodutils.c
+++ b/drivers/staging/unisys/visorutil/visorkmodutils.c
@@ -15,7 +15,6 @@
  * details.
  */
 
-#include "uniklog.h"
 #include "timskmod.h"
 
 #define MYDRVNAME "timskmodutils"
-- 
2.1.0

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

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

* [PATCH 56/69] staging: unisys: virthba: Remove unneeded spaces after casts
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (54 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 57/69] staging: unisys: virthba: Fix open parenthesis alignment checks Benjamin Romer
                   ` (12 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch removes all unnecessary spaces after casts, as reported by the
checkpatch script.

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 8684580..2a854b9 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -259,7 +259,7 @@ add_scsipending_entry(struct virthba_info *vhbainfo, char cmdtype, void *new)
 	insert_location = vhbainfo->nextinsert;
 	while (vhbainfo->pending[insert_location].sent != NULL) {
 		insert_location = (insert_location + 1) % MAX_PENDING_REQUESTS;
-		if (insert_location == (int) vhbainfo->nextinsert) {
+		if (insert_location == (int)vhbainfo->nextinsert) {
 			pr_err("Queue should be full. insert_location<<%d>>  Unable to find open slot for pending commands.\n",
 			     insert_location);
 			spin_unlock_irqrestore(&vhbainfo->privlock, flags);
@@ -288,7 +288,7 @@ add_scsipending_entry_with_wait(struct virthba_info *vhbainfo, char cmdtype,
 		insert_location = add_scsipending_entry(vhbainfo, cmdtype, new);
 	}
 
-	return (unsigned int) insert_location;
+	return (unsigned int)insert_location;
 }
 
 static void *
@@ -299,13 +299,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del)
 
 	if (del >= MAX_PENDING_REQUESTS) {
 		pr_err("Invalid queue position <<%lu>> given to delete. MAX_PENDING_REQUESTS <<%d>>\n",
-		     (unsigned long) del, MAX_PENDING_REQUESTS);
+		     (unsigned long)del, MAX_PENDING_REQUESTS);
 	} else {
 		spin_lock_irqsave(&vhbainfo->privlock, flags);
 
 		if (vhbainfo->pending[del].sent == NULL)
 			pr_err("Deleting already cleared queue entry at <<%lu>>.\n",
-			     (unsigned long) del);
+			     (unsigned long)del);
 
 		sent = vhbainfo->pending[del].sent;
 
@@ -417,7 +417,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
 static irqreturn_t
 virthba_ISR(int irq, void *dev_id)
 {
-	struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
+	struct virthba_info *virthbainfo = (struct virthba_info *)dev_id;
 	struct channel_header __iomem *pChannelHeader;
 	struct signal_queue_header __iomem *pqhdr;
 	u64 mask;
@@ -441,7 +441,7 @@ virthba_ISR(int irq, void *dev_id)
 		return IRQ_NONE;
 	}
 	pqhdr = (struct signal_queue_header __iomem *)
-		((char __iomem *) pChannelHeader +
+		((char __iomem *)pChannelHeader +
 		 readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
 	writeq(readq(&pqhdr->num_irq_received) + 1,
 	       &pqhdr->num_irq_received);
@@ -496,19 +496,19 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	 * the max-channel value.
 	 */
 	pr_info("virtpcidev->scsi.max.max_channel=%u, max_id=%u, max_lun=%u, cmd_per_lun=%u, max_io_size=%u\n",
-	     (unsigned) virtpcidev->scsi.max.max_channel - 1,
-	     (unsigned) virtpcidev->scsi.max.max_id,
-	     (unsigned) virtpcidev->scsi.max.max_lun,
-	     (unsigned) virtpcidev->scsi.max.cmd_per_lun,
-	     (unsigned) virtpcidev->scsi.max.max_io_size);
-	scsihost->max_channel = (unsigned) virtpcidev->scsi.max.max_channel;
-	scsihost->max_id = (unsigned) virtpcidev->scsi.max.max_id;
-	scsihost->max_lun = (unsigned) virtpcidev->scsi.max.max_lun;
-	scsihost->cmd_per_lun = (unsigned) virtpcidev->scsi.max.cmd_per_lun;
+	     (unsigned)virtpcidev->scsi.max.max_channel - 1,
+	     (unsigned)virtpcidev->scsi.max.max_id,
+	     (unsigned)virtpcidev->scsi.max.max_lun,
+	     (unsigned)virtpcidev->scsi.max.cmd_per_lun,
+	     (unsigned)virtpcidev->scsi.max.max_io_size);
+	scsihost->max_channel = (unsigned)virtpcidev->scsi.max.max_channel;
+	scsihost->max_id = (unsigned)virtpcidev->scsi.max.max_id;
+	scsihost->max_lun = (unsigned)virtpcidev->scsi.max.max_lun;
+	scsihost->cmd_per_lun = (unsigned)virtpcidev->scsi.max.cmd_per_lun;
 	scsihost->max_sectors =
-	    (unsigned short) (virtpcidev->scsi.max.max_io_size >> 9);
+	    (unsigned short)(virtpcidev->scsi.max.max_io_size >> 9);
 	scsihost->sg_tablesize =
-	    (unsigned short) (virtpcidev->scsi.max.max_io_size / PAGE_SIZE);
+	    (unsigned short)(virtpcidev->scsi.max.max_io_size / PAGE_SIZE);
 	if (scsihost->sg_tablesize > MAX_PHYS_INFO)
 		scsihost->sg_tablesize = MAX_PHYS_INFO;
 	pr_info("scsihost->max_channel=%u, max_id=%u, max_lun=%llu, cmd_per_lun=%u, max_sectors=%hu, sg_tablesize=%hu\n",
@@ -539,7 +539,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		return -ENODEV;
 	}
 
-	virthbainfo = (struct virthba_info *) scsihost->hostdata;
+	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	memset(virthbainfo, 0, sizeof(struct virthba_info));
 	for (i = 0; i < VIRTHBASOPENMAX; i++) {
 		if (VirtHbasOpen[i].virthbainfo == NULL) {
@@ -641,11 +641,11 @@ virthba_remove(struct virtpci_dev *virtpcidev)
 {
 	struct virthba_info *virthbainfo;
 	struct Scsi_Host *scsihost =
-	    (struct Scsi_Host *) virtpcidev->scsi.scsihost;
+	    (struct Scsi_Host *)virtpcidev->scsi.scsihost;
 
 	pr_info("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
 	       virtpcidev->device_no);
-	virthbainfo = (struct virthba_info *) scsihost->hostdata;
+	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	if (virthbainfo->interrupt_vector != -1)
 		free_irq(virthbainfo->interrupt_vector, virthbainfo);
 	pr_info("Removing virtpcidev: 0x%p, virthbainfo: 0x%p\n", virtpcidev,
@@ -674,7 +674,7 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 {
 	struct uiscmdrsp *cmdrsp;
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) scsihost->hostdata;
+	    (struct virthba_info *)scsihost->hostdata;
 	int notifyresult = 0xffff;
 	wait_queue_head_t notifyevent;
 
@@ -699,8 +699,8 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 	/* specify the event that has to be triggered when this cmd is
 	 * complete
 	 */
-	cmdrsp->vdiskmgmt.notify = (void *) &notifyevent;
-	cmdrsp->vdiskmgmt.notifyresult = (void *) &notifyresult;
+	cmdrsp->vdiskmgmt.notify = (void *)&notifyevent;
+	cmdrsp->vdiskmgmt.notifyresult = (void *)&notifyresult;
 
 	/* save destination */
 	cmdrsp->vdiskmgmt.vdisktype = vdiskcmdtype;
@@ -708,14 +708,14 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
 	cmdrsp->vdiskmgmt.vdest.id = vdest->id;
 	cmdrsp->vdiskmgmt.vdest.lun = vdest->lun;
 	cmdrsp->vdiskmgmt.scsicmd =
-	    (void *) (uintptr_t)
+	    (void *)(uintptr_t)
 		add_scsipending_entry_with_wait(virthbainfo, CMD_VDISKMGMT_TYPE,
-						(void *) cmdrsp);
+						(void *)cmdrsp);
 
 	uisqueue_put_cmdrsp_with_lock_client(virthbainfo->chinfo.queueinfo,
 					     cmdrsp, IOCHAN_TO_IOPART,
 					     &virthbainfo->chinfo.insertlock,
-					     DONT_ISSUE_INTERRUPT, (u64) NULL,
+					     DONT_ISSUE_INTERRUPT, (u64)NULL,
 					     OK_TO_WAIT, "vhba");
 	pr_info("VdiskMgmt waiting on event notifyevent=0x%p\n",
 	       cmdrsp->scsitaskmgmt.notify);
@@ -735,7 +735,7 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 {
 	struct uiscmdrsp *cmdrsp;
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) scsidev->host->hostdata;
+	    (struct virthba_info *)scsidev->host->hostdata;
 	int notifyresult = 0xffff;
 	wait_queue_head_t notifyevent;
 
@@ -758,8 +758,8 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 	cmdrsp->cmdtype = CMD_SCSITASKMGMT_TYPE;
 	/* specify the event that has to be triggered when this */
 	/* cmd is complete */
-	cmdrsp->scsitaskmgmt.notify = (void *) &notifyevent;
-	cmdrsp->scsitaskmgmt.notifyresult = (void *) &notifyresult;
+	cmdrsp->scsitaskmgmt.notify = (void *)&notifyevent;
+	cmdrsp->scsitaskmgmt.notifyresult = (void *)&notifyresult;
 
 	/* save destination */
 	cmdrsp->scsitaskmgmt.tasktype = tasktype;
@@ -767,15 +767,15 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
 	cmdrsp->scsitaskmgmt.vdest.id = scsidev->id;
 	cmdrsp->scsitaskmgmt.vdest.lun = scsidev->lun;
 	cmdrsp->scsitaskmgmt.scsicmd =
-	    (void *) (uintptr_t)
+	    (void *)(uintptr_t)
 		add_scsipending_entry_with_wait(virthbainfo,
 						CMD_SCSITASKMGMT_TYPE,
-						(void *) cmdrsp);
+						(void *)cmdrsp);
 
 	uisqueue_put_cmdrsp_with_lock_client(virthbainfo->chinfo.queueinfo,
 					     cmdrsp, IOCHAN_TO_IOPART,
 					     &virthbainfo->chinfo.insertlock,
-					     DONT_ISSUE_INTERRUPT, (u64) NULL,
+					     DONT_ISSUE_INTERRUPT, (u64)NULL,
 					     OK_TO_WAIT, "vhba");
 	pr_info("TaskMgmt waiting on event notifyevent=0x%p\n",
 	       cmdrsp->scsitaskmgmt.notify);
@@ -796,7 +796,7 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	for (vdisk = &((struct virthba_info *) scsidev->host->hostdata)->head;
+	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
 		if ((scsidev->channel == vdisk->channel)
 		    && (scsidev->id == vdisk->id)
@@ -822,7 +822,7 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	for (vdisk = &((struct virthba_info *) scsidev->host->hostdata)->head;
+	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
 		if ((scsidev->channel == vdisk->channel)
 		    && (scsidev->id == vdisk->id)
@@ -848,7 +848,7 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	for (vdisk = &((struct virthba_info *) scsidev->host->hostdata)->head;
+	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
 		if ((scsidev->channel == vdisk->channel)
 		    && (scsidev->id == vdisk->id)
@@ -906,7 +906,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	struct uiscmdrsp *cmdrsp;
 	unsigned int i;
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) scsihost->hostdata;
+	    (struct virthba_info *)scsihost->hostdata;
 	struct scatterlist *sg = NULL;
 	struct scatterlist *sgl = NULL;
 	int sg_failed = 0;
@@ -929,9 +929,9 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	 * will return the scsicmd pointer for completion
 	 */
 	insert_location =
-	    add_scsipending_entry(virthbainfo, CMD_SCSI_TYPE, (void *) scsicmd);
+	    add_scsipending_entry(virthbainfo, CMD_SCSI_TYPE, (void *)scsicmd);
 	if (insert_location != -1) {
-		cmdrsp->scsi.scsicmd = (void *) (uintptr_t) insert_location;
+		cmdrsp->scsi.scsicmd = (void *)(uintptr_t)insert_location;
 	} else {
 		pr_err("Queue is full. Returning busy.\n");
 		kfree(cmdrsp);
@@ -956,7 +956,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	if (scsi_sg_count(scsicmd) > MAX_PHYS_INFO) {
 		pr_err("scsicmd use_sg:%d greater than MAX:%d\n",
 		       scsi_sg_count(scsicmd), MAX_PHYS_INFO);
-		del_scsipending_entry(virthbainfo, (uintptr_t) insert_location);
+		del_scsipending_entry(virthbainfo, (uintptr_t)insert_location);
 		kfree(cmdrsp);
 		return 1;	/* reject the command */
 	}
@@ -992,7 +992,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 			for_each_sg(sgl, sg, scsi_sg_count(scsicmd), i) {
 				pr_err("   Entry(%d): page->[0x%p], phys->[0x%Lx], off(%d), len(%d)\n",
 				     i, sg_page(sg),
-				     (unsigned long long) sg_phys(sg),
+				     (unsigned long long)sg_phys(sg),
 				     sg->offset, sg->length);
 			}
 			pr_err("Done sg_list dump.\n");
@@ -1011,12 +1011,12 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 						 &virthbainfo->chinfo.
 						 insertlock,
 						 DONT_ISSUE_INTERRUPT,
-						 (u64) NULL, DONT_WAIT, "vhba");
+						 (u64)NULL, DONT_WAIT, "vhba");
 	if (i == 0) {
 		/* queue must be full - and we said don't wait - return busy */
 		pr_err("uisqueue_put_cmdrsp_with_lock ****FAILED\n");
 		kfree(cmdrsp);
-		del_scsipending_entry(virthbainfo, (uintptr_t) insert_location);
+		del_scsipending_entry(virthbainfo, (uintptr_t)insert_location);
 		return SCSI_MLQUEUE_DEVICE_BUSY;
 	}
 
@@ -1036,9 +1036,9 @@ virthba_slave_alloc(struct scsi_device *scsidev)
 	struct virtdisk_info *vdisk;
 	struct virtdisk_info *tmpvdisk;
 	struct virthba_info *virthbainfo;
-	struct Scsi_Host *scsihost = (struct Scsi_Host *) scsidev->host;
+	struct Scsi_Host *scsihost = (struct Scsi_Host *)scsidev->host;
 
-	virthbainfo = (struct virthba_info *) scsihost->hostdata;
+	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	if (!virthbainfo) {
 		pr_err("Could not find virthba_info for scsihost\n");
 		return 0;	/* even though we errored, treat as success */
@@ -1076,9 +1076,9 @@ virthba_slave_destroy(struct scsi_device *scsidev)
 	 */
 	struct virtdisk_info *vdisk, *delvdisk;
 	struct virthba_info *virthbainfo;
-	struct Scsi_Host *scsihost = (struct Scsi_Host *) scsidev->host;
+	struct Scsi_Host *scsihost = (struct Scsi_Host *)scsidev->host;
 
-	virthbainfo = (struct virthba_info *) scsihost->hostdata;
+	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	if (!virthbainfo)
 		pr_err("Could not find virthba_info for scsihost\n");
 	for (vdisk = &virthbainfo->head; vdisk->next; vdisk = vdisk->next) {
@@ -1107,7 +1107,7 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 
 	scsidev = scsicmd->device;
 	memcpy(scsicmd->sense_buffer, cmdrsp->scsi.sensebuf, MAX_SENSE_SIZE);
-	sd = (struct sense_data *) scsicmd->sense_buffer;
+	sd = (struct sense_data *)scsicmd->sense_buffer;
 
 	/* Do not log errors for disk-not-present inquiries */
 	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
@@ -1116,7 +1116,7 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 		return;
 
 	/* Okay see what our error_count is here.... */
-	for (vdisk = &((struct virthba_info *) scsidev->host->hostdata)->head;
+	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
 		if ((scsidev->channel != vdisk->channel)
 		    || (scsidev->id != vdisk->id)
@@ -1187,7 +1187,7 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 			pr_debug("copying OUT OF buf into 0x%p %d\n",
 			     sg_page(sg + i), sg[i].length);
 			thispage_orig = kmap_atomic(sg_page(sg + i));
-			thispage = (void *) ((unsigned long)thispage_orig |
+			thispage = (void *)((unsigned long)thispage_orig |
 					     sg[i].offset);
 			memcpy(thispage, buf + bufind, sg[i].length);
 			kunmap_atomic(thispage_orig);
@@ -1237,8 +1237,8 @@ complete_vdiskmgmt_command(struct uiscmdrsp *cmdrsp)
 {
 	/* copy the result of the taskmgmt and */
 	/* wake up the error handler that is waiting for this */
-	*(int *) cmdrsp->vdiskmgmt.notifyresult = cmdrsp->vdiskmgmt.result;
-	wake_up_all((wait_queue_head_t *) cmdrsp->vdiskmgmt.notify);
+	*(int *)cmdrsp->vdiskmgmt.notifyresult = cmdrsp->vdiskmgmt.result;
+	wake_up_all((wait_queue_head_t *)cmdrsp->vdiskmgmt.notify);
 	pr_info("set notify result to %d\n", cmdrsp->vdiskmgmt.result);
 }
 
@@ -1247,9 +1247,9 @@ complete_taskmgmt_command(struct uiscmdrsp *cmdrsp)
 {
 	/* copy the result of the taskmgmt and */
 	/* wake up the error handler that is waiting for this */
-	*(int *) cmdrsp->scsitaskmgmt.notifyresult =
+	*(int *)cmdrsp->scsitaskmgmt.notifyresult =
 	    cmdrsp->scsitaskmgmt.result;
-	wake_up_all((wait_queue_head_t *) cmdrsp->scsitaskmgmt.notify);
+	wake_up_all((wait_queue_head_t *)cmdrsp->scsitaskmgmt.notify);
 	pr_info("set notify result to %d\n", cmdrsp->scsitaskmgmt.result);
 }
 
@@ -1282,14 +1282,14 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 			 * deletion
 			 */
 			scsicmd = del_scsipending_entry(virthbainfo,
-					(uintptr_t) cmdrsp->scsi.scsicmd);
+					(uintptr_t)cmdrsp->scsi.scsicmd);
 			if (!scsicmd)
 				break;
 			/* complete the orig cmd */
 			complete_scsi_command(cmdrsp, scsicmd);
 		} else if (cmdrsp->cmdtype == CMD_SCSITASKMGMT_TYPE) {
 			if (!del_scsipending_entry(virthbainfo,
-				   (uintptr_t) cmdrsp->scsitaskmgmt.scsicmd))
+				   (uintptr_t)cmdrsp->scsitaskmgmt.scsicmd))
 				break;
 			complete_taskmgmt_command(cmdrsp);
 		} else if (cmdrsp->cmdtype == CMD_NOTIFYGUEST_TYPE) {
@@ -1301,7 +1301,7 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 			process_disk_notify(shost, cmdrsp);
 		} else if (cmdrsp->cmdtype == CMD_VDISKMGMT_TYPE) {
 			if (!del_scsipending_entry(virthbainfo,
-				   (uintptr_t) cmdrsp->vdiskmgmt.scsicmd))
+				   (uintptr_t)cmdrsp->vdiskmgmt.scsicmd))
 				break;
 			complete_vdiskmgmt_command(cmdrsp);
 		} else
@@ -1421,7 +1421,7 @@ static ssize_t enable_ints_write(struct file *file,
 	buf[count] = '\0';
 	if (copy_from_user(buf, buffer, count)) {
 		pr_err("copy_from_user failed. buf<<%.*s>> count<<%lu>>\n",
-		       (int) count, buf, count);
+		       (int)count, buf, count);
 		return -EFAULT;
 	}
 
@@ -1429,7 +1429,7 @@ static ssize_t enable_ints_write(struct file *file,
 
 	if (i != 0) {
 		pr_err("Failed to scan value for enable_ints, buf<<%.*s>>",
-		       (int) count, buf);
+		       (int)count, buf);
 		return -EFAULT;
 	}
 
@@ -1464,7 +1464,7 @@ static int
 virthba_serverup(struct virtpci_dev *virtpcidev)
 {
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) ((struct Scsi_Host *) virtpcidev->scsi.
+	    (struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
 				     scsihost)->hostdata;
 
 	pr_debug("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
@@ -1525,23 +1525,23 @@ virthba_serverdown_complete(struct work_struct *work)
 		pendingdel = &(virthbainfo->pending[i]);
 		switch (pendingdel->cmdtype) {
 		case CMD_SCSI_TYPE:
-			scsicmd = (struct scsi_cmnd *) pendingdel->sent;
+			scsicmd = (struct scsi_cmnd *)pendingdel->sent;
 			scsicmd->result = (DID_RESET << 16);
 			if (scsicmd->scsi_done)
 				scsicmd->scsi_done(scsicmd);
 			break;
 		case CMD_SCSITASKMGMT_TYPE:
-			cmdrsp = (struct uiscmdrsp *) pendingdel->sent;
+			cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
 			pr_debug("cmdrsp=0x%p, notify=0x%p\n", cmdrsp,
 			       cmdrsp->scsitaskmgmt.notify);
-			*(int *) cmdrsp->scsitaskmgmt.notifyresult =
+			*(int *)cmdrsp->scsitaskmgmt.notifyresult =
 			    TASK_MGMT_FAILED;
 			wake_up_all((wait_queue_head_t *)
 				    cmdrsp->scsitaskmgmt.notify);
 			break;
 		case CMD_VDISKMGMT_TYPE:
-			cmdrsp = (struct uiscmdrsp *) pendingdel->sent;
-			*(int *) cmdrsp->vdiskmgmt.notifyresult =
+			cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
+			*(int *)cmdrsp->vdiskmgmt.notifyresult =
 			    VDISK_MGMT_FAILED;
 			wake_up_all((wait_queue_head_t *)
 				    cmdrsp->vdiskmgmt.notify);
@@ -1572,7 +1572,7 @@ static int
 virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 {
 	struct virthba_info *virthbainfo =
-	    (struct virthba_info *) ((struct Scsi_Host *) virtpcidev->scsi.
+	    (struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
 				     scsihost)->hostdata;
 
 	pr_debug("virthba_serverdown");
-- 
2.1.0

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

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

* [PATCH 57/69] staging: unisys: virthba: Fix open parenthesis alignment checks
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (55 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 56/69] staging: unisys: virthba: Remove unneeded spaces after casts Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 58/69] staging: unisys: virthba: Fix logical continuation checks Benjamin Romer
                   ` (11 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

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

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

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

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

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

* [PATCH 58/69] staging: unisys: virthba: Fix logical continuation checks
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (56 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 57/69] staging: unisys: virthba: Fix open parenthesis alignment checks Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 59/69] staging: unisys: virthba: Remove blank lines before/after braces Benjamin Romer
                   ` (10 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes checkpatch checks where the logical operator should be at the
end of the line above, not beginning the next line.

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index e99404a..54a3546 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -429,8 +429,8 @@ virthba_ISR(int irq, void *dev_id)
 	virthbainfo->interrupts_rcvd++;
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
 	if (((readq(&pChannelHeader->features)
-	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
-	    && ((readq(&pChannelHeader->features) &
+	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) &&
+	     ((readq(&pChannelHeader->features) &
 		 ULTRA_IO_DRIVER_DISABLES_INTS) !=
 		0)) {
 		virthbainfo->interrupts_disabled++;
@@ -800,9 +800,9 @@ virthba_abort_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -826,9 +826,9 @@ virthba_bus_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -852,9 +852,9 @@ virthba_device_reset_handler(struct scsi_cmnd *scsicmd)
 	scsidev = scsicmd->device;
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel == vdisk->channel)
-		    && (scsidev->id == vdisk->id)
-		    && (scsidev->lun == vdisk->lun)) {
+		if ((scsidev->channel == vdisk->channel) &&
+		    (scsidev->id == vdisk->id) &&
+		    (scsidev->lun == vdisk->lun)) {
 			if (atomic_read(&vdisk->error_count) <
 			    VIRTHBA_ERROR_COUNT) {
 				atomic_inc(&vdisk->error_count);
@@ -1120,9 +1120,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	/* Okay see what our error_count is here.... */
 	for (vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 	     vdisk->next; vdisk = vdisk->next) {
-		if ((scsidev->channel != vdisk->channel)
-		    || (scsidev->id != vdisk->id)
-		    || (scsidev->lun != vdisk->lun))
+		if ((scsidev->channel != vdisk->channel) ||
+		    (scsidev->id != vdisk->id) ||
+		    (scsidev->lun != vdisk->lun))
 			continue;
 
 		if (atomic_read(&vdisk->error_count) < VIRTHBA_ERROR_COUNT) {
@@ -1158,8 +1158,8 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 	struct virtdisk_info *vdisk;
 
 	scsidev = scsicmd->device;
-	if ((cmdrsp->scsi.cmnd[0] == INQUIRY)
-	    && (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
+	if ((cmdrsp->scsi.cmnd[0] == INQUIRY) &&
+	    (cmdrsp->scsi.bufflen >= MIN_INQUIRY_RESULT_LEN)) {
 		if (cmdrsp->scsi.no_disk_result == 0)
 			return;
 
@@ -1199,9 +1199,9 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 
 		vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 		for ( ; vdisk->next; vdisk = vdisk->next) {
-			if ((scsidev->channel != vdisk->channel)
-			    || (scsidev->id != vdisk->id)
-			    || (scsidev->lun != vdisk->lun))
+			if ((scsidev->channel != vdisk->channel) ||
+			    (scsidev->id != vdisk->id) ||
+			    (scsidev->lun != vdisk->lun))
 				continue;
 
 			if (atomic_read(&vdisk->ios_threshold) > 0) {
-- 
2.1.0

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

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

* [PATCH 59/69] staging: unisys: virthba: Remove blank lines before/after braces
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (57 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 58/69] staging: unisys: virthba: Fix logical continuation checks Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 60/69] staging: unisys: virthba: Fix missing braces at end of if-else statements Benjamin Romer
                   ` (9 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch removes unnecessary blank lines either before opening braces or
after closing braces, as reported by the checkpatch script.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 54a3546..ae73d11 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -980,7 +980,6 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 		sgl = scsi_sglist(scsicmd);
 
 		for_each_sg(sgl, sg, scsi_sg_count(scsicmd), i) {
-
 			cmdrsp->scsi.gpi_list[i].address = sg_phys(sg);
 			cmdrsp->scsi.gpi_list[i].length = sg->length;
 			if ((i != 0) && (sg->offset != 0))
@@ -1196,7 +1195,6 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
 			bufind += sg[i].length;
 		}
 	} else {
-
 		vdisk = &((struct virthba_info *)scsidev->host->hostdata)->head;
 		for ( ; vdisk->next; vdisk = vdisk->next) {
 			if ((scsidev->channel != vdisk->channel) ||
@@ -1644,7 +1642,6 @@ virthba_mod_init(void)
 		POSTCODE_LINUX_3(VHBA_CREATE_FAILURE_PC, error,
 				 POSTCODE_SEVERITY_ERR);
 	} else {
-
 		/* create the debugfs directories and entries */
 		virthba_debugfs_dir = debugfs_create_dir("virthba", NULL);
 		debugfs_create_file("info", S_IRUSR, virthba_debugfs_dir,
@@ -1735,7 +1732,6 @@ virthba_mod_exit(void)
 
 	debugfs_remove_recursive(virthba_debugfs_dir);
 	pr_info("Leaving virthba_mod_exit\n");
-
 }
 
 /* specify function to be run at module insertion time */
-- 
2.1.0

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

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

* [PATCH 60/69] staging: unisys: virthba: Fix missing braces at end of if-else statements
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (58 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 59/69] staging: unisys: virthba: Remove blank lines before/after braces Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 61/69] staging: unisys: virthba: Change alloc calls to use var name instead of type Benjamin Romer
                   ` (8 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: jkc, driverdev-devel, sparmaintainer, Ken Depro, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes checkpatch warnings that resulted from the else portion of
if-else statements missing braces, so that it conforms with the rest of the
statement.

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index ae73d11..4e56a0d 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -1304,8 +1304,9 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 				   (uintptr_t)cmdrsp->vdiskmgmt.scsicmd))
 				break;
 			complete_vdiskmgmt_command(cmdrsp);
-		} else
+		} else {
 			pr_err("Invalid cmdtype %d\n", cmdrsp->cmdtype);
+		}
 		/* cmdrsp is now available for reuse */
 	}
 }
@@ -1586,8 +1587,9 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 	} else if (virthbainfo->serverchangingstate) {
 		pr_err("Server already processing change state message\n");
 		return 0;
-	} else
+	} else {
 		pr_err("Server already down, but another server down message received.");
+	}
 
 	return 1;
 }
-- 
2.1.0

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

* [PATCH 61/69] staging: unisys: virthba: Change alloc calls to use var name instead of type
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (59 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 60/69] staging: unisys: virthba: Fix missing braces at end of if-else statements Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 62/69] staging: unisys: virthba: Fix a couple checkpatch problems Benjamin Romer
                   ` (7 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch changes a couple of kzalloc calls to pass the variable name to the
call, rather than the variable struct type.  This is a result of checks
generated during the checkpatch script.

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 4e56a0d..83a94c0 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -397,7 +397,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
 	struct diskaddremove *dar;
 	unsigned long flags;
 
-	dar = kzalloc(sizeof(struct diskaddremove), GFP_ATOMIC);
+	dar = kzalloc(sizeof(*dar), GFP_ATOMIC);
 	if (dar) {
 		dar->add = cmdrsp->disknotify.add;
 		dar->shost = shost;
@@ -1051,8 +1051,8 @@ virthba_slave_alloc(struct scsi_device *scsidev)
 		    (vdisk->next->lun == scsidev->lun))
 			return 0;
 	}
-	tmpvdisk = kzalloc(sizeof(struct virtdisk_info), GFP_ATOMIC);
-	if (!tmpvdisk)
+	tmpvdisk = kzalloc(sizeof(*tmpvdisk), GFP_ATOMIC);
+	if (!tmpvdisk)		/* error allocating */
 		return 0;
 
 	tmpvdisk->channel = scsidev->channel;
-- 
2.1.0

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

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

* [PATCH 62/69] staging: unisys: virthba: Fix a couple checkpatch problems
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (60 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 61/69] staging: unisys: virthba: Change alloc calls to use var name instead of type Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 63/69] staging: unisys: virthba: Fix "else not useful after return" warning Benjamin Romer
                   ` (6 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes a couple small issues reported by the checkpatch script:
  Adds a blank line after a struct definition.
  Removes unnecessary parentheses surrounding a dereference of a struct member.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 83a94c0..b78156d 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -165,6 +165,7 @@ struct virtdisk_info {
 	atomic_t error_count;
 	struct virtdisk_info *next;
 };
+
 /* Each Scsi_Host has a host_data area that contains this struct. */
 struct virthba_info {
 	struct Scsi_Host *scsihost;
@@ -1523,7 +1524,7 @@ virthba_serverdown_complete(struct work_struct *work)
 	/* Fail Commands that weren't completed */
 	spin_lock_irqsave(&virthbainfo->privlock, flags);
 	for (i = 0; i < MAX_PENDING_REQUESTS; i++) {
-		pendingdel = &(virthbainfo->pending[i]);
+		pendingdel = &virthbainfo->pending[i];
 		switch (pendingdel->cmdtype) {
 		case CMD_SCSI_TYPE:
 			scsicmd = (struct scsi_cmnd *)pendingdel->sent;
-- 
2.1.0

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

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

* [PATCH 63/69] staging: unisys: virthba: Fix "else not useful after return" warning
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (61 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 62/69] staging: unisys: virthba: Fix a couple checkpatch problems Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 64/69] staging: unisys: virthba: Fix warnings regarding lines over 80 characters Benjamin Romer
                   ` (5 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes a warning generated during the checkpatch script that stated
"else not useful after return".  I modified the code to return a designated
status at the end of the function, and replaced the return statement in the
"else if" to set the status accordingly.

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index b78156d..612239e 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -1573,6 +1573,8 @@ virthba_serverdown_complete(struct work_struct *work)
 static int
 virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 {
+	int stat = 1;
+
 	struct virthba_info *virthbainfo =
 	    (struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
 				     scsihost)->hostdata;
@@ -1587,12 +1589,12 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
 			   &virthbainfo->serverdown_completion);
 	} else if (virthbainfo->serverchangingstate) {
 		pr_err("Server already processing change state message\n");
-		return 0;
+		stat = 0;
 	} else {
 		pr_err("Server already down, but another server down message received.");
 	}
 
-	return 1;
+	return stat;
 }
 
 /*****************************************************/
-- 
2.1.0

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

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

* [PATCH 64/69] staging: unisys: virthba: Fix warnings regarding lines over 80 characters
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (62 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 63/69] staging: unisys: virthba: Fix "else not useful after return" warning Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 65/69] staging: unisys: virthba: Fix a couple open parenthesis alignment issues Benjamin Romer
                   ` (4 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes warnings generated by checkpatch script regarding lines
over 80 characters long.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 612239e..4af52e4 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -84,7 +84,8 @@ static int virthba_host_reset_handler(struct scsi_cmnd *scsicmd);
 static const char *virthba_get_info(struct Scsi_Host *shp);
 static int virthba_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
 static int virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
-				     void (*virthba_cmnd_done)(struct scsi_cmnd *));
+				     void (*virthba_cmnd_done)
+					   (struct scsi_cmnd *));
 
 static const struct x86_cpu_id unisys_spar_ids[] = {
 	{ X86_VENDOR_INTEL, 6, 62, X86_FEATURE_ANY },
-- 
2.1.0

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

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

* [PATCH 65/69] staging: unisys: virthba: Fix a couple open parenthesis alignment issues
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (63 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 64/69] staging: unisys: virthba: Fix warnings regarding lines over 80 characters Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 66/69] staging: unisys: virthba: Fix CamelCase for Disk Add/Remove global variables Benjamin Romer
                   ` (3 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes a couple checkpatch checks where alignment of the parameters
did not match the open parenthesis of the function.

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 4af52e4..8dd808d 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -1284,7 +1284,8 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 			 * deletion
 			 */
 			scsicmd = del_scsipending_entry(virthbainfo,
-					(uintptr_t)cmdrsp->scsi.scsicmd);
+							(uintptr_t)
+							 cmdrsp->scsi.scsicmd);
 			if (!scsicmd)
 				break;
 			/* complete the orig cmd */
@@ -1303,7 +1304,8 @@ drain_queue(struct virthba_info *virthbainfo, struct chaninfo *dc,
 			process_disk_notify(shost, cmdrsp);
 		} else if (cmdrsp->cmdtype == CMD_VDISKMGMT_TYPE) {
 			if (!del_scsipending_entry(virthbainfo,
-				   (uintptr_t)cmdrsp->vdiskmgmt.scsicmd))
+						   (uintptr_t)
+						    cmdrsp->vdiskmgmt.scsicmd))
 				break;
 			complete_vdiskmgmt_command(cmdrsp);
 		} else {
-- 
2.1.0

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

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

* [PATCH 66/69] staging: unisys: virthba: Fix CamelCase for Disk Add/Remove global variables
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (64 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 65/69] staging: unisys: virthba: Fix a couple open parenthesis alignment issues Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 67/69] staging: unisys: virthba: Fix remaining CamelCase " Benjamin Romer
                   ` (2 subsequent siblings)
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes the Disk Add/Remove (DAR) related CamelCase global
variables in virthba.c, reported by the checkpatch script:
  DARWorkQ --> dar_work_queue
  DARWorkQHead --> dar_work_queue_head
  DARWorkQLock --> dar_work_queue_lock
  DARWorkQSched --> dar_work_queue_sched

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 8dd808d..aaf5319 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -195,7 +195,7 @@ struct virthba_info {
 	struct virtdisk_info head;
 };
 
-/* Work Data for DARWorkQ */
+/* Work Data for dar_work_queue */
 struct diskaddremove {
 	u8 add;			/* 0-remove, 1-add */
 	struct Scsi_Host *shost; /* Scsi Host for this virthba instance */
@@ -320,26 +320,26 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del)
 	return sent;
 }
 
-/* DARWorkQ (Disk Add/Remove) */
-static struct work_struct DARWorkQ;
-static struct diskaddremove *DARWorkQHead;
-static spinlock_t DARWorkQLock;
-static unsigned short DARWorkQSched;
+/* dar_work_queue (Disk Add/Remove) */
+static struct work_struct dar_work_queue;
+static struct diskaddremove *dar_work_queue_head;
+static spinlock_t dar_work_queue_lock;
+static unsigned short dar_work_queue_sched;
 #define QUEUE_DISKADDREMOVE(dar) { \
-	spin_lock_irqsave(&DARWorkQLock, flags); \
-	if (!DARWorkQHead) { \
-		DARWorkQHead = dar; \
+	spin_lock_irqsave(&dar_work_queue_lock, flags); \
+	if (!dar_work_queue_head) { \
+		dar_work_queue_head = dar; \
 		dar->next = NULL; \
 	} \
 	else { \
-		dar->next = DARWorkQHead; \
-		DARWorkQHead = dar; \
+		dar->next = dar_work_queue_head; \
+		dar_work_queue_head = dar; \
 	} \
-	if (!DARWorkQSched) { \
-		schedule_work(&DARWorkQ); \
-		DARWorkQSched = 1; \
+	if (!dar_work_queue_sched) { \
+		schedule_work(&dar_work_queue); \
+		dar_work_queue_sched = 1; \
 	} \
-	spin_unlock_irqrestore(&DARWorkQLock, flags); \
+	spin_unlock_irqrestore(&dar_work_queue_lock, flags); \
 }
 
 static inline void
@@ -367,7 +367,7 @@ SendDiskAddRemove(struct diskaddremove *dar)
 }
 
 /*****************************************************/
-/* DARWorkQ Handler Thread                           */
+/* dar_work_queue Handler Thread                     */
 /*****************************************************/
 static void
 doDiskAddRemove(struct work_struct *work)
@@ -377,11 +377,11 @@ doDiskAddRemove(struct work_struct *work)
 	int i = 0;
 	unsigned long flags;
 
-	spin_lock_irqsave(&DARWorkQLock, flags);
-	tmphead = DARWorkQHead;
-	DARWorkQHead = NULL;
-	DARWorkQSched = 0;
-	spin_unlock_irqrestore(&DARWorkQLock, flags);
+	spin_lock_irqsave(&dar_work_queue_lock, flags);
+	tmphead = dar_work_queue_head;
+	dar_work_queue_head = NULL;
+	dar_work_queue_sched = 0;
+	spin_unlock_irqrestore(&dar_work_queue_lock, flags);
 	while (tmphead) {
 		dar = tmphead;
 		tmphead = dar->next;
@@ -391,7 +391,7 @@ doDiskAddRemove(struct work_struct *work)
 }
 
 /*****************************************************/
-/* Routine to add entry to DARWorkQ                  */
+/* Routine to add entry to dar_work_queue            */
 /*****************************************************/
 static void
 process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
@@ -1660,8 +1660,8 @@ virthba_mod_init(void)
 				    virthba_debugfs_dir, NULL,
 				    &debugfs_enable_ints_fops);
 		/* Initialize dar_work_queue */
-		INIT_WORK(&DARWorkQ, doDiskAddRemove);
-		spin_lock_init(&DARWorkQLock);
+		INIT_WORK(&dar_work_queue, doDiskAddRemove);
+		spin_lock_init(&dar_work_queue_lock);
 
 		/* clear out array */
 		for (i = 0; i < VIRTHBASOPENMAX; i++)
-- 
2.1.0

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

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

* [PATCH 67/69] staging: unisys: virthba: Fix remaining CamelCase global variables
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (65 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 66/69] staging: unisys: virthba: Fix CamelCase for Disk Add/Remove global variables Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 68/69] staging: unisys: virthba: Fix CamelCase for a couple function names Benjamin Romer
  2014-12-05 22:09 ` [PATCH 69/69] staging: unisys: virthba: Fix CamelCase for local variables Benjamin Romer
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes the remaining CamelCase global variables in virthba.c reported
by the checkpatch script:
  MaxBuffLen --> max_buff_len
  VirtHbasOpen --> virthbas_open

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index aaf5319..e03de4c 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -120,7 +120,7 @@ static ssize_t enable_ints_write(struct file *file,
 /*****************************************************/
 
 static int rsltq_wait_usecs = 4000;	/* Default 4ms */
-static unsigned int MaxBuffLen;
+static unsigned int max_buff_len;
 
 /* Module options */
 static char *virthba_options = "NONE";
@@ -246,7 +246,7 @@ static const struct file_operations debugfs_enable_ints_fops = {
 
 #define VIRTHBASOPENMAX 1
 /* array of open devices maintained by open() and close(); */
-static struct virthba_devices_open VirtHbasOpen[VIRTHBASOPENMAX];
+static struct virthba_devices_open virthbas_open[VIRTHBASOPENMAX];
 static struct dentry *virthba_debugfs_dir;
 
 /*****************************************************/
@@ -545,8 +545,8 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	virthbainfo = (struct virthba_info *)scsihost->hostdata;
 	memset(virthbainfo, 0, sizeof(struct virthba_info));
 	for (i = 0; i < VIRTHBASOPENMAX; i++) {
-		if (VirtHbasOpen[i].virthbainfo == NULL) {
-			VirtHbasOpen[i].virthbainfo = virthbainfo;
+		if (virthbas_open[i].virthbainfo == NULL) {
+			virthbas_open[i].virthbainfo = virthbainfo;
 			break;
 		}
 	}
@@ -954,8 +954,8 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 	cmdrsp->scsi.bufflen = scsi_bufflen(scsicmd);
 
 	/* keep track of the max buffer length so far. */
-	if (cmdrsp->scsi.bufflen > MaxBuffLen)
-		MaxBuffLen = cmdrsp->scsi.bufflen;
+	if (cmdrsp->scsi.bufflen > max_buff_len)
+		max_buff_len = cmdrsp->scsi.bufflen;
 
 	if (scsi_sg_count(scsicmd) > MAX_PHYS_INFO) {
 		pr_err("scsicmd use_sg:%d greater than MAX:%d\n",
@@ -1375,13 +1375,14 @@ static ssize_t info_debugfs_read(struct file *file,
 		return -ENOMEM;
 
 	for (i = 0; i < VIRTHBASOPENMAX; i++) {
-		if (VirtHbasOpen[i].virthbainfo == NULL)
+		if (virthbas_open[i].virthbainfo == NULL)
 			continue;
 
-		virthbainfo = VirtHbasOpen[i].virthbainfo;
+		virthbainfo = virthbas_open[i].virthbainfo;
 
 		str_pos += scnprintf(vbuf + str_pos,
-				len - str_pos, "MaxBuffLen:%u\n", MaxBuffLen);
+				len - str_pos, "max_buff_len:%u\n",
+				max_buff_len);
 
 		str_pos += scnprintf(vbuf + str_pos, len - str_pos,
 				"\nvirthba result queue poll wait:%d usecs.\n",
@@ -1440,8 +1441,8 @@ static ssize_t enable_ints_write(struct file *file, const char __user *buffer,
 
 	/* set all counts to new_value usually 0 */
 	for (i = 0; i < VIRTHBASOPENMAX; i++) {
-		if (VirtHbasOpen[i].virthbainfo != NULL) {
-			virthbainfo = VirtHbasOpen[i].virthbainfo;
+		if (virthbas_open[i].virthbainfo != NULL) {
+			virthbainfo = virthbas_open[i].virthbainfo;
 			Features_addr =
 				&virthbainfo->chinfo.queueinfo->chan->features;
 			if (new_value == 1) {
@@ -1665,7 +1666,7 @@ virthba_mod_init(void)
 
 		/* clear out array */
 		for (i = 0; i < VIRTHBASOPENMAX; i++)
-			VirtHbasOpen[i].virthbainfo = NULL;
+			virthbas_open[i].virthbainfo = NULL;
 		/* Initialize the serverdown workqueue */
 		virthba_serverdown_workqueue =
 		    create_singlethread_workqueue("virthba_serverdown");
-- 
2.1.0

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

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

* [PATCH 68/69] staging: unisys: virthba: Fix CamelCase for a couple function names
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (66 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 67/69] staging: unisys: virthba: Fix remaining CamelCase " Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  2014-12-05 22:09 ` [PATCH 69/69] staging: unisys: virthba: Fix CamelCase for local variables Benjamin Romer
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes CamelCase function names in virthba.c, reported by the
checkpatch script:
  doDiskAddRemove --> do_disk_add_remove
  SendDiskAddRemove --> send_disk_add_remove

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index e03de4c..06a19fb 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -107,7 +107,7 @@ static void virthba_slave_destroy(struct scsi_device *scsidev);
 static int process_incoming_rsps(void *);
 static int virthba_serverup(struct virtpci_dev *virtpcidev);
 static int virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state);
-static void doDiskAddRemove(struct work_struct *work);
+static void do_disk_add_remove(struct work_struct *work);
 static void virthba_serverdown_complete(struct work_struct *work);
 static ssize_t info_debugfs_read(struct file *file, char __user *buf,
 				 size_t len, loff_t *offset);
@@ -343,7 +343,7 @@ static unsigned short dar_work_queue_sched;
 }
 
 static inline void
-SendDiskAddRemove(struct diskaddremove *dar)
+send_disk_add_remove(struct diskaddremove *dar)
 {
 	struct scsi_device *sdev;
 	int error;
@@ -370,7 +370,7 @@ SendDiskAddRemove(struct diskaddremove *dar)
 /* dar_work_queue Handler Thread                     */
 /*****************************************************/
 static void
-doDiskAddRemove(struct work_struct *work)
+do_disk_add_remove(struct work_struct *work)
 {
 	struct diskaddremove *dar;
 	struct diskaddremove *tmphead;
@@ -385,7 +385,7 @@ doDiskAddRemove(struct work_struct *work)
 	while (tmphead) {
 		dar = tmphead;
 		tmphead = dar->next;
-		SendDiskAddRemove(dar);
+		send_disk_add_remove(dar);
 		i++;
 	}
 }
@@ -1661,7 +1661,7 @@ virthba_mod_init(void)
 				    virthba_debugfs_dir, NULL,
 				    &debugfs_enable_ints_fops);
 		/* Initialize dar_work_queue */
-		INIT_WORK(&dar_work_queue, doDiskAddRemove);
+		INIT_WORK(&dar_work_queue, do_disk_add_remove);
 		spin_lock_init(&dar_work_queue_lock);
 
 		/* clear out array */
-- 
2.1.0

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

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

* [PATCH 69/69] staging: unisys: virthba: Fix CamelCase for local variables
  2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
                   ` (67 preceding siblings ...)
  2014-12-05 22:09 ` [PATCH 68/69] staging: unisys: virthba: Fix CamelCase for a couple function names Benjamin Romer
@ 2014-12-05 22:09 ` Benjamin Romer
  68 siblings, 0 replies; 83+ messages in thread
From: Benjamin Romer @ 2014-12-05 22:09 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, sparmaintainer, Benjamin Romer

From: Ken Depro <kenneth.depro@unisys.com>

This patch fixes the CamelCase local variables in virthba.c, reported by the
checkpatch script:
  pChannelHeader --> pchhdr
  Features_addr --> features_addr

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

diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 06a19fb..44c92be 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -421,7 +421,7 @@ static irqreturn_t
 virthba_ISR(int irq, void *dev_id)
 {
 	struct virthba_info *virthbainfo = (struct virthba_info *)dev_id;
-	struct channel_header __iomem *pChannelHeader;
+	struct channel_header __iomem *pchhdr;
 	struct signal_queue_header __iomem *pqhdr;
 	u64 mask;
 	unsigned long long rc1;
@@ -429,23 +429,23 @@ virthba_ISR(int irq, void *dev_id)
 	if (virthbainfo == NULL)
 		return IRQ_NONE;
 	virthbainfo->interrupts_rcvd++;
-	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
-	if (((readq(&pChannelHeader->features)
+	pchhdr = virthbainfo->chinfo.queueinfo->chan;
+	if (((readq(&pchhdr->features)
 	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0) &&
-	     ((readq(&pChannelHeader->features) &
+	     ((readq(&pchhdr->features) &
 		 ULTRA_IO_DRIVER_DISABLES_INTS) !=
 		0)) {
 		virthbainfo->interrupts_disabled++;
 		mask = ~ULTRA_CHANNEL_ENABLE_INTS;
 		rc1 = uisqueue_interlocked_and(virthbainfo->flags_addr, mask);
 	}
-	if (spar_signalqueue_empty(pChannelHeader, IOCHAN_FROM_IOPART)) {
+	if (spar_signalqueue_empty(pchhdr, IOCHAN_FROM_IOPART)) {
 		virthbainfo->interrupts_notme++;
 		return IRQ_NONE;
 	}
 	pqhdr = (struct signal_queue_header __iomem *)
-		((char __iomem *)pChannelHeader +
-		 readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
+		((char __iomem *)pchhdr +
+		 readq(&pchhdr->ch_space_offset)) + IOCHAN_FROM_IOPART;
 	writeq(readq(&pqhdr->num_irq_received) + 1,
 	       &pqhdr->num_irq_received);
 	atomic_set(&virthbainfo->interrupt_rcvd, 1);
@@ -462,7 +462,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	int rsp;
 	int i;
 	irq_handler_t handler = virthba_ISR;
-	struct channel_header __iomem *pChannelHeader;
+	struct channel_header __iomem *pchhdr;
 	struct signal_queue_header __iomem *pqhdr;
 	u64 mask;
 
@@ -583,10 +583,10 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		 virthbainfo->chinfo.queueinfo,
 		 &virthbainfo->chinfo.threadinfo);
 
-	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
+	pchhdr = virthbainfo->chinfo.queueinfo->chan;
 	pqhdr = (struct signal_queue_header __iomem *)
-		((char __iomem *)pChannelHeader +
-		 readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
+		((char __iomem *)pchhdr +
+		 readq(&pchhdr->ch_space_offset)) + IOCHAN_FROM_IOPART;
 	virthbainfo->flags_addr = &pqhdr->features;
 
 	if (!uisthread_start(&virthbainfo->chinfo.threadinfo,
@@ -619,15 +619,15 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		virthbainfo->interrupt_vector = -1;
 		POSTCODE_LINUX_2(VHBA_PROBE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 	} else {
-		u64 __iomem *Features_addr =
+		u64 __iomem *features_addr =
 		    &virthbainfo->chinfo.queueinfo->chan->features;
 		pr_err("request_irq(%d) uislib_virthba_ISR request succeeded\n",
 		       virthbainfo->interrupt_vector);
 		mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
 			 ULTRA_IO_DRIVER_DISABLES_INTS);
-		uisqueue_interlocked_and(Features_addr, mask);
+		uisqueue_interlocked_and(features_addr, mask);
 		mask = ULTRA_IO_DRIVER_ENABLES_INTS;
-		uisqueue_interlocked_or(Features_addr, mask);
+		uisqueue_interlocked_or(features_addr, mask);
 		rsltq_wait_usecs = 4000000;
 	}
 
@@ -1418,7 +1418,7 @@ static ssize_t enable_ints_write(struct file *file, const char __user *buffer,
 	int i, new_value;
 	struct virthba_info *virthbainfo;
 
-	u64 __iomem *Features_addr;
+	u64 __iomem *features_addr;
 	u64 mask;
 
 	if (count >= ARRAY_SIZE(buf))
@@ -1443,21 +1443,21 @@ static ssize_t enable_ints_write(struct file *file, const char __user *buffer,
 	for (i = 0; i < VIRTHBASOPENMAX; i++) {
 		if (virthbas_open[i].virthbainfo != NULL) {
 			virthbainfo = virthbas_open[i].virthbainfo;
-			Features_addr =
+			features_addr =
 				&virthbainfo->chinfo.queueinfo->chan->features;
 			if (new_value == 1) {
 				mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
 					 ULTRA_IO_DRIVER_DISABLES_INTS);
-				uisqueue_interlocked_and(Features_addr, mask);
+				uisqueue_interlocked_and(features_addr, mask);
 				mask = ULTRA_IO_DRIVER_ENABLES_INTS;
-				uisqueue_interlocked_or(Features_addr, mask);
+				uisqueue_interlocked_or(features_addr, mask);
 				rsltq_wait_usecs = 4000000;
 			} else {
 				mask = ~(ULTRA_IO_DRIVER_ENABLES_INTS |
 					 ULTRA_IO_DRIVER_DISABLES_INTS);
-				uisqueue_interlocked_and(Features_addr, mask);
+				uisqueue_interlocked_and(features_addr, mask);
 				mask = ULTRA_IO_CHANNEL_IS_POLLING;
-				uisqueue_interlocked_or(Features_addr, mask);
+				uisqueue_interlocked_or(features_addr, mask);
 				rsltq_wait_usecs = 4000;
 			}
 		}
-- 
2.1.0

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

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

* Re: [PATCH 29/69] staging: unisys: rename Initialize_incoming_thread()
  2014-12-05 22:09 ` [PATCH 29/69] staging: unisys: rename Initialize_incoming_thread() Benjamin Romer
@ 2014-12-05 23:09   ` devendra.aaru
  0 siblings, 0 replies; 83+ messages in thread
From: devendra.aaru @ 2014-12-05 23:09 UTC (permalink / raw)
  To: Benjamin Romer; +Cc: Greg Kroah-Hartman, sparmaintainer, driverdev-devel

>  static BOOL
> -Initialize_incoming_thread(void)
> +initialize_incoming_thread(void)
>  {
>         if (incoming_started)
>                 return TRUE;
>         if (!uisthread_start(&incoming_ti,
>                              &process_incoming, NULL, "dev_incoming")) {
> -               LOGERR("uisthread_start Initialize_incoming_thread ****FAILED");
> +               LOGERR("uisthread_start initialize_incoming_thread ****FAILED");

Not related to the patch, but improving the error message with a
return code saying

 +               LOGERR("failed to start the thread, reason = %d\n",
                                     ret);

You might consider using dev_ routines for logging than the driver wrappers.

>                 return FALSE;
>         }
>         incoming_started = TRUE;
> @@ -1373,7 +1373,7 @@ uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no,
>                 return;
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 09/69] staging: unisys: refactor create_bus()
  2014-12-05 22:08 ` [PATCH 09/69] staging: unisys: refactor create_bus() Benjamin Romer
@ 2014-12-05 23:14   ` devendra.aaru
  2014-12-06 14:18     ` Ben Romer
  0 siblings, 1 reply; 83+ messages in thread
From: devendra.aaru @ 2014-12-05 23:14 UTC (permalink / raw)
  To: Benjamin Romer; +Cc: Greg Kroah-Hartman, sparmaintainer, driverdev-devel

On Fri, Dec 5, 2014 at 5:08 PM, Benjamin Romer
<benjamin.romer@unisys.com> wrote:
> Fix the missing braces and logical continuation problems in create_bus().
>
> Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
> ---
>  drivers/staging/unisys/uislib/uislib.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
> index f25dd2f..1ddbe78 100644
> --- a/drivers/staging/unisys/uislib/uislib.c
> +++ b/drivers/staging/unisys/uislib/uislib.c
> @@ -192,8 +192,10 @@ create_bus(struct controlvm_message *msg, char *buf)
>                 bus->guest_handle = 0;
>                 bus->bus_no = busNo;
>                 bus->local_vnic = 1;
> -       } else
> -               bus->bus_no = bus->guest_handle = busNo;
> +       } else {
> +               bus->bus_no = busNo;
> +               bus->guest_handle = busNo;

You might consider not using camel case letters..

> +       }
>         sprintf(bus->name, "%d", (int)bus->bus_no);
>         bus->device_count = deviceCount;
>         bus->device =
> @@ -220,8 +222,8 @@ create_bus(struct controlvm_message *msg, char *buf)
>                 kfree(bus);
>                 return CONTROLVM_RESP_ERROR_ALREADY_DONE;
>         }
> -       if ((msg->cmd.create_bus.channel_addr != 0)
> -           && (msg->cmd.create_bus.channel_bytes != 0)) {
> +       if ((msg->cmd.create_bus.channel_addr != 0) &&
> +           (msg->cmd.create_bus.channel_bytes != 0)) {

This check can be written as

   +       if (msg->cmd.create_bus.channel_addr &&
   +           msg->cmd.create_bus.channel_bytes) {


>                 bus->bus_channel_bytes = msg->cmd.create_bus.channel_bytes;
>                 bus->bus_channel =
>                     init_vbus_channel(msg->cmd.create_bus.channel_addr,
> @@ -256,9 +258,9 @@ create_bus(struct controlvm_message *msg, char *buf)
>
>         /* add bus at the head of our list */
>         write_lock(&BusListLock);
> -       if (!BusListHead)
> +       if (!BusListHead) {

please try not to use camel case letters...

>                 BusListHead = bus;
> -       else {
> +       } else {
>                 bus->next = BusListHead;
>                 BusListHead = bus;
>         }
> --
> 2.1.0
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 09/69] staging: unisys: refactor create_bus()
  2014-12-05 23:14   ` devendra.aaru
@ 2014-12-06 14:18     ` Ben Romer
  2014-12-06 19:28       ` devendra.aaru
  0 siblings, 1 reply; 83+ messages in thread
From: Ben Romer @ 2014-12-06 14:18 UTC (permalink / raw)
  To: devendra.aaru, Benjamin.Romer; +Cc: gregkh, SParMaintainer, driverdev-devel

devendra.aaru <devendra.aaru@gmail.com> wrote:

> You might consider not using camel case letters..

The purpose of patch 8 is to fix spacing errors across the entire file. The
camelcase names are fixed in later patches.

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

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

* Re: [PATCH 41/69] staging: unisys: refactor visorchipset_file_init()
  2014-12-05 22:09 ` [PATCH 41/69] staging: unisys: refactor visorchipset_file_init() Benjamin Romer
@ 2014-12-06 15:14   ` Dan Carpenter
  0 siblings, 0 replies; 83+ messages in thread
From: Dan Carpenter @ 2014-12-06 15:14 UTC (permalink / raw)
  To: Benjamin Romer; +Cc: gregkh, driverdev-devel, sparmaintainer

First of all, these patches are *so* much better.  Thank you very much!

On Fri, Dec 05, 2014 at 05:09:16PM -0500, Benjamin Romer wrote:
> Fix the declaration so it is a single line. Fix CamelCase parameter
> names:
> 
> MajorDev => major_dev

In the original code there were two variables.
MajorDev (global) and majorDev (local), this patch changes majorDev and
not MajorDev as the changelog says.

Don't resend, this is not worth worrying about, it just amused me.

> pControlVm_channel => controlvm_channel
> 
> Remove the unnecessary gotos and just return directly in error cases.
> Fix the last error condition so it returns the result of cdev_add()
> instead of always zero.

Actually it doesn't, it returns -1 if cdev_add() fails... But the
thought was good.  Anyway, you can patch this stuff up in later patches.
Maybe you already do.  :)

Good job people, these are looking nice.  I like the _cmp() == 0 changes
and removing gotos and the other cleanups.  All these are looking good.

regards,
dan carpenter

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

* Re: [PATCH 09/69] staging: unisys: refactor create_bus()
  2014-12-06 14:18     ` Ben Romer
@ 2014-12-06 19:28       ` devendra.aaru
  0 siblings, 0 replies; 83+ messages in thread
From: devendra.aaru @ 2014-12-06 19:28 UTC (permalink / raw)
  To: Ben Romer; +Cc: SParMaintainer, Greg Kroah-Hartman, driverdev-devel

On Sat, Dec 6, 2014 at 9:18 AM, Ben Romer <benjamin.romer@unisys.com> wrote:
> devendra.aaru <devendra.aaru@gmail.com> wrote:
>
>> You might consider not using camel case letters..
>
> The purpose of patch 8 is to fix spacing errors across the entire file. The
> camelcase names are fixed in later patches.
>

You are correct.
> -- Ben

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

* Re: [PATCH 51/69] staging: unisys: remove ERRDRV and related macros
  2014-12-05 22:09 ` [PATCH 51/69] staging: unisys: remove ERRDRV and related macros Benjamin Romer
@ 2015-01-10  1:36   ` Greg KH
  0 siblings, 0 replies; 83+ messages in thread
From: Greg KH @ 2015-01-10  1:36 UTC (permalink / raw)
  To: Benjamin Romer; +Cc: driverdev-devel, sparmaintainer

On Fri, Dec 05, 2014 at 05:09:26PM -0500, Benjamin Romer wrote:
> Remove the ERRDRV() macro family and use pr_err directly everywhere it was used.
> Completely remove any error messages that used the macro but are redundant, for
> example, several of the messages were from memory allocation failures.

That's a lot of different things to be doing all in one patch.

I'm happy to see you get rid of some of your macros, but you can't just
replace them with pr_err, lots of these should be dev_err() instead.

Try doing just one thing at a time here please.

I've taken the patches up to this one.

Also:

> -		LOGERR("CONTROLVM_BUS_CREATE Failed: max buses:%d already created\n",
> +		pr_err("CONTROLVM_BUS_CREATE Failed: max buses:%d already created\n",

What is with all of the "CONTROLVM_BUS_CREATE" type strings in messages?
That's not really needed, right?

thanks,

greg k-h

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

* Re: [PATCH 52/69] staging: unisys: remove DBGINF() macros
  2014-12-05 22:09 ` [PATCH 52/69] staging: unisys: remove DBGINF() macros Benjamin Romer
@ 2015-01-10  1:37   ` Greg KH
  0 siblings, 0 replies; 83+ messages in thread
From: Greg KH @ 2015-01-10  1:37 UTC (permalink / raw)
  To: Benjamin Romer; +Cc: driverdev-devel, sparmaintainer

On Fri, Dec 05, 2014 at 05:09:27PM -0500, Benjamin Romer wrote:
> Remove the DBGINF() group of logging macros and use pr_debug() instead. Fix
> places that used the DBGINF() macro so they actually print the expected value,
> because they were not being compiled at all before the switchover.
> 
> Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
> ---
>  drivers/staging/unisys/include/timskmod.h  |  2 --
>  drivers/staging/unisys/include/uniklog.h   | 39 --------------------
>  drivers/staging/unisys/uislib/uislib.c     |  8 ++---
>  drivers/staging/unisys/uislib/uisutils.c   |  2 +-
>  drivers/staging/unisys/virthba/virthba.c   | 57 +++++++++++++++---------------
>  drivers/staging/unisys/virtpci/virtpci.c   | 41 ++++++++++-----------
>  drivers/staging/unisys/visorchipset/file.c | 18 +++++-----
>  7 files changed, 64 insertions(+), 103 deletions(-)
> 
> diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h
> index 7831dbc..3d563c4 100644
> --- a/drivers/staging/unisys/include/timskmod.h
> +++ b/drivers/staging/unisys/include/timskmod.h
> @@ -91,14 +91,12 @@
>  #define WARNDRV(fmt, args...)   LOGWRN(fmt, ## args)
>  #define SECUREDRV(fmt, args...) LOGWRN(fmt, ## args)
>  #define INFODRV(fmt, args...)   LOGINF(fmt, ## args)
> -#define DEBUGDRV(fmt, args...)  DBGINF(fmt, ## args)
>  
>  #define PRINTKDEV(devname, fmt, args...)  LOGINFDEV(devname, fmt, ## args)
>  #define WARNDEV(devname, fmt, args...)    LOGWRNDEV(devname, fmt, ## args)
>  #define SECUREDEV(devname, fmt, args...)  LOGWRNDEV(devname, fmt, ## args)
>  #define INFODEV(devname, fmt, args...)    LOGINFDEV(devname, fmt, ## args)
>  #define INFODEVX(devno, fmt, args...)     LOGINFDEVX(devno, fmt, ## args)
> -#define DEBUGDEV(devname, fmt, args...)   DBGINFDEV(devname, fmt, ## args)
>  
>  /** Verifies the consistency of your PRIVATEDEVICEDATA structure using
>   *  conventional "signature" fields:
> diff --git a/drivers/staging/unisys/include/uniklog.h b/drivers/staging/unisys/include/uniklog.h
> index e94120b..edc12f0 100644
> --- a/drivers/staging/unisys/include/uniklog.h
> +++ b/drivers/staging/unisys/include/uniklog.h
> @@ -26,45 +26,6 @@
>  #include <linux/printk.h>
>  
>  /*
> - * # DBGINF
> - *
> - * \brief Log debug informational message - log a LOG_INFO message only
> - *        if DEBUG compiletime option enabled
> - *
> - * \param devname the device name of the device reporting this message, or
> - *                NULL if this message is NOT device-related.
> - * \param fmt printf()-style format string containing the message to log.
> - * \param args Optional arguments to be formatted and inserted into the
> - *             format string.
> - * \return nothing
> - *
> - * Log a message at the LOG_INFO level, but only if DEBUG is enabled.  If
> - * DEBUG is disabled, this expands to a no-op.
> - */
> -
> -/*
> - * # DBGVER
> - *
> - * \brief Log debug verbose message - log a LOG_DEBUG message only if
> - *        DEBUG compiletime option enabled
> - *
> - * \param devname the device name of the device reporting this message, or
> - *                NULL if this message is NOT device-related.
> - * \param fmt printf()-style format string containing the message to log.
> - * \param args Optional arguments to be formatted and inserted into the
> - *             format string.
> - * \return nothing
> - *
> - * Log a message at the LOG_DEBUG level, but only if DEBUG is enabled.  If
> - * DEBUG is disabled, this expands to a no-op.  Note also that LOG_DEBUG
> - * messages can be enabled/disabled at runtime as well.
> - */
> -#define DBGINFDEV(devname, fmt, args...)        do { } while (0)
> -#define DBGVERDEV(devname, fmt, args...)        do { } while (0)
> -#define DBGINF(fmt, args...)                    do { } while (0)
> -#define DBGVER(fmt, args...)                    do { } while (0)
> -
> -/*
>   * # LOGINF
>   *
>   * \brief Log informational message - logs a message at the LOG_INFO level
> diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
> index eb58449..d986fde 100644
> --- a/drivers/staging/unisys/uislib/uislib.c
> +++ b/drivers/staging/unisys/uislib/uislib.c
> @@ -1161,7 +1161,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
>  
>  /* *start = buf; */
>  	if (debug_buf == NULL) {
> -		DBGINF("debug_buf == NULL; allocating buffer.\n.");
> +		pr_debug("debug_buf == NULL; allocating buffer.\n.");
>  		debug_buf = vmalloc(PROC_READ_BUFFER_SIZE);
>  
>  		if (debug_buf == NULL) {
> @@ -1173,7 +1173,7 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
>  	temp = debug_buf;
>  
>  	if ((*offset == 0) || (!debug_buf_valid)) {
> -		DBGINF("calling info_debugfs_read_helper.\n");
> +		pr_debug("calling info_debugfs_read_helper.\n");
>  		/* if the read fails, then -1 will be returned */
>  		total_bytes = info_debugfs_read_helper(&temp, &remaining_bytes);
>  		debug_buf_valid = 1;
> @@ -1333,7 +1333,7 @@ static int process_incoming(void *v)
>  			idle_cycles = idle_cycles + delta_cycles;
>  		}
>  	}
> -	DBGINF("exiting.\n");
> +	pr_debug("exiting.\n");

"trace" messages like this should just be deleted everywhere as the
kernel has built-in tracing functionality, use it instead.

thanks,

greg k-h

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

* Re: [PATCH 53/69] staging: unisys: get rid of LOGINFO() macros
  2014-12-05 22:09 ` [PATCH 53/69] staging: unisys: get rid of LOGINFO() macros Benjamin Romer
@ 2015-01-10  1:38   ` Greg KH
  0 siblings, 0 replies; 83+ messages in thread
From: Greg KH @ 2015-01-10  1:38 UTC (permalink / raw)
  To: Benjamin Romer; +Cc: driverdev-devel, sparmaintainer

On Fri, Dec 05, 2014 at 05:09:28PM -0500, Benjamin Romer wrote:
> Remove the entire set of LOGINFO() macros and replace them with calls to
> pr_info() instead.
> 
> Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
> ---
>  drivers/staging/unisys/include/timskmod.h          |  5 --
>  drivers/staging/unisys/include/uniklog.h           | 29 --------
>  drivers/staging/unisys/uislib/uislib.c             | 40 +++++-----
>  drivers/staging/unisys/uislib/uisthread.c          |  6 +-
>  drivers/staging/unisys/uislib/uisutils.c           |  6 +-
>  drivers/staging/unisys/virthba/virthba.c           | 54 +++++++-------
>  drivers/staging/unisys/virtpci/virtpci.c           | 72 +++++++++---------
>  .../unisys/visorchannel/visorchannel_main.c        |  4 +-
>  drivers/staging/unisys/visorchipset/file.c         |  6 +-
>  .../unisys/visorchipset/visorchipset_main.c        | 86 +++++++++++-----------
>  10 files changed, 137 insertions(+), 171 deletions(-)
> 
> diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h
> index 3d563c4..5f33d5c 100644
> --- a/drivers/staging/unisys/include/timskmod.h
> +++ b/drivers/staging/unisys/include/timskmod.h
> @@ -87,16 +87,11 @@
>  		(void *)(p2) = SWAPPOINTERS_TEMP;	\
>  	} while (0)
>  
> -#define PRINTKDRV(fmt, args...) LOGINF(fmt, ## args)
>  #define WARNDRV(fmt, args...)   LOGWRN(fmt, ## args)
>  #define SECUREDRV(fmt, args...) LOGWRN(fmt, ## args)
> -#define INFODRV(fmt, args...)   LOGINF(fmt, ## args)
>  
> -#define PRINTKDEV(devname, fmt, args...)  LOGINFDEV(devname, fmt, ## args)
>  #define WARNDEV(devname, fmt, args...)    LOGWRNDEV(devname, fmt, ## args)
>  #define SECUREDEV(devname, fmt, args...)  LOGWRNDEV(devname, fmt, ## args)
> -#define INFODEV(devname, fmt, args...)    LOGINFDEV(devname, fmt, ## args)
> -#define INFODEVX(devno, fmt, args...)     LOGINFDEVX(devno, fmt, ## args)
>  
>  /** Verifies the consistency of your PRIVATEDEVICEDATA structure using
>   *  conventional "signature" fields:
> diff --git a/drivers/staging/unisys/include/uniklog.h b/drivers/staging/unisys/include/uniklog.h
> index edc12f0..74a723e 100644
> --- a/drivers/staging/unisys/include/uniklog.h
> +++ b/drivers/staging/unisys/include/uniklog.h
> @@ -26,35 +26,6 @@
>  #include <linux/printk.h>
>  
>  /*
> - * # LOGINF
> - *
> - * \brief Log informational message - logs a message at the LOG_INFO level
> - *
> - * \param devname the device name of the device reporting this message, or
> - *                NULL if this message is NOT device-related.
> - * \param fmt printf()-style format string containing the message to log.
> - * \param args Optional arguments to be formatted and inserted into the
> - *             format string.
> - * \return nothing
> - *
> - * Logs the specified message at the LOG_INFO level.
> - */
> -
> -#define LOGINF(fmt, args...) pr_info(fmt, ## args)
> -#define LOGINFDEV(devname, fmt, args...) \
> -	pr_info("%s " fmt, devname, ## args)
> -#define LOGINFDEVX(devno, fmt, args...) \
> -	pr_info("dev%d " fmt, devno, ## args)
> -#define LOGINFNAME(vnic, fmt, args...)				\
> -	do {								\
> -		if (vnic != NULL) {					\
> -			pr_info("%s " fmt, vnic->name, ## args);	\
> -		} else {						\
> -			pr_info(fmt, ## args);				\
> -		}							\
> -	} while (0)
> -
> -/*
>   * # LOGVER
>   *
>   * \brief Log verbose message - logs a message at the LOG_DEBUG level,
> diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
> index d986fde..b6a7fb0 100644
> --- a/drivers/staging/unisys/uislib/uislib.c
> +++ b/drivers/staging/unisys/uislib/uislib.c
> @@ -671,7 +671,7 @@ static int destroy_device(struct controlvm_message *msg, char *buf)
>  	dev_no = msg->cmd.destroy_device.bus_no;
>  
>  	read_lock(&bus_list_lock);
> -	LOGINF("destroy_device called for bus_no=%u, dev_no=%u", bus_no,
> +	pr_info("destroy_device called for bus_no=%u, dev_no=%u", bus_no,
>  	       dev_no);
>  	for (bus = bus_list; bus; bus = bus->next) {
>  		if (bus->bus_no == bus_no) {
> @@ -733,12 +733,12 @@ static int destroy_device(struct controlvm_message *msg, char *buf)
>   * kernel paging request"
>   */
>  		if (dev->polling) {
> -			LOGINF("calling uislib_disable_channel_interrupts");
> +			pr_info("calling uislib_disable_channel_interrupts");
>  			uislib_disable_channel_interrupts(bus_no, dev_no);
>  		}
>  		/* unmap the channel memory for the device. */
>  		if (!msg->hdr.flags.test_message) {
> -			LOGINF("destroy_device, doing iounmap");
> +			pr_info("destroy_device, doing iounmap");
>  			uislib_iounmap(dev->chanptr);
>  		}
>  		kfree(dev);
> @@ -806,7 +806,7 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
>  {
>  	struct controlvm_message msg;
>  
> -	LOGINF("enter busNo=0x%x\n", bus_no);
> +	pr_info("enter busNo=0x%x\n", bus_no);

I never want to see a working subsystem or driver make any messages in
the kernel log, unless it's actually something that a user needs to
know.

>  	/* step 0: init the chipset */
>  	POSTCODE_LINUX_3(CHIPSET_INIT_ENTRY_PC, bus_no, POSTCODE_SEVERITY_INFO);
>  
> @@ -826,7 +826,7 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
>  			pr_err("init_chipset failed.\n");
>  			return 0;
>  		}
> -		LOGINF("chipset initialized\n");
> +		pr_info("chipset initialized\n");

That's not anything anyone cares about, rigth?

Please remove almost all of these, they look like debugging messages, so
if you really want them around, make them debug messages that can be
turned on dynamically if needed.

thanks,

greg k-h

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

* Re: [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h
  2014-12-05 22:09 ` [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h Benjamin Romer
@ 2015-01-10  1:40   ` Greg KH
  2015-01-21 14:41     ` Romer, Benjamin M
  0 siblings, 1 reply; 83+ messages in thread
From: Greg KH @ 2015-01-10  1:40 UTC (permalink / raw)
  To: Benjamin Romer; +Cc: driverdev-devel, sparmaintainer

On Fri, Dec 05, 2014 at 05:09:30PM -0500, Benjamin Romer wrote:
> Get rid of LOGWRN() and all related macros, and call pr_warn() directly instead.

Side note, are you setting pr_fmt() properly so that everything is
"unified" with these messages?  No driver subsystem should ever use a
pr_* call unless it is at startup / shutdown where there is no hardware
involved.  I think that's not the case here so use the correct dev_*
versions instead.

thanks,

greg k-h

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

* Re: [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h
  2015-01-10  1:40   ` Greg KH
@ 2015-01-21 14:41     ` Romer, Benjamin M
  2015-01-21 15:53       ` Dan Carpenter
  0 siblings, 1 reply; 83+ messages in thread
From: Romer, Benjamin M @ 2015-01-21 14:41 UTC (permalink / raw)
  To: Greg KH; +Cc: driverdev-devel, *S-Par-Maintainer

On Fri, 2015-01-09 at 17:40 -0800, Greg KH wrote:
> On Fri, Dec 05, 2014 at 05:09:30PM -0500, Benjamin Romer wrote:
> > Get rid of LOGWRN() and all related macros, and call pr_warn() directly instead.
> 
> Side note, are you setting pr_fmt() properly so that everything is
> "unified" with these messages?  No driver subsystem should ever use a
> pr_* call unless it is at startup / shutdown where there is no hardware
> involved.  I think that's not the case here so use the correct dev_*
> versions instead.
> 
> thanks,
> 
> greg k-h

Greg,

You're absolutely right that almost all of the messages being output in
our code aren't useful from a user's perspective, so what I'd like to do
is to just remove all of the logging macros in one set of patches, and
then re-introduce a small number of properly-coded error messages in
appropriate spots in a later set of patches.

Would that be okay? If so, is it alright to take out one set of macros
per patch, or is that too much at once?

Thanks!

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

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

* Re: [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h
  2015-01-21 14:41     ` Romer, Benjamin M
@ 2015-01-21 15:53       ` Dan Carpenter
  2015-01-22  3:19         ` Greg KH
  0 siblings, 1 reply; 83+ messages in thread
From: Dan Carpenter @ 2015-01-21 15:53 UTC (permalink / raw)
  To: Romer, Benjamin M; +Cc: Greg KH, *S-Par-Maintainer, driverdev-devel

Generally "delete code" patches are easy to review.  But sometimes you
have to change formatting and remove variables and curly braces.

$ grep LOG drivers/staging/unisys/ -R | wc -l
415

There isn't a firm rule on way a patch is just too big and annoying to
review.  Probably break it up into:

[patch 1/x] delete LOGINF()
[patch 2/x] delete LOGERR()
...

regards,
dan carpenter

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

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

* Re: [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h
  2015-01-21 15:53       ` Dan Carpenter
@ 2015-01-22  3:19         ` Greg KH
  2015-01-22 14:24           ` Romer, Benjamin M
  0 siblings, 1 reply; 83+ messages in thread
From: Greg KH @ 2015-01-22  3:19 UTC (permalink / raw)
  To: Romer, Benjamin M, *S-Par-Maintainer, driverdev-devel; +Cc: Dan Carpenter

On Wed, Jan 21, 2015 at 06:53:31PM +0300, Dan Carpenter wrote:
> Generally "delete code" patches are easy to review.  But sometimes you
> have to change formatting and remove variables and curly braces.
> 
> $ grep LOG drivers/staging/unisys/ -R | wc -l
> 415
> 
> There isn't a firm rule on way a patch is just too big and annoying to
> review.  Probably break it up into:
> 
> [patch 1/x] delete LOGINF()
> [patch 2/x] delete LOGERR()
> ...

Yes, this would be best.

Always remember, what would you like to have to review if you were the
receiver of patches?

thanks,

greg k-h

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

* Re: [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h
  2015-01-22  3:19         ` Greg KH
@ 2015-01-22 14:24           ` Romer, Benjamin M
  0 siblings, 0 replies; 83+ messages in thread
From: Romer, Benjamin M @ 2015-01-22 14:24 UTC (permalink / raw)
  To: Greg KH; +Cc: driverdev-devel, *S-Par-Maintainer, Dan Carpenter

On Thu, 2015-01-22 at 11:19 +0800, Greg KH wrote:
> On Wed, Jan 21, 2015 at 06:53:31PM +0300, Dan Carpenter wrote:
> > Generally "delete code" patches are easy to review.  But sometimes you
> > have to change formatting and remove variables and curly braces.
> > 
> > $ grep LOG drivers/staging/unisys/ -R | wc -l
> > 415
> > 
> > There isn't a firm rule on way a patch is just too big and annoying to
> > review.  Probably break it up into:
> > 
> > [patch 1/x] delete LOGINF()
> > [patch 2/x] delete LOGERR()
> > ...
> 
> Yes, this would be best.
> 
> Always remember, what would you like to have to review if you were the
> receiver of patches?
> 
> thanks,
> 
> greg k-h

Thank you both for the feedback. :) I'll do one patch per macro.

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

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

end of thread, other threads:[~2015-01-22 14:24 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05 22:08 [PATCH 00/69] checkpatch fix series for Unisys drivers Benjamin Romer
2014-12-05 22:08 ` [PATCH 01/69] staging: unisys: fix line spacing in visorchipset_umode.h Benjamin Romer
2014-12-05 22:08 ` [PATCH 02/69] staging: unisys: fix line spacing in globals.h Benjamin Romer
2014-12-05 22:08 ` [PATCH 03/69] staging: unisys: remove testing.h Benjamin Romer
2014-12-05 22:08 ` [PATCH 04/69] staging: unisys: get rid of channel stub Benjamin Romer
2014-12-05 22:08 ` [PATCH 05/69] staging: unisys: remove unused types from visorchipset.h Benjamin Romer
2014-12-05 22:08 ` [PATCH 06/69] staging: unisys: add comment to spinlock in struct charqueue Benjamin Romer
2014-12-05 22:08 ` [PATCH 07/69] staging: unisys: clean up typecasts in uislib.c Benjamin Romer
2014-12-05 22:08 ` [PATCH 08/69] staging: unisys: fix alignment " Benjamin Romer
2014-12-05 22:08 ` [PATCH 09/69] staging: unisys: refactor create_bus() Benjamin Romer
2014-12-05 23:14   ` devendra.aaru
2014-12-06 14:18     ` Ben Romer
2014-12-06 19:28       ` devendra.aaru
2014-12-05 22:08 ` [PATCH 10/69] staging: unisys: fix strict checks in create_device() Benjamin Romer
2014-12-05 22:08 ` [PATCH 11/69] staging: unisys: remove extraneous blank lines in uislib.c Benjamin Romer
2014-12-05 22:08 ` [PATCH 12/69] staging: unisys: add missing brackets in info_debugfs_read() Benjamin Romer
2014-12-05 22:08 ` [PATCH 13/69] staging: unisys: add missing brackets in Process_Incoming() Benjamin Romer
2014-12-05 22:08 ` [PATCH 14/69] staging: unisys: remove extra parens from uislib_enable_channel_interrupts() Benjamin Romer
2014-12-05 22:08 ` [PATCH 15/69] staging: unisys: get rid of doubled assignment in uislib_mod_init() Benjamin Romer
2014-12-05 22:08 ` [PATCH 16/69] staging: unisys: fix CamelCase global variable names in uislib.c Benjamin Romer
2014-12-05 22:08 ` [PATCH 17/69] staging: unisys: refactor init_vbus_channel() Benjamin Romer
2014-12-05 22:08 ` [PATCH 18/69] staging: unisys: fix CamelCase in create_bus() Benjamin Romer
2014-12-05 22:08 ` [PATCH 19/69] staging: unisys: fix CamelCase in destroy_bus() Benjamin Romer
2014-12-05 22:08 ` [PATCH 20/69] staging: unisys: refactor create_device() Benjamin Romer
2014-12-05 22:08 ` [PATCH 21/69] staging: unisys: refactor pause_device() Benjamin Romer
2014-12-05 22:08 ` [PATCH 22/69] staging: unisys: refactor resume_device() Benjamin Romer
2014-12-05 22:08 ` [PATCH 23/69] staging: unisys: refactor destroy_device() Benjamin Romer
2014-12-05 22:08 ` [PATCH 24/69] staging: unisys: refactor delete_bus_glue() Benjamin Romer
2014-12-05 22:09 ` [PATCH 25/69] staging: unisys: refactor delete_device_glue() Benjamin Romer
2014-12-05 22:09 ` [PATCH 26/69] staging: unisys: refactor info_debugfs_read() Benjamin Romer
2014-12-05 22:09 ` [PATCH 27/69] staging: unisys: refactor find_dev() Benjamin Romer
2014-12-05 22:09 ` [PATCH 28/69] staging: unisys: rename Process_Incoming() Benjamin Romer
2014-12-05 22:09 ` [PATCH 29/69] staging: unisys: rename Initialize_incoming_thread() Benjamin Romer
2014-12-05 23:09   ` devendra.aaru
2014-12-05 22:09 ` [PATCH 30/69] staging: unisys: fix CamelCase Work queue name in uislib.c Benjamin Romer
2014-12-05 22:09 ` [PATCH 31/69] staging: unisys: fix spacing in uisqueue.c Benjamin Romer
2014-12-05 22:09 ` [PATCH 32/69] staging: unisys: fix CamelCase names in do_locked_client_insert() Benjamin Romer
2014-12-05 22:09 ` [PATCH 33/69] staging: unisys: fix line spacing in uisthread.c Benjamin Romer
2014-12-05 22:09 ` [PATCH 34/69] staging: unisys: fix line spacing in uisutils.c Benjamin Romer
2014-12-05 22:09 ` [PATCH 35/69] staging: unisys: fix " Benjamin Romer
2014-12-05 22:09 ` [PATCH 36/69] staging: unisys: fix brackets in uisctrl_register_req_handler_ex() Benjamin Romer
2014-12-05 22:09 ` [PATCH 37/69] staging: unisys: refactor uisctrl_register_req_handler_ex() Benjamin Romer
2014-12-05 22:09 ` [PATCH 38/69] staging: unisys: refactor uisctrl_unregister_req_handler_ex() Benjamin Romer
2014-12-05 22:09 ` [PATCH 39/69] staging: unisys: fix CamelCase globals in uisutils.c Benjamin Romer
2014-12-05 22:09 ` [PATCH 40/69] staging: unisys: refactor req_handler_add() Benjamin Romer
2014-12-05 22:09 ` [PATCH 41/69] staging: unisys: refactor visorchipset_file_init() Benjamin Romer
2014-12-06 15:14   ` Dan Carpenter
2014-12-05 22:09 ` [PATCH 42/69] staging: unisys: fix CamelCase global variables in file.c Benjamin Romer
2014-12-05 22:09 ` [PATCH 43/69] staging: unisys: get rid of HAVE_UNLOCKED_IOCTL code Benjamin Romer
2014-12-05 22:09 ` [PATCH 44/69] staging: unisys: get rid of goto in visorchipset_open() Benjamin Romer
2014-12-05 22:09 ` [PATCH 45/69] staging: unisys: fix CamelCase in visorchipset_mmap() Benjamin Romer
2014-12-05 22:09 ` [PATCH 46/69] staging: unisys: get rid of goto in visorchipset_ioctl() Benjamin Romer
2014-12-05 22:09 ` [PATCH 47/69] staging: unisys: visorchannel: Rename CamelCase variable channelBytes Benjamin Romer
2014-12-05 22:09 ` [PATCH 48/69] staging: unisys: visorchannel: Rename CamelCase variable nQueues Benjamin Romer
2014-12-05 22:09 ` [PATCH 49/69] staging: unisys: visorchannel: Describe spinlocks in VISORCHANNEL_Tag struct Benjamin Romer
2014-12-05 22:09 ` [PATCH 50/69] staging: unisys: Remove VISORCHANNEL typedef Benjamin Romer
2014-12-05 22:09 ` [PATCH 51/69] staging: unisys: remove ERRDRV and related macros Benjamin Romer
2015-01-10  1:36   ` Greg KH
2014-12-05 22:09 ` [PATCH 52/69] staging: unisys: remove DBGINF() macros Benjamin Romer
2015-01-10  1:37   ` Greg KH
2014-12-05 22:09 ` [PATCH 53/69] staging: unisys: get rid of LOGINFO() macros Benjamin Romer
2015-01-10  1:38   ` Greg KH
2014-12-05 22:09 ` [PATCH 54/69] staging: unisys: remove LOGVER() macros Benjamin Romer
2014-12-05 22:09 ` [PATCH 55/69] staging: unisys: get rid of LOGWRN() macro and uisklog.h Benjamin Romer
2015-01-10  1:40   ` Greg KH
2015-01-21 14:41     ` Romer, Benjamin M
2015-01-21 15:53       ` Dan Carpenter
2015-01-22  3:19         ` Greg KH
2015-01-22 14:24           ` Romer, Benjamin M
2014-12-05 22:09 ` [PATCH 56/69] staging: unisys: virthba: Remove unneeded spaces after casts Benjamin Romer
2014-12-05 22:09 ` [PATCH 57/69] staging: unisys: virthba: Fix open parenthesis alignment checks Benjamin Romer
2014-12-05 22:09 ` [PATCH 58/69] staging: unisys: virthba: Fix logical continuation checks Benjamin Romer
2014-12-05 22:09 ` [PATCH 59/69] staging: unisys: virthba: Remove blank lines before/after braces Benjamin Romer
2014-12-05 22:09 ` [PATCH 60/69] staging: unisys: virthba: Fix missing braces at end of if-else statements Benjamin Romer
2014-12-05 22:09 ` [PATCH 61/69] staging: unisys: virthba: Change alloc calls to use var name instead of type Benjamin Romer
2014-12-05 22:09 ` [PATCH 62/69] staging: unisys: virthba: Fix a couple checkpatch problems Benjamin Romer
2014-12-05 22:09 ` [PATCH 63/69] staging: unisys: virthba: Fix "else not useful after return" warning Benjamin Romer
2014-12-05 22:09 ` [PATCH 64/69] staging: unisys: virthba: Fix warnings regarding lines over 80 characters Benjamin Romer
2014-12-05 22:09 ` [PATCH 65/69] staging: unisys: virthba: Fix a couple open parenthesis alignment issues Benjamin Romer
2014-12-05 22:09 ` [PATCH 66/69] staging: unisys: virthba: Fix CamelCase for Disk Add/Remove global variables Benjamin Romer
2014-12-05 22:09 ` [PATCH 67/69] staging: unisys: virthba: Fix remaining CamelCase " Benjamin Romer
2014-12-05 22:09 ` [PATCH 68/69] staging: unisys: virthba: Fix CamelCase for a couple function names Benjamin Romer
2014-12-05 22:09 ` [PATCH 69/69] staging: unisys: virthba: Fix CamelCase for local variables Benjamin Romer

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.