platform/kernel/linux-starfive.git
9 years agostaging: unisys: memregion: Use proper errno for mapit()
Jes Sorensen [Tue, 5 May 2015 22:36:23 +0000 (18:36 -0400)]
staging: unisys: memregion: Use proper errno for mapit()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: memregion: Nothing uses overlap allocations, so nuke it
Jes Sorensen [Tue, 5 May 2015 22:36:22 +0000 (18:36 -0400)]
staging: unisys: memregion: Nothing uses overlap allocations, so nuke it

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorbus: visorchannel_create_guts() always has parent == NULL
Jes Sorensen [Tue, 5 May 2015 22:36:21 +0000 (18:36 -0400)]
staging: unisys: visorbus: visorchannel_create_guts() always has parent == NULL

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel: visorchannel_create_overlap() is never used
Jes Sorensen [Tue, 5 May 2015 22:36:20 +0000 (18:36 -0400)]
staging: unisys: visorchannel: visorchannel_create_overlap() is never used

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix sig_read_data and sig_read_data functions
Prarit Bhargava [Tue, 5 May 2015 22:36:19 +0000 (18:36 -0400)]
staging: unisys: fix sig_read_data and sig_read_data functions

The sig_read_data() and sig_write_data() functions are involved in 2 steps
of calls.  They really don't need to be and this makes for much simpler
code.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel some general function cleanups
Prarit Bhargava [Tue, 5 May 2015 22:36:18 +0000 (18:36 -0400)]
staging: unisys: visorchannel some general function cleanups

Just some cleanups for visorchannel.c, and removal of
safe_sig_queue_validate() which is dead code.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel cleanup visorchannel_create_guts()
Prarit Bhargava [Tue, 5 May 2015 22:36:17 +0000 (18:36 -0400)]
staging: unisys: visorchannel cleanup visorchannel_create_guts()

The error handling in this function was broken and while looking at that
I noticed that the whole function was in need of cleanup.  This patch
fixes the error handling, specifically

                if (!p) {
                        visorchannel_destroy(p);
                        channel = NULL;
                }

and does a lot of cleanup.  I also verified that the called functions
returned correct errors, and that led to a change in
visor_memregion_resize(), visorchannel_destroy() and
visor_memregion_destroy().

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: cleanup visorbus_private.h
Prarit Bhargava [Tue, 5 May 2015 22:36:16 +0000 (18:36 -0400)]
staging: unisys: cleanup visorbus_private.h

visorbus_private.h contains code that is called from visorbus into the
visorchipset code.  Now that the visorchipset code has been brought into
the visorbus directory, many of the declarations are not necessary and
can be cleaned up.

TODO: PARSER_WHICH_STRING enum only has one member used
(PARSERSTRING_NAME).

TODO: crash_obj_type appears to be unnecessary in the overall scheme of
code.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: move visorchipset files to visorbus
Prarit Bhargava [Tue, 5 May 2015 22:36:15 +0000 (18:36 -0400)]
staging: unisys: move visorchipset files to visorbus

Move visorchipset_main.c and visorchipset.h to visorbus/visorchipset.c and
visorbus/visorbus_private.h.  This leaves an empty visorchipset directory
which can also be destroyed.

As a result of this patch the visorchipset init code now calls the
visorbus_init() directly.  Similarily the visorchipset exit code now
cleans up by calling visorbus_exit().

No other functional changes were made.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: move parser.[ch] functionality into visorchipset
Erik Arfvidson [Tue, 5 May 2015 22:36:14 +0000 (18:36 -0400)]
staging: unisys: move parser.[ch] functionality into visorchipset

This patch moves includes files and functions from parser.[ch] into
visorchipset.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove file.c and pass functionality to visorchipset
Erik Arfvidson [Tue, 5 May 2015 22:36:13 +0000 (18:36 -0400)]
staging: unisys: remove file.c and pass functionality to visorchipset

This patch trasitions the include files and functions from file.c
and places them into visorchipset_main.c

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: moving file.h functionality to visorchipset.h
Erik Arfvidson [Tue, 5 May 2015 22:36:12 +0000 (18:36 -0400)]
staging: unisys: moving file.h functionality to visorchipset.h

