Commit graph

18 commits

Author SHA1 Message Date
Benjamin Romer 66e24b7686 staging: unisys: fix visorchipset sysfs attribute functions
This patch cleans up the style, error handling, and string handling in the sysfs
functions recently added to visorchipset:

- Use of sscanf() was changed to type-appropriate kstrto*() functions
- error handling was simplified
- the error return value of visorchannel_write() was corrected
- switch use of driver-specific types to kernel types

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 08:57:38 -07:00
Paul Bolle 5573e4f615 staging: unisys: remove unused macros
The macros CONFIG_SPAR_GUEST, GUESTDRIVERBUILD, and NOAUTOVERSION are
defined in Makefiles for the Unisys SPAR driver. They are never used.
Remove the lines that define these macros.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:13:40 -04:00
Ken Cox 3db5540dfd Staging: unisys: Fix sparse warnings
Fix sparse warnings caused by incorrect references to IO space.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:21:10 +09:00
Masaru Nomura e03e1e39b6 staging: unisys: visorutil: Add a blank line
Add a blank line after declarations to meet kernel coding style.

Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:56:32 -07:00
Ken Cox 37b7e990ff Staging: unisys: visorutil: Add MODULE_LICENSE("GPL")
The visorutil module was lacking license info.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:44:17 -07:00
Ken Cox fcd0157ece Staging: unisys: detect s-Par firmware
This patch adds support for detection of s-Par firmware by checking for
the hypervisor bit in the CPU capabilities, and then querying the hypervisor
ID cpuid leaf.

This functionality will be used by the unisys drivers to determine if
they are being loaded on an s-Par platform and refuse to load if no
s-Par firmware is present.

This fixes a problem reported from upstream where a panic occurs if the
unisys drivers are loaded on a non s-Par system.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Ken Cox <jkc@redhat.com>
Tested by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:44:17 -07:00
Benjamin Romer f6d0c1e62b staging: unisys: fix copyright notices
This patch changes all of the various representations of the copyright symbol
to (C).

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 15:25:40 -07:00
Ken Cox 22ad57ba5e Staging: unisys: Remove RETINT macro
The RETINT macro included a goto statement which is not allowed in the
kernel.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:56:31 -07:00
Ken Cox 5e54c97dab Staging: unisys: Remove FAIL macro
The FAIL macro ultimately includes a goto statement which is not allowed
in the kernel.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:56:31 -07:00
Ken Cox d9355f8934 Staging: unisys: Remove RETPTR macro
The RETPTR macro contained a goto statement which is not allowed in
the kernel.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:56:31 -07:00
Ken Cox 61e03b433d Staging: unisys: Remove RETBOOL macro
The RETBOOL macro contained a goto statement which is not allowed in
the kernel.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:56:31 -07:00
Silvio F a3acc83a4a staging: unisys: kmalloc/memset to kzalloc conversation
This patch solves the Coccinelle warning: "kzalloc should be used
instead of kmalloc/memset"

This patch is a fixup for

	linux-next: 97a84f1203
	"Staging: unisys: Replace kmalloc/memset with kzalloc"

The ALLOC_CMDRSP #define is after transformation to kzalloc only a
rename for kzalloc and was completly removed.

Signed-off-by: Silvio F <silvio.fricke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 16:22:27 -07:00
Ken Cox a771033659 Staging: unisys: visorutil: Clean up sparse warnings in visorutil code
Clean up code to get rid of sparse warnings.

Also fixed variable length arrays declared on the stack by removing
visor_hexDumpToBuffer() and using hex_dump_to_buffer() instead.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-17 14:46:36 -07:00
Andreea-Cristina Bernat 97a84f1203 Staging: unisys: Replace kmalloc/memset with kzalloc
This patch solves the Coccinelle warning: "kzalloc should be used instead of
kmalloc/memset".

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:20:10 -07:00
Iulia Manda 56116b2b09 staging: unisys: visorutil: Use kzalloc instead of kmalloc with memset
Fix coccinelle warnings of better allocation by using kzalloc.
In these cases, kzalloc is preferred, as kmalloc may fail if it does not find
contiguous memory.

Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:49:02 -07:00
Ken Cox 927c7927ee staging: unisys: Give exported symbols unique names
Many exported symbols had very generic names.  This commit changes the names
so that they will be unique.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 12:01:49 -08:00
Ken Cox 0d776fa465 staging: unisys: remove unreferenced utility functions.
A number of functions were used for debug at one time but that code has been
removed.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 12:01:49 -08:00
Ken Cox 9d9baadd40 staging: visorutil driver to provide common functionality to other s-Par drivers
The visorutil module is a support library required by all other s-Par
driver modules. Among its features it abstracts reading, writing, and
manipulating a block of memory.

Signed-off-by: Ken Cox <jkc@redhat.com>
Cc: Ben Romer <sparmaintainer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-04 16:52:12 -08:00