this patch simply migrates file.h functionality to visorchipset.h

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove visorchipset_umode.h
Erik Arfvidson [Tue, 5 May 2015 22:36:11 +0000 (18:36 -0400)]
staging: unisys: remove visorchipset_umode.h

removes visorchipset_umode.h and pass functionality to
visorchipset.h

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove visorbus_private.h
Prarit Bhargava [Tue, 5 May 2015 22:36:10 +0000 (18:36 -0400)]
staging: unisys: remove visorbus_private.h

visorbus_private.h is only included from visorbus_main.c and has no
other purpose.  The code can be easily moved into visorbus_main.c.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove globals.h
Prarit Bhargava [Tue, 5 May 2015 22:36:09 +0000 (18:36 -0400)]
staging: unisys: remove globals.h

globals.h is only included in visorchannel.c and only contains 2 includes.
These can be included directly in visorchannel.c.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: rename visorchannel_funcs.c to visorchannel.c
Prarit Bhargava [Tue, 5 May 2015 22:36:08 +0000 (18:36 -0400)]
staging: unisys: rename visorchannel_funcs.c to visorchannel.c

visorchannel_funcs.c is a remnant of the separate visorchannel
directory.  It should be called visorchannel now.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: unify devmajorminor attributes into visorbus_main.c
Prarit Bhargava [Tue, 5 May 2015 22:36:07 +0000 (18:36 -0400)]
staging: unisys: unify devmajorminor attributes into visorbus_main.c

The code in devmajorminor_attr.[ch] only creates sysfs files and is
called only in visorbus_main.c.  This code should be unified into
visorbus_main.c.  The only changes are a forward declaration issue with
register_devmajorminor_attributes() and making the functions static.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: unify channel attributes into visorbus_main.c
Prarit Bhargava [Tue, 5 May 2015 22:36:06 +0000 (18:36 -0400)]
staging: unisys: unify channel attributes into visorbus_main.c

The code in channel_attr.[ch] only creates sysfs files and is called
only in visorbus_main.c.  This code should be unified into
visorbus_main.c.   There are some functions that have been made static.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: unify businst attributes into visorbus_main.c
Prarit Bhargava [Tue, 5 May 2015 22:36:05 +0000 (18:36 -0400)]
staging: unisys: unify businst attributes into visorbus_main.c

The code in businst_attr.[ch] only creates sysfs files and is called
only in visorbus_main.c.  This code should be unified into
visorbus_main.c.  There are some functions that have been made static.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove unused driver
Don Zickus [Tue, 5 May 2015 22:36:04 +0000 (18:36 -0400)]
staging: unisys: Remove unused driver

The visorchannel feature is rolled into visorbus now and its headers
are public under visorbus.h.  Remove the unused driver, the old
header file and all the ccflag includes in the Makefile.

Also remove VISORCHANNEL from all Kconfigs as it is not needed.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Move visorbus.h to public namespace
Don Zickus [Tue, 5 May 2015 22:36:03 +0000 (18:36 -0400)]
staging: unisys: Move visorbus.h to public namespace

Turn visorbus.h into a public header that all visor* drivers will
include.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Dissolve visorchannel.h
Don Zickus [Tue, 5 May 2015 22:36:02 +0000 (18:36 -0400)]
staging: unisys: Dissolve visorchannel.h

This header is needed by other drivers and should be in a global namespace.
In addition, functionally it is part of visorbus, so roll the contents
into that header file.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Move visorchannel into visorbus
Don Zickus [Tue, 5 May 2015 22:36:01 +0000 (18:36 -0400)]
staging: unisys: Move visorchannel into visorbus

visorchannel seems to be a necessary component to visorbus and can never
function as a standalone module.  Let's treat it like a visorbus feature
that is always enabled.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: add visorbus driver
Erik Arfvidson [Tue, 5 May 2015 22:36:00 +0000 (18:36 -0400)]
staging: unisys: add visorbus driver

This base driver provides bus functionality to visorhid, visorhba,
and visornic which will be later added to our driver base. Visorbus
supports sPar bus model and manages bus specific functionality. It
maintains the sysfs subtree /sys/devices/visorbus*/.It is
responsible for device creation and destruction of the devices on
its bus.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove write-only variable g_del_dump_msg_hdr
Jes Sorensen [Tue, 5 May 2015 22:35:59 +0000 (18:35 -0400)]
staging: unisys: Remove write-only variable g_del_dump_msg_hdr

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove write-only variable g_diag_msg_hdr
Jes Sorensen [Tue, 5 May 2015 22:35:58 +0000 (18:35 -0400)]
staging: unisys: Remove write-only variable g_diag_msg_hdr

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: No point in checking != 0
Jes Sorensen [Tue, 5 May 2015 22:35:57 +0000 (18:35 -0400)]
staging: unisys: No point in checking != 0

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Avoid some == 0 checks
Jes Sorensen [Tue, 5 May 2015 22:35:56 +0000 (18:35 -0400)]
staging: unisys: Avoid some == 0 checks

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: delbusdevices() doesn't need to be inline
Jes Sorensen [Tue, 5 May 2015 22:35:55 +0000 (18:35 -0400)]
staging: unisys: delbusdevices() doesn't need to be inline

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: finddevice() doesn't need to be inline
Jes Sorensen [Tue, 5 May 2015 22:35:54 +0000 (18:35 -0400)]
staging: unisys: finddevice() doesn't need to be inline

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove unused typedef SPARREPORTEVENT_COMPLETE_FUNC
Jes Sorensen [Tue, 5 May 2015 22:35:53 +0000 (18:35 -0400)]
staging: unisys: Remove unused typedef SPARREPORTEVENT_COMPLETE_FUNC

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: findbus() doesn't need to be inline
Jes Sorensen [Tue, 5 May 2015 22:35:52 +0000 (18:35 -0400)]
staging: unisys: findbus() doesn't need to be inline

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove write-only visorchipset_bus_info.dev_no
Jes Sorensen [Tue, 5 May 2015 22:35:51 +0000 (18:35 -0400)]
staging: unisys: Remove write-only visorchipset_bus_info.dev_no

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: buffer_list_pool isn't used for anything
Jes Sorensen [Tue, 5 May 2015 22:35:50 +0000 (18:35 -0400)]
staging: unisys: buffer_list_pool isn't used for anything

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove a couple of unnecessary blank lines
Jes Sorensen [Tue, 5 May 2015 22:35:49 +0000 (18:35 -0400)]
staging: unisys: Remove a couple of unnecessary blank lines

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Don't include timskmod.h
Jes Sorensen [Tue, 5 May 2015 22:35:48 +0000 (18:35 -0400)]
staging: unisys: Don't include timskmod.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove unused cache object counter
Jes Sorensen [Tue, 5 May 2015 22:35:47 +0000 (18:35 -0400)]
staging: unisys: Remove unused cache object counter

kmem_cache statistics are available through SLAB anyway

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Get rid of uint usage
Jes Sorensen [Tue, 5 May 2015 22:35:46 +0000 (18:35 -0400)]
staging: unisys: Get rid of uint usage

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Do not initialize variables unnecessarily
Jes Sorensen [Tue, 5 May 2015 22:35:45 +0000 (18:35 -0400)]
staging: unisys: Do not initialize variables unnecessarily

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Don't zero struct elements which will be memset away
Jes Sorensen [Tue, 5 May 2015 22:35:44 +0000 (18:35 -0400)]
staging: unisys: Don't zero struct elements which will be memset away

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove unncessary parenthesis
Jes Sorensen [Tue, 5 May 2015 22:35:43 +0000 (18:35 -0400)]
staging: unisys: Remove unncessary parenthesis

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove some unnecessary parenthesis
Jes Sorensen [Tue, 5 May 2015 22:35:42 +0000 (18:35 -0400)]
staging: unisys: Remove some unnecessary parenthesis

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Fix up a few cases of bad formatting
Jes Sorensen [Tue, 5 May 2015 22:35:41 +0000 (18:35 -0400)]
staging: unisys: Fix up a few cases of bad formatting

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Eliminate globals.h
Jes Sorensen [Tue, 5 May 2015 22:35:40 +0000 (18:35 -0400)]
staging: unisys: Eliminate globals.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Move MYDRVNAME to visorchipset.h
Jes Sorensen [Tue, 5 May 2015 22:35:39 +0000 (18:35 -0400)]
staging: unisys: Move MYDRVNAME to visorchipset.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Move module parameters around and mark static
Jes Sorensen [Tue, 5 May 2015 22:35:38 +0000 (18:35 -0400)]
staging: unisys: Move module parameters around and mark static

Move the module parameters and make sure they are static.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMerge 4.1-rc2 into staging-next
Greg Kroah-Hartman [Fri, 8 May 2015 12:38:55 +0000 (14:38 +0200)]
Merge 4.1-rc2 into staging-next

We want the fixes in here to make merges and testing easier.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rts5208: Replace timeval with timespec64
Ksenija Stanojevic [Thu, 30 Apr 2015 17:00:23 +0000 (19:00 +0200)]
Staging: rts5208: Replace timeval with timespec64

struct timeval tv is used to get current time.
32-bit systems using 'struct timeval' will break in the year 2038, so
we have to replace that code with more appropriate types.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: don't redefine container_of()
Marti Bolivar [Fri, 1 May 2015 21:10:59 +0000 (17:10 -0400)]
staging: rtl8192u: don't redefine container_of()

This file already includes <linux/kernel.h>.

Signed-off-by: Marti Bolivar <mbolivarmullen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: ad7606_par: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:43:22 +0000 (00:43 +0900)]
staging: iio: ad7606_par: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers/staging: include <module.h> for modular android tegra_ion code
Paul Gortmaker [Fri, 1 May 2015 01:47:46 +0000 (21:47 -0400)]
drivers/staging: include <module.h> for modular android tegra_ion code

This file is built off of a tristate Kconfig option and also contains
modular function calls so it should explicitly include module.h to
avoid compile breakage during header shuffles done in the future.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Arve Hj�nnev�g" <arve@android.com>
Cc: Riley Andrews <riandrews@android.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192e: delete local copy of iee80211 reason codes.
Paul Gortmaker [Mon, 27 Apr 2015 05:25:41 +0000 (01:25 -0400)]
rtl8192e: delete local copy of iee80211 reason codes.

This driver has a copy of the standard reason codes from the file
<linux/ieee80211.h> but with slightly different name fields.

Delete the local copy and remap the only two use cases onto the names
used by the global implementation with the same values.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: delete another embedded instance of generic reason codes
Paul Gortmaker [Mon, 27 Apr 2015 05:25:40 +0000 (01:25 -0400)]
rtl8192u: delete another embedded instance of generic reason codes

We have global copies of all these reason codes.  We don't need local
copies.  Worse is that these seem totally unused; a grep for some of
the fields comes up empty, and it still compiles after its complete
removal.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: don't duplicate ieee80211 constants for status/auth/reason
Paul Gortmaker [Mon, 27 Apr 2015 05:25:39 +0000 (01:25 -0400)]
rtl8192u: don't duplicate ieee80211 constants for status/auth/reason

These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

In switching to <linux/ieee80211.h> we have to delete a local copy of
an identical struct that we prepped earlier to have identical field
names, and we add explicit include <...> where needed in order to
preserve getting a successful compile.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: align local ieee80211_wmm_ac_param struct fields with global
Paul Gortmaker [Mon, 27 Apr 2015 05:25:38 +0000 (01:25 -0400)]
rtl8192u: align local ieee80211_wmm_ac_param struct fields with global

The <linux/ieee80211.h> and this local file both have a struct of the
same name.  They also have the same field sizes and generally the
same fields, as can be seen here:

   ~/git/linux-head$ git grep -A4 'struct ieee80211_wmm_ac_param {'
   drivers/staging/rtl8192u/ieee80211/ieee80211.h:struct ieee80211_wmm_ac_param {
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_aci_acm_aifsn;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_ecwmin_ecwmax;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u16 ac_txop_limit;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h-};
   --
   include/linux/ieee80211.h:struct ieee80211_wmm_ac_param {
   include/linux/ieee80211.h-      u8 aci_aifsn; /* AIFSN, ACM, ACI */
   include/linux/ieee80211.h-      u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */
   include/linux/ieee80211.h-      __le16 txop_limit;
   include/linux/ieee80211.h-} __packed;
   ~/git/linux-head$

Here we just align the local field names with the main system one.  Then
we can add an include of the system one and delete the local copy in one
smooth step in a follow-on commit.

Not that the replacement:

 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done
 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done
 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done

implicitly shows that only one of the three fields is currently used.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: promote auth_mode to a full 8 bits
Paul Gortmaker [Mon, 27 Apr 2015 05:25:37 +0000 (01:25 -0400)]
rtl8192u: promote auth_mode to a full 8 bits

Currently LEAP is defined to two locally but the identically named
global constant is 128 in <linux/ieee80211.h>.  In order for us to
switch over to using the global value, we need to adjust the local
storage which is currently not enough to hold the larger value.

This is now consistent with the similar struct used in
drivers/net/wireless/ipw2x00/libipw.h and other drivers.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: don't trample on <linux/ieee80211.h> struct namespace
Paul Gortmaker [Mon, 27 Apr 2015 05:25:36 +0000 (01:25 -0400)]
rtl8192u: don't trample on <linux/ieee80211.h> struct namespace

In order to start reducing the duplicated code/constants/macros in this
driver, we need to include <linux/ieee80211.h> to provide the defacto
versions.  However this driver has structs with the same name as the
ones in the main include, so namespace collision prevents us from doing
step #1.

Since the structs actually differ in their respective fields, we can't
simply delete the local ones without impacting the runtime; a conversion
to use the global ones can be considered at a later date if desired.

Rename the ones here with a vendor specific prefix so that we won't have
the namespace collision, and hence can continue on with the cleanup.

Automated conversion done with:

    for i in `find . -name '*.[ch]'` ; do \
      sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \
    done

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8712: don't duplicate ieee80211 constants for status/reason
Paul Gortmaker [Mon, 27 Apr 2015 05:25:35 +0000 (01:25 -0400)]
rtl8712: don't duplicate ieee80211 constants for status/reason

These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

It seems that ieee80211 was already included everywhere it was needed,
since no explicit include <...> were needed to be added in order to
preserve getting a successful compile.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8188eu: don't duplicate ieee80211 constants for status/reason
Paul Gortmaker [Mon, 27 Apr 2015 05:25:34 +0000 (01:25 -0400)]
rtl8188eu: don't duplicate ieee80211 constants for status/reason

These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

Note that a couple of them had slight wording differences, things like
INVALID vs. NOT_VALID or similar, so they are aligned with the global
naming conventions here, as dictated by compile testing.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Checkpatch fix: lines longer than 80 columns
Guillaume Brogi [Sun, 26 Apr 2015 12:40:23 +0000 (14:40 +0200)]
staging: vt6655: Checkpatch fix: lines longer than 80 columns

This patch fixes lines longer than 80 columns in mac.c.
5 lines longer than 80 columns remain for the sake of readability.

Signed-off-by: Guillaume Brogi <gui-gui@netcourrier.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: remove unused functions
Sudip Mukherjee [Thu, 23 Apr 2015 13:38:17 +0000 (19:08 +0530)]
staging: sm7xxfb: remove unused functions

removed the smtc_alloc_fb_info() and smtc_free_fb_info() functions which
were not used anymore.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: use framebuffer_alloc and release
Sudip Mukherjee [Thu, 23 Apr 2015 13:38:16 +0000 (19:08 +0530)]
staging: sm7xxfb: use framebuffer_alloc and release

use the standard framebuffer_alloc() and framebuffer_release() instead
of custom defined function. for making that change we had to change a
member of the private structure from a variable to pointer and had to
touch almost all places of the file. since fb was changed into a pointer
so all instance of "sfb->fb." has been changed into "sfb->fb->".
now we will get build warning about smtc_alloc_fb_info() and
smtc_free_fb_info() to be unused which will be removed in the next
patch of the series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gsc_hdpi: Remove dead code
Gujulan Elango, Hari Prasath (H.) [Fri, 24 Apr 2015 06:58:11 +0000 (06:58 +0000)]
staging: gsc_hdpi: Remove dead code

This patch removes commented code from this driver.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: Remove redundant initalization of the .owner field
Gujulan Elango, Hari Prasath (H.) [Thu, 23 Apr 2015 13:03:07 +0000 (13:03 +0000)]
staging: fsl-mc: Remove redundant initalization of the .owner field

This patch removes the redundant static initialization of the .owner field from
this driver as it is being overidden by the call from the platform driver register

Signed-off-by: Hari Prasath <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750: Fix the Makefile option error
Binbin Zhou [Wed, 22 Apr 2015 03:37:26 +0000 (11:37 +0800)]
staging: sm750: Fix the Makefile option error

The sm750fb's Kconfig option is CONFIG_FB_SM750, not CONFIG_FB_SM7XX.
Thus fix it to make the sm750fb can be built successfully.

Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Reviewed-by: Huacai Chen <chenhc@@lemote.com>
Acked-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove commented code
Luca Ceresoli [Thu, 16 Apr 2015 21:28:07 +0000 (23:28 +0200)]
staging: rtl8188eu: remove commented code

This code is commented since the initial commit. Probably it is a remnant of
old code.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove useless comment
Luca Ceresoli [Thu, 16 Apr 2015 21:28:06 +0000 (23:28 +0200)]
staging: rtl8188eu: remove useless comment

"step 2" does mean much as there is no "step 1" stated anywhere...

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: fix lines over 80 characters
Luca Ceresoli [Thu, 16 Apr 2015 21:28:05 +0000 (23:28 +0200)]
staging: rtl8188eu: fix lines over 80 characters

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: simplify nested ifs
Luca Ceresoli [Thu, 16 Apr 2015 21:28:04 +0000 (23:28 +0200)]
staging: rtl8188eu: simplify nested ifs

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: document enum where it is declared
Luca Ceresoli [Thu, 16 Apr 2015 21:28:03 +0000 (23:28 +0200)]
staging: rtl8188eu: document enum where it is declared

The comment "/* open system */" is repeated verbatim in several places where
dot11AuthAlgrthm_Open is referenced, but not where it is declared.

Move it to be only at its declaration.

This also fixes some "line over 80 characters" checkpatch warnings.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: fix comments over 80 characters
Luca Ceresoli [Thu, 16 Apr 2015 21:28:02 +0000 (23:28 +0200)]
staging: rtl8188eu: fix comments over 80 characters

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove duplicated comments
Luca Ceresoli [Thu, 16 Apr 2015 21:28:01 +0000 (23:28 +0200)]
staging: rtl8188eu: remove duplicated comments

There are identical comments near the static variable declaration, around
lines 118~120.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: hal: Remove trailing whitespace in odm.c
Edward Lipinsky [Sat, 18 Apr 2015 16:35:19 +0000 (09:35 -0700)]
Staging: rtl8723au: hal: Remove trailing whitespace in odm.c

This patch fixes the checkpatch.pl error:

ERROR: trailing whitespace

Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dt3155v4l: remove unused including <linux/version.h>
Wei Yongjun [Thu, 16 Apr 2015 13:08:38 +0000 (21:08 +0800)]
staging: dt3155v4l: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: ion_test: unregister the platform device
Phong Tran [Fri, 3 Apr 2015 14:07:02 +0000 (21:07 +0700)]
staging: android: ion_test: unregister the platform device

The driver has to unregister from platform device when it's unloaded

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: ion_test: unregister the misc device
Phong Tran [Fri, 3 Apr 2015 14:07:01 +0000 (21:07 +0700)]
staging: android: ion_test: unregister the misc device

Add the remove() method for deregister from misc device
when it's unloaded.

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix DeviceID in rtl8192_pci_findadapter()
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:32 +0000 (23:47 +0200)]
staging: rtl8192e: Fix DeviceID in rtl8192_pci_findadapter()

rtl8192_pci_findadapter() was looking for invalid DeviceID (0x8172),
instead of proper for rtl8192e/se devices (0x8192)

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix DEEP_INDENTATION warnings in rtl_dm.c
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:31 +0000 (23:47 +0200)]
staging: rtl8192e: Fix DEEP_INDENTATION warnings in rtl_dm.c

Separate parts of dm_TXPowerTrackingCallback_TSSI() into two new functions:
- dm_tx_update_tssi_weak_signal()
- dm_tx_update_tssi_strong_signal()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix DEEP_INDENTATION warnings in rtllib_parse_info_param()
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:30 +0000 (23:47 +0200)]
staging: rtl8192e: Fix DEEP_INDENTATION warnings in rtllib_parse_info_param()

- Replace ?: with min_t
- Remove condition that is always true

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix LINE_SPACING warning
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:29 +0000 (23:47 +0200)]
staging: rtl8192e: Fix LINE_SPACING warning

Trivial fix - add newline in dm_InitializeTXPowerTracking_TSSI()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove bb tx gains from r8192_priv
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:28 +0000 (23:47 +0200)]
staging: rtl8192e: Remove bb tx gains from r8192_priv

r8192_priv structure had 2 big arrays with tx gain register values:
- cck_txbbgain_table
- cck_txbbgain_ch14_table
- txbbgain_table

This arrays were read-only - filled in driver init code and look
like firmware/chip-specific.

This patch removes them from r8192_priv and puts them in (global) variables.

tx_bb_gain is also flattened - register values are stored in array;
Amplification value can be calculated using dm_tx_bb_gain_idx_to_amplify().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix SPACING errors
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:27 +0000 (23:47 +0200)]
staging: rtl8192e: Fix SPACING errors

Fix several SPACING errors to make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: remove r819xE_phyreg.h
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:26 +0000 (23:47 +0200)]
staging: rtl8192e: remove r819xE_phyreg.h

This file is not used and its contents are duplicated in r8192E_phyreg.h.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Copy comments from r819XE_phyreg.h to r8192E_phyreg.h
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:25 +0000 (23:47 +0200)]
staging: rtl8192e: Copy comments from r819XE_phyreg.h to r8192E_phyreg.h

Both files have the same contents (with the exception of comments).
One of them will not survive future commits.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix SPACE_BEFORE_TAB warnings
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:24 +0000 (23:47 +0200)]
staging: rtl8192e: Fix SPACE_BEFORE_TAB warnings

Reformat r8192E_phyreg.h to make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Make core functions static
Nickolaus Woodruff [Sun, 12 Apr 2015 16:42:03 +0000 (12:42 -0400)]
staging: rtl8192u: Make core functions static

This patch fixes the following sparse warnings in r8192U_core.c:

  CHECK   drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r8192U_core.c:3212:6: warning: symbol
'rtl819x_watchdog_wqcallback' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3276:6: warning: symbol
'watch_dog_timer_callback' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3282:5: warning: symbol
'_rtl8192_up' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3333:5: warning: symbol
'rtl8192_close' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3406:6: warning: symbol
'rtl8192_restart' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4618:6: warning: symbol
'rtl8192_irq_rx_tasklet' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4736:6: warning: symbol
'rtl8192_cancel_deferred_work' was not declared. Should it be static?

Signed-off-by: Nickolaus Woodruff <nickolauswoodruff@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite: use a better MODULE_DESCRIPTION()
Ian Abbott [Fri, 1 May 2015 17:04:03 +0000 (18:04 +0100)]
staging: comedi: mite: use a better MODULE_DESCRIPTION()

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.h: whitespace changes in function declarations
Ian Abbott [Fri, 1 May 2015 17:04:02 +0000 (18:04 +0100)]
staging: comedi: mite.h: whitespace changes in function declarations

Reformat some function declarations to avoid bunching up near column 80.

Also add a blank line after a `struct` definition.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.c: reformat comments
Ian Abbott [Fri, 1 May 2015 17:04:01 +0000 (18:04 +0100)]
staging: comedi: mite.c: reformat comments

Use the usual style for block comments.  Squash double spaces after
comment opening sequences.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.h: reformat some comments
Ian Abbott [Fri, 1 May 2015 17:04:00 +0000 (18:04 +0100)]
staging: comedi: mite.h: reformat some comments

Use the usual style for block comments.  Squash double spaces after
comment opening sequences.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.h: remove "../comedi_pci.h" and make self-reliant
Ian Abbott [Fri, 1 May 2015 17:03:59 +0000 (18:03 +0100)]
staging: comedi: mite.h: remove "../comedi_pci.h" and make self-reliant

"mite.h" relies on a lot of things declared including "../comedi_pci.h",
but doesn't need anything in "../comedi_pci.h" itself.  None of the
Comedi modules that include "mite.h" rely on it to include
"../comedi_pci.h" on their behalf.

Remove the inclusion of "../comedi_pci.h" from "mite.h", and add enough
other includes and (incomplete) `struct` declarations to make it compile
without warnings or errors even when included first in a .c file.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.c: remove commented out USE_KMALLOC
Ian Abbott [Fri, 1 May 2015 17:03:58 +0000 (18:03 +0100)]
staging: comedi: mite.c: remove commented out USE_KMALLOC

The definition of the macro `USE_KMALLOC` is commented out, and nothing
refers to it.  Remove the commented out macro.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.h: remove PCIMIO_COMPAT
Ian Abbott [Fri, 1 May 2015 17:03:57 +0000 (18:03 +0100)]
staging: comedi: mite.h: remove PCIMIO_COMPAT

The macro `PCIMIO_COMPAT` is defined, but never used.  Remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite: move #include <linux/slab.h>
Ian Abbott [Fri, 1 May 2015 17:03:56 +0000 (18:03 +0100)]
staging: comedi: mite: move #include <linux/slab.h>

The Comedi driver modules build fine if the inclusion of <linux/slab.h>
is removed from "mite.h", so remove it.  However, since "mite.c" calls
`kzalloc()`, include <linux/slab.h> there.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: remove redundant check
Giedrius Statkevičius [Fri, 10 Apr 2015 14:48:55 +0000 (17:48 +0300)]
staging: dgnc: remove redundant check

count doesn't get changed in between identical checks in
dgnc_tty_write() so remove the second check

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: remove dead code in dgnc_tty_write()
Giedrius Statkevičius [Fri, 10 Apr 2015 14:48:54 +0000 (17:48 +0300)]
staging: dgnc: remove dead code in dgnc_tty_write()

Remove the dead code protected by in_user in dgnc_tty_write() because it
is set to 0 and never changed to 1 thus the code in ifs never gets
executed.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ion: chunk_heap: use pr_debug for heap creation print
Mitchel Humpherys [Fri, 10 Apr 2015 01:10:03 +0000 (18:10 -0700)]
staging: ion: chunk_heap: use pr_debug for heap creation print

We're currently printing to the kernel log at `info' level when we
successfully create the chunk heap, but success messages should be done
at `debug' level.  Fix this.

Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: remove redundant !ch checks
Giedrius Statkevičius [Thu, 9 Apr 2015 23:42:31 +0000 (02:42 +0300)]
staging: dgnc: remove redundant !ch checks

Remove checks that are redundant since we don't have boards with partially
initialized ->channels[i].

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: don't forget to check if ->channels[i] is NULL in dgnc_tty_uninit()
Giedrius Statkevičius [Thu, 9 Apr 2015 23:42:30 +0000 (02:42 +0300)]
staging: dgnc: don't forget to check if ->channels[i] is NULL in dgnc_tty_uninit()

Add a check if ->channels[i] is NULL because a NULL pointer may be dereferenced
in case one of the allocations failed

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: clean up allocation of ->channels[i]
Giedrius Statkevičius [Thu, 9 Apr 2015 23:42:29 +0000 (02:42 +0300)]
staging: dgnc: clean up allocation of ->channels[i]

Check if kzalloc fails in dgnc_tty_init() and if it does then free all
previously allocated ->channels[i] and set them to NULL. This makes the code
less error/bug prone because instead of needing programmers attention to add
checks everywhere we do that in one place. Also, remove a bogus comment and
check in the same loop because ->channels[i] isn't allocated anywhere else.
Finally, remove a unnecessary check if ->channels[i] is NULL in the next loop
because it can't be.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>