GitHub/LineageOS/android_kernel_motorola_exynos9610.git
9 years agostaging: unisys: use schedule_timeout_interruptible()
Nicholas Mc Guire [Fri, 29 May 2015 15:31:16 +0000 (17:31 +0200)]
staging: unisys: use schedule_timeout_interruptible()

API consolidation with coccinelle found:
./drivers/staging/unisys/visorbus/periodic_work.c:196:3-19:
        consolidation with schedule_timeout_*() recommended

This is a 1:1 conversion with respect to schedule_timeout() to the
schedule_timeout_interruptible() helper only - so only an API
consolidation to improve readability. The hard coded timeout of 10
jiffies is HZ dependent which it should not be, so it is converted
with msecs_to_jiffies.

Patch was compile tested with x86_64_defconfig + CONFIG_STAGING=y,
CONFIG_UNISYSSPAR=y, CONFIG_UNISYS_VISORBUS=m

Patch is against 4.1-rc5 (localversion-next is -next-20150529)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Prepare vbus_hdr_info to be public
Don Zickus [Mon, 1 Jun 2015 17:00:28 +0000 (13:00 -0400)]
staging: unisys: Prepare vbus_hdr_info to be public

In order to remove bus_info, we need to migrate vbus_hdr_info into
the public namespace of visor_device.  Because the struct is private,
we use a void * to hide the contents.

As a result, we need to allocate vbus_hdr_info and manage it.

Also work around vbus_valid, as that variable will not be used
in the public namespace.

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: Convert pending_msg_hdr to a pointer
Don Zickus [Mon, 1 Jun 2015 17:00:27 +0000 (13:00 -0400)]
staging: unisys: Convert pending_msg_hdr to a pointer

In order for bus/dev_info structs to become public structs, one
element, pending_msg_hdr, needs to become opaque.  This is to keep
all the internals of the controlvm struct private to the bus layer.

So a simple conversion of embedding the pending_msg_hdr struct into
a pointer is done.  The rest of the patch is the fallout.

The rules are modified slightly.  Instead of relying on the 'id' to be
CONTROLVM_INVALID to indicate invalid, just use the pointer set to NULL.

In addition, because bus/dev_info can be NULL and we still need to send
a
response, pass pending_msg_hdr to all 'responders' instead of bus/

That change causes some fallout in the success case.  Instead of setting
state
bits and clearing info in the responders, do all that magic in the
responder
wrappers.

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 channel creation up the stack
Don Zickus [Mon, 1 Jun 2015 17:00:26 +0000 (13:00 -0400)]
staging: unisys: Move channel creation up the stack

Instead of creating a channel struct to temporarily hold the channel
info and passing it through multiple functions until the device is
created, just create the channel from the start.

This allows us to remove the channel_info struct.

I noticed 'chan_info.addr_type' was not being used, so I just deleted it.

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: wilc1000: remove WILC_Uint8
Greg Kroah-Hartman [Tue, 2 Jun 2015 05:16:04 +0000 (14:16 +0900)]
staging: wilc1000: remove WILC_Uint8

Just use u8, as that's what you really want in a kernel driver.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc100: remove WILC_NULL usage
Greg Kroah-Hartman [Tue, 2 Jun 2015 05:11:12 +0000 (14:11 +0900)]
staging: wilc100: remove WILC_NULL usage

Use the "real" NULL value, don't try to be cute and define your own
value for something that the compiler obviously supports.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove unused data types
Greg Kroah-Hartman [Tue, 2 Jun 2015 05:03:03 +0000 (14:03 +0900)]
staging: wilc1000: remove unused data types

There's some "custom" data types defined that are never used in the
driver, so remove them before we work on converting the rest to be
"standard" data types.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: update TODO list
Arnd Bergmann [Mon, 1 Jun 2015 19:20:11 +0000 (21:20 +0200)]
staging: wilc1000: update TODO list

I have crossed off one item on the list, but found a few others that should
not get lost, so here is an update of the wilc1000 list

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix compiler warnings
Arnd Bergmann [Mon, 1 Jun 2015 19:06:45 +0000 (21:06 +0200)]
staging: wilc1000: fix compiler warnings

This avoids the remaining warnings that one gets on a normal
build: unused variables, unused labels, and invalid printk
format strings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix const cast warnings
Arnd Bergmann [Mon, 1 Jun 2015 19:06:44 +0000 (21:06 +0200)]
staging: wilc1000: fix const cast warnings

The wilc1000 driver produces a lot of warnings about invalid
casts between const and non-const variables. This reworks
the code to avoid all those warnings, by marking variables
and function arguments const.

A lot of the types use WILC_Uint8, I change them to const u8
for style reasons, as I'm touching them anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove semaphore wrapper
Arnd Bergmann [Mon, 1 Jun 2015 19:06:43 +0000 (21:06 +0200)]
staging: wilc1000: remove semaphore wrapper

The various semaphore functions all directly translate into
sema_init(), down() and up(), so we can just remove the API.

This is a mostly automated conversion using simple sed scripts,
plus some manual changes to account for down() returning no
error.

As a positive side-effect, down() no longer hangs after
receiving a signal, as the original code did by looping around
down_interruptible.

The semaphores still need to be turned into mutexes as a
follow-up step.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove EXPORT_SYMTAB
Arnd Bergmann [Mon, 1 Jun 2015 19:06:42 +0000 (21:06 +0200)]
staging: wilc1000: remove EXPORT_SYMTAB

The EXPORT_SYMTAB symbol has not been used in Linux for a very
long time, the driver does not need to set it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove unused OS abstraction features
Arnd Bergmann [Mon, 1 Jun 2015 19:06:41 +0000 (21:06 +0200)]
staging: wilc1000: remove unused OS abstraction features

All the remaining features from the OS abstraction layer
are not used at all in the driver, so we can just remove
the remaining references to them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: clean up timer feature
Arnd Bergmann [Mon, 1 Jun 2015 19:06:40 +0000 (21:06 +0200)]
staging: wilc1000: clean up timer feature

The driver has a simple wrapper around timer_list, and an
optional but unused feature to make the timer periodic.

This removes support for the periodic timer and simplifies
the code around timers.

A follow-up should replace the remaining wrapper with
open-coded timers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: clean up sleep wrapper
Arnd Bergmann [Mon, 1 Jun 2015 19:06:39 +0000 (21:06 +0200)]
staging: wilc1000: clean up sleep wrapper

The driver has a simple wrapper around msleep, as well as
a more advanced sleep function that is unused. This removes
the unused code and the options to turn the feature on or
off.

A follow-up should rework the code to use msleep directly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: simplify semaphore wrapper
Arnd Bergmann [Mon, 1 Jun 2015 19:06:38 +0000 (21:06 +0200)]
staging: wilc1000: simplify semaphore wrapper

The driver has its own API for semaphores. This should
be replaced with mutexes and completions, but for the moment
we can start by removing the obviously unused parts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove unused memory handling code
Arnd Bergmann [Mon, 1 Jun 2015 19:06:37 +0000 (21:06 +0200)]
staging: wilc1000: remove unused memory handling code

The driver contains its own abstraction for memory allocation,
most of it unused. This removes the unused parts, but the
rest should also be removed later.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: simplify msgqueue code
Arnd Bergmann [Mon, 1 Jun 2015 19:06:36 +0000 (21:06 +0200)]
staging: wilc1000: simplify msgqueue code

The driver contains an abstraction for message queues, with
optional unused features, while the driver requires the main
feature.

This makes the msgqueue code unconditional as it's required
but removes the unused parts.

A later cleanup should remove the entire msgqueue code
and replace it with some normal kernel API.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove unused string functions
Arnd Bergmann [Mon, 1 Jun 2015 19:06:35 +0000 (21:06 +0200)]
staging: wilc1000: remove unused string functions

The driver provides wrappers for a lot of string operations.
Some of them are unused, while others should be replaced
with normal kernel functions.

This replaces the unused ones for now, and leaves the other
ones for a later cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: remove time wrapper
Arnd Bergmann [Mon, 1 Jun 2015 19:06:34 +0000 (21:06 +0200)]
staging: wilc1000: remove time wrapper

The abstraction for time in this driver is completely
unused, so remove it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ldlm: Fix up LDLM_POOL_SYSFS_WRITER*_STORE define
Oleg Drokin [Sun, 31 May 2015 06:47:22 +0000 (02:47 -0400)]
staging/lustre/ldlm: Fix up LDLM_POOL_SYSFS_WRITER*_STORE define

The store method defined by LDLM_POOL_SYSFS_WRITER_STORE and
LDLM_POOL_SYSFS_WRITER_NOLOCK_STORE defines should
use size_t count, not unsigned long.

This produced a warning on i386 (and other 32bit architectures too,
I guess) where unsigned long is not 32 bit.

Reported by kbuild test bot.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorbus: add static declarations
Drew Fustini [Fri, 29 May 2015 02:04:23 +0000 (21:04 -0500)]
staging: unisys: visorbus: add static declarations

Add static declarations to statisfy sparse warnings in:
  drivers/staging/unisys/visorbus/visorbus_main.c

  warning: symbol 'visorbus_debug' was not declared
  warning: symbol 'visorbus_forcematch' was not declared
  warning: symbol 'visorbus_forcenomatch' was not declared
  warning: symbol 'visorbus_devicetest' was not declared
  warning: symbol 'visorbus_debugref' was not declared
  warning: symbol 'visorbus_bus_groups' was not declared
  warning: symbol 'devmajorminor_create_file' was not declared
  warning: symbol 'devmajorminor_remove_file' was not declared
  warning: symbol 'devmajorminor_remove_all_files' was not declared
  warning: symbol 'unregister_devmajorminor_attributes' was not declared

Signed-off-by: Drew Fustini <pdp7pdp7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix SPACING error
Mateusz Kulikowski [Sun, 31 May 2015 18:19:53 +0000 (20:19 +0200)]
staging: rtl8192e: Fix SPACING error

Fix SPACING error in rtl8192_hw_to_sleep().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rtl8192E_suspend(): Fix WOL reporting
Mateusz Kulikowski [Sun, 31 May 2015 18:19:52 +0000 (20:19 +0200)]
staging: rtl8192e: rtl8192E_suspend(): Fix WOL reporting

WOL capability was reported in an awkward way - print it nicely.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix trivial LONG_LINE errors
Mateusz Kulikowski [Sun, 31 May 2015 18:19:51 +0000 (20:19 +0200)]
staging: rtl8192e: Fix trivial LONG_LINE errors

Reindent lines 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: Replace RT_TRACE(COMP_ERR, ...) with netdev_*
Mateusz Kulikowski [Sun, 31 May 2015 18:19:50 +0000 (20:19 +0200)]
staging: rtl8192e: Replace RT_TRACE(COMP_ERR, ...) with netdev_*

- Use netdev_* with log level depending on how serious error is
- Rework some messages to be more readable
- Pass net_device where needed for pretty prints

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rtl8192_phy_checkBBAndRF(): Don't check MAC
Mateusz Kulikowski [Sun, 31 May 2015 18:19:49 +0000 (20:19 +0200)]
staging: rtl8192e: rtl8192_phy_checkBBAndRF(): Don't check MAC

This function never supported checking of MAC block.
Instead of printing several warnings - print it once and exit.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove unneeded RT_TRACE(COMP_ERR,...)
Mateusz Kulikowski [Sun, 31 May 2015 18:19:48 +0000 (20:19 +0200)]
staging: rtl8192e: Remove unneeded RT_TRACE(COMP_ERR,...)

This messages are not needed, as failure is reported earlier in code.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Replace ?: with max
Mateusz Kulikowski [Sun, 31 May 2015 18:19:47 +0000 (20:19 +0200)]
staging: rtl8192e: Replace ?: with max

All get_key implementations return either -1 or small buffers, so
cast int->u16 is not a problem.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Replace ?: with min_t
Mateusz Kulikowski [Sun, 31 May 2015 18:19:46 +0000 (20:19 +0200)]
staging: rtl8192e: Replace ?: with min_t

Replace :? with min_t for readability. Remove check that is always false.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Replace ?: with max_t
Mateusz Kulikowski [Sun, 31 May 2015 18:19:45 +0000 (20:19 +0200)]
staging: rtl8192e: Replace ?: with max_t

Improve readability and 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 unused rtl_crypto.h
Mateusz Kulikowski [Sun, 31 May 2015 18:19:44 +0000 (20:19 +0200)]
staging: rtl8192e: Remove unused rtl_crypto.h

This header is not used - remove it to make driver code smaller.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix OOM_MESSAGE warnings
Mateusz Kulikowski [Sun, 31 May 2015 18:19:43 +0000 (20:19 +0200)]
staging: rtl8192e: Fix OOM_MESSAGE warnings

Remove alloc failed messages where not needed to make checkpatch.pl happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove unimplemented iwpriv handlers
Mateusz Kulikowski [Sun, 31 May 2015 18:19:42 +0000 (20:19 +0200)]
staging: rtl8192e: Remove unimplemented iwpriv handlers

Remove the following private variables:
- force_mic_error - changes force_mic_error that is not used
- radio - changes sw_radio_on that is not used
- adhoc_peer_list - unimplemented
- firm_ver - unimplemented

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix LONG_LING in rtllib_parse_info_param()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:41 +0000 (20:19 +0200)]
staging: rtl8192e: Fix LONG_LING in rtllib_parse_info_param()

Take out MIFE_TYPE_HT_CAP processing into separate function -
rtllib_parse_mfie_ht_cap()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix LONG_LINE warnings
Mateusz Kulikowski [Sun, 31 May 2015 18:19:40 +0000 (20:19 +0200)]
staging: rtl8192e: Fix LONG_LINE warnings

Fix most of simple LONG_LINE warnings. None of the changes should affect
behaviour of code, so several modifications are included in this patch:
- Code is reindented where needed
- Local variable names are compacted (priv -> p)
- Unnecessary casts are removed
- Nested ifs are replaced with logical and
- a = b = c = d expressions are split
- Replace if/then series with clamp_t()
- Removed unneeded scopes

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix PREFER_PR_LEVEL warnings
Mateusz Kulikowski [Sun, 31 May 2015 18:19:39 +0000 (20:19 +0200)]
staging: rtl8192e: Fix PREFER_PR_LEVEL warnings

Fix most of remaining PREFER_PR_LEVEL warnings in rtllib.
Replace printk() with netdev_* if possible, pr_* in other cases.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove assert() macro
Mateusz Kulikowski [Sun, 31 May 2015 18:19:38 +0000 (20:19 +0200)]
staging: rtl8192e: Remove assert() macro

Assert macro printed warning message (and was used once).
Remove it, and add netdev_warn() in place where it was called.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove remains of RTLLIB_*_DEBUG() (including proc entry)
Mateusz Kulikowski [Sun, 31 May 2015 18:19:37 +0000 (20:19 +0200)]
staging: rtl8192e: Remove remains of RTLLIB_*_DEBUG() (including proc entry)

Remove rest of rtllib "debug" system - it is no longer used -
proper netdev_* functions are used in most cases.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_DEBUG_DATA()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:36 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_DEBUG_DATA()

Use print_hex_dump_bytes() if VERBOSE_DEBUG is enabled.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_DEBUG()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:35 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_DEBUG()

- Use netdev_dbg or netdev_vdbg instead of RTLLIB_DEBUG()
- Reformat some messages for better readability
- Remove RTLLIB_DEBUG messages that make no sense

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_DEBUG_INFO()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:34 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_DEBUG_INFO()

Use pr_debug() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_DEBUG_MGMT()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:33 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_DEBUG_MGMT()

- Use netdev_dbg() instead of RTLLIB_DEBUG_MGMT()
- Remove RTLLIB_DEBUG_MGMT()
- Pass net_device to auth_parse(), auth_rq_parse() and assoc_rq_parse()
- Remove duplicated messages

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_DEBUG_QOS()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:32 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_DEBUG_QOS()

- Pass extra argument (rtllib_device) to rtllib_parse_qos_info_param_IE()
  and update_network()
- Replace RTLLIB_DEBUG_QOS() with netdev_dbg()
- Remove RTLLIB_DEBUG_QOS()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_DEBUG_(FRAG|EAP|DROP|STATE|TX|RX)()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:31 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_DEBUG_(FRAG|EAP|DROP|STATE|TX|RX)()

Use netdev_dbg() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_DEBUG_SCAN()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:30 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_DEBUG_SCAN()

Use netdev_dbg() instead, remove duplicated logs.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Simplify rtllib_process_probe_response()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:29 +0000 (20:19 +0200)]
staging: rtl8192e: Simplify rtllib_process_probe_response()

- Extract frame_ctl once and use it as variable.
- Drop endian conversion in is_beacon() function
  (used in simplified function only)
- Simplify debug messages
- Invert STYPE checks in debug messages - it is valid
  as only BEACON and PROBE_RESP are allowed

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_DEBUG_WX()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:28 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_DEBUG_WX()

Use netdev_dbg() instead of RTLLIB_DEBUG_WX().
Rewrite some messages to be more readable.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove RTLLIB_ERROR() and RTLLIB_WARNING()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:27 +0000 (20:19 +0200)]
staging: rtl8192e: Remove RTLLIB_ERROR() and RTLLIB_WARNING()

Use pr_* where needed (rtllib init code).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Replace RTLLIB_DEBUG(DL_ERR) with netdev_*()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:26 +0000 (20:19 +0200)]
staging: rtl8192e: Replace RTLLIB_DEBUG(DL_ERR) with netdev_*()

Replace all RTLLIB_DEBUG(RTLLIB_DL_ERR, *) calls with netdev_err()
for errors that really should be reported to user.
Use netdev_warn() for the rest.
Rephrase some of the messages to make them more readable/compact.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove rtllib_crypt.[ch]
Mateusz Kulikowski [Sun, 31 May 2015 18:19:25 +0000 (20:19 +0200)]
staging: rtl8192e: Remove rtllib_crypt.[ch]

It is neither compiled nor used in rtl8192e.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Replace memcmp() with ether_addr_equal()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:24 +0000 (20:19 +0200)]
staging: rtl8192e: Replace memcmp() with ether_addr_equal()

Use dedicated macro to compare ethernet addresses in probe_rq_parse().

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 warning in rtllib_parse_info_param()
Mateusz Kulikowski [Sun, 31 May 2015 18:19:23 +0000 (20:19 +0200)]
staging: rtl8192e: Fix DEEP_INDENTATION warning in rtllib_parse_info_param()

Move MFIE_TYPE_GENERIC handler to rtllib_parse_mife_generic() function.
Code was not altered significantly, therefore in some places it generates
LONG_LINE checkpatch.pl warnings.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix PREFER_ETHER_ADDR_COPY warnings
Mateusz Kulikowski [Sun, 31 May 2015 18:19:22 +0000 (20:19 +0200)]
staging: rtl8192e: Fix PREFER_ETHER_ADDR_COPY warnings

Replace memcpy() with ether_addr_copy() where possible to make
checkpatch.pl happy.
Change was target tested (download 1Mb file over WPA2 network)
with BUG trap for unaligned addresses in ether_addr_copy()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Make ethernet addresses properly aligned
Mateusz Kulikowski [Sun, 31 May 2015 18:19:21 +0000 (20:19 +0200)]
staging: rtl8192e: Make ethernet addresses properly aligned

Reorder ethernet addresses allocated on stack or in non-packed
structures to keep them aligned(2).
Use ETH_ALEN as array length in places where it was hardcoded to 6.

Alignment verified using pahole where possible and target-tested
with BUG_ON() trap in ether_addr_copy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: accept const MAC address
Mateusz Kulikowski [Sun, 31 May 2015 18:19:20 +0000 (20:19 +0200)]
staging: rtl8192e: accept const MAC address

Make set_swcam, setKey and rtllib_probe_resp parameter (MAC address)
const.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: Add support for Himax HX8357D controller
Heiner Kallweit [Sun, 31 May 2015 12:44:54 +0000 (14:44 +0200)]
staging: fbtft: Add support for Himax HX8357D controller

The Himax HX8357D is used e.g. by the Adafruit PITFT Plus 3.5".
Adafruit added HX8357D support to an own fork of fbtft and support
Raspbian only (https://github.com/adafruit/adafruit-rpi-fbtft/).
They don't intend to push it upstream but gave me the ok to do so.
Original author: Sean Cross <xobs@kosagi.com>

I just applied small changes to the driver to align it with the other
fbtft drivers.
- add "compatible" argument to FBTFT_REGISTER_DRIVER call
- add missing MODULE_ALIAS declarations

Tested successfully with this display on an RPI2 under Arch Linux ARM
(kernel 3.18.13).

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Kill dead calls to kill_pid()
Jakub Sitnicki [Sun, 31 May 2015 13:04:14 +0000 (15:04 +0200)]
staging: rtl8188eu: Kill dead calls to kill_pid()

There is no interface to register PIDs of processes the driver should
send a signal to.  Remove it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: device_rx_srv check sk_buff is NULL
Malcolm Priestley [Sun, 31 May 2015 09:35:28 +0000 (10:35 +0100)]
staging: vt6655: device_rx_srv check sk_buff is NULL

There is a small chance that pRD->pRDInfo->skb could go NULL
while the interrupt is processing.

Put NULL check on loop to break out.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: replace and resize dwIsr
Malcolm Priestley [Sun, 31 May 2015 09:35:27 +0000 (10:35 +0100)]
staging: vt6655: replace and resize dwIsr

dwIsr is not used outside vnt_interrupt_process and should
be u32.

Move to function and resize to u32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: vnt_interrupt_process remove camel case.
Malcolm Priestley [Sun, 31 May 2015 09:35:26 +0000 (10:35 +0100)]
staging: vt6655: vnt_interrupt_process remove camel case.

pDevice -> priv

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: vnt_interrupt_process remove page 0 select
Malcolm Priestley [Sun, 31 May 2015 09:35:25 +0000 (10:35 +0100)]
staging: vt6655: vnt_interrupt_process remove page 0 select

Page 1 is fully proctected by lock there is no need
to check for it. Page 0 is selected at other times.

Remove byOrgPageSel and its calls from function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: use workqueue for interrupt handling
Malcolm Priestley [Sun, 31 May 2015 09:35:24 +0000 (10:35 +0100)]
staging: vt6655: use workqueue for interrupt handling

Introduce vnt_interrupt to handle interrupt and use workqueue
to queue and queue on vif.

Convert device_intr to void call vnt_interrupt_process
from vnt_interrupt_work providing vif is valid.

This removes troublesome heavy code from the interupt handler and
allows to remove atomic from other areas of driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: remove mib.c/h dead code.
Malcolm Priestley [Sun, 31 May 2015 09:35:23 +0000 (10:35 +0100)]
staging: vt6655: remove mib.c/h dead code.

Remove from makefile and dead variables

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Remove call to STAvUpdateIsrStatCounter.
Malcolm Priestley [Sun, 31 May 2015 09:35:22 +0000 (10:35 +0100)]
staging: vt6655: Remove call to STAvUpdateIsrStatCounter.

This function does not provide any data to users.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: dead code remove STAvUpdate802_11Counter
Malcolm Priestley [Sun, 31 May 2015 09:35:21 +0000 (10:35 +0100)]
staging: vt6655: dead code remove STAvUpdate802_11Counter

This function is nolonger of any future use.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: implement ieee80211_low_level_stats
Malcolm Priestley [Sun, 31 May 2015 09:35:20 +0000 (10:35 +0100)]
staging: vt6655: implement ieee80211_low_level_stats

Collect low level stats from mib counter for mac80211 call.

Replacing the unused function STAvUpdate802_11Counter.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Replace kzalloc followed by memcpy with kmemdup
Niranjan Dighe [Sun, 31 May 2015 05:39:07 +0000 (05:39 +0000)]
Staging: lustre: Replace kzalloc followed by memcpy with kmemdup

Replace kzalloc followed by memcpy by kmemdup. This patch was generated
by 'make coccicheck'

Signed-off-by: Niranjan Dighe <ndighe@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre/obdclass/acl: remove unused variable
Greg Kroah-Hartman [Sun, 31 May 2015 06:30:15 +0000 (15:30 +0900)]
staging: lustre/obdclass/acl: remove unused variable

lustre_ext_acl_xattr_reduce_space() declares old_size, but never uses it
and gcc 5.x likes to complain about this, so remove it as it's not used
at all.

Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obd: final removal of procfs stuff
Dmitry Eremin [Sun, 31 May 2015 03:27:05 +0000 (23:27 -0400)]
staging/lustre/obd: final removal of procfs stuff

Signed-off-by: Dmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obd: Remove nid_stats tracking
Oleg Drokin [Sun, 31 May 2015 03:27:04 +0000 (23:27 -0400)]
staging/lustre/obd: Remove nid_stats tracking

This nid_stats tracking only makes sense on the server side,
on the client there are no other clients to keep track of anyway.

Signed-off-by: Dmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obd: remove unused lprocfs_exp_setup() and related functions
Oleg Drokin [Sun, 31 May 2015 03:27:03 +0000 (23:27 -0400)]
staging/lustre/obd: remove unused lprocfs_exp_setup() and related functions

This code only made sense on servers.

Signed-off-by: Dmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obd: Rename lprocfs_add_symlink to ldebugfs_add_symlink
Oleg Drokin [Sun, 31 May 2015 03:27:02 +0000 (23:27 -0400)]
staging/lustre/obd: Rename lprocfs_add_symlink to ldebugfs_add_symlink

Signed-off-by: Dmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/obd: remove unused proc_lustre_root
Dmitry Eremin [Sun, 31 May 2015 03:27:01 +0000 (23:27 -0400)]
staging/lustre/obd: remove unused proc_lustre_root

Signed-off-by: Dmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/llite: Move all remaining procfs entries to debugfs
Oleg Drokin [Sun, 31 May 2015 03:27:00 +0000 (23:27 -0400)]
staging/lustre/llite: Move all remaining procfs entries to debugfs

This moves all remaining procfs handling in llite layer to debugfs.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: use schedule_timeout_interruptible()
Nicholas Mc Guire [Fri, 29 May 2015 17:02:32 +0000 (19:02 +0200)]
staging: panel: use schedule_timeout_interruptible()

API consolidation with coccinelle found:
./drivers/staging/panel/panel.c:782:2-18:
        consolidation with schedule_timeout_*() recommended

This is a 1:1 conversion with respect to schedule_timeout() to the
schedule_timeout_interruptible() helper only - so only an API
consolidation to improve readability. The timeout was being passed
as (ms * HZ + 999) / 1000 but that simply looks wrong - rather than
"manual" converting to jiffies, msecs_to_jiffies which handles all
corner-cases correctly, was used.

Patch was compile tested with x86_64_defconfig + CONFIG_STAGING=y,
CONFIG_PARPORT=m, CONFIG_PANEL=m

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: me_daq: use schedule_timeout_interruptible()
Nicholas Mc Guire [Fri, 29 May 2015 15:58:18 +0000 (17:58 +0200)]
staging: me_daq: use schedule_timeout_interruptible()

API consolidation with coccinelle found:
./drivers/staging/comedi/drivers/me_daq.c:177:1-17:
        consolidation with schedule_timeout_*() recommended

This is a 1:1 conversion of the current calls to an available helper
only - so only an API consolidation to improve readability.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: Fix typo in sm750.c
Masanari Iida [Wed, 27 May 2015 23:41:16 +0000 (08:41 +0900)]
staging: sm750fb: Fix typo in sm750.c

This patch fix a spelling typo in printk within sm750.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove duplicate from fb_videomode
Michel von Czettritz [Tue, 26 May 2015 15:22:39 +0000 (17:22 +0200)]
staging: sm750fb: remove duplicate from fb_videomode

As suggested by Sudip this patch removes the redundant 1360x768@60
option from the fb_videomode struct array.
The removed option and the option one it differ in a typo and a flag.

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: sm750fb: Replace spaces with tabs at the start of lines
Isaac Assegai [Mon, 25 May 2015 05:48:42 +0000 (22:48 -0700)]
Staging: sm750fb: Replace spaces with tabs at the start of lines

Replace spaces at the start of lines with tabs to rectify
the following warning:
WARNING: please, no spaces at the start of a line

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Remove redundant CONFIG_88EU_AP_MODE tests
Jakub Sitnicki [Fri, 22 May 2015 05:06:12 +0000 (07:06 +0200)]
staging: rtl8188eu: Remove redundant CONFIG_88EU_AP_MODE tests

Remove #ifdef's enclosed by an #ifdef test for the same macro to improve
readability.

No code changes:

  md5, CONFIG_88EU_AP_MODE=y:
    b819a33f65133607ebc33b8999ee3a79  r8188eu.o.before
    b819a33f65133607ebc33b8999ee3a79  r8188eu.o.after

  md5, CONFIG_88EU_AP_MODE=n:
    94c84035d59285408b866a57b442276d  r8188eu.o.before
    94c84035d59285408b866a57b442276d  r8188eu.o.after

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: return an error code, not a boolean
Luca Ceresoli [Tue, 19 May 2015 09:35:26 +0000 (11:35 +0200)]
staging: rtl8188eu: return an error code, not a boolean

"If the name of a function is an action or an imperative command,
the function should return an error-code integer." (Documentation/CodingStyle)

Several action-like functions in this driver return a boolean: _SUCCESS = 1 on
success, _FAIL = 0 on error, defined in
drivers/staging/rtl8188eu/include/osdep_service.h.

Change rtw_start_drv_threads() to return a proper 0-or-error value.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: declare internal symbols as static
Luca Ceresoli [Tue, 19 May 2015 09:35:25 +0000 (11:35 +0200)]
staging: rtl8188eu: declare internal symbols as static

Also remove them from .h files.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove useless return value
Luca Ceresoli [Tue, 19 May 2015 09:35:24 +0000 (11:35 +0200)]
staging: rtl8188eu: remove useless return value

The loadparam() function cannot fail, it's called only once and its return
value is ignored there.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: add missing blank lines after declarations
Luca Ceresoli [Tue, 19 May 2015 09:35:23 +0000 (11:35 +0200)]
staging: rtl8188eu: add missing blank lines after declarations

Fixes checkpatch warnings:
  WARNING: Missing a blank line after declarations

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: cosmetic: remove useless spaces
Luca Ceresoli [Tue, 19 May 2015 09:35:22 +0000 (11:35 +0200)]
staging: rtl8188eu: cosmetic: remove useless spaces

Even though these are not reported by checkpatch, they are coding style issues.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging:nvec: fix typo in comment
Shailendra Verma [Wed, 27 May 2015 01:30:54 +0000 (07:00 +0530)]
staging:nvec: fix typo in comment

Fix spelling error in comment in function tegra_nvec_remove.

Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove useless return value
Luca Ceresoli [Tue, 19 May 2015 09:35:19 +0000 (11:35 +0200)]
staging: rtl8712: remove useless return value

The loadparam() function cannot fail, it's called only once and its return
value is ignored there.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove unneeded forward declaration
Luca Ceresoli [Tue, 19 May 2015 09:35:18 +0000 (11:35 +0200)]
staging: rtl8712: remove unneeded forward declaration

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove useless comment
Luca Ceresoli [Tue, 19 May 2015 09:35:17 +0000 (11:35 +0200)]
staging: rtl8712: remove useless comment

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

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: prevent buffer overrun in recvbuf2recvframe
Haggai Eran [Sat, 23 May 2015 20:13:51 +0000 (23:13 +0300)]
staging: rtl8712: prevent buffer overrun in recvbuf2recvframe

With an RTL8191SU USB adaptor, sometimes the hints for a fragmented
packet are set, but the packet length is too large. Allocate enough
space to prevent memory corruption and a resulting kernel panic [1].

[1] http://www.spinics.net/lists/linux-wireless/msg136546.html

Cc: <stable@vger.kernel.org>
Signed-off-by: Haggai Eran <haggai.eran@gmail.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: fix stack dump
Sudip Mukherjee [Fri, 15 May 2015 09:19:39 +0000 (14:49 +0530)]
staging: rtl8712: fix stack dump

del_timer_sync() is not to be called in the interrupt context unless
the timer is irqsafe. but most of the functions where commits
6501c8e7d86cca5f and 382d020f4459cd77 touched were called in interrupt
context. And as a result the WARN_ON was getting triggered. Changed
to del_timer() in places which were called from interrupt.

Fixes: 382d020f4459cd77 ("Staging: rtl8712: Eliminate use of _cancel_timer"
Fixes: 6501c8e7d86cca5f ("Staging: rtl8712: Eliminate use of _cancel_timer_ex")
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=97711
Reported-by: Arek Rusniak <arek.rusi@gmail.com>
Tested-by: Arek Rusniak <arek.rusi@gmail.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fwserial: fix resource leak
Vladimirs Ambrosovs [Mon, 25 May 2015 20:22:44 +0000 (23:22 +0300)]
staging: fwserial: fix resource leak

This patch fixes the leak, which was present in fwserial driver in the
init function. In case the tty driver allocation failed the function
returned error, leaving debugfs entry in the filesystem.

To fix the issue additional error label was added, so that the code will
jump to it in case of allocation failure, and free debugfs entries.

Signed-off-by: Vladimirs Ambrosovs <rodriguez.twister@gmail.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: Use ether_addr_copy() instead of memcpy()
Jagan Teki [Mon, 18 May 2015 16:32:45 +0000 (22:02 +0530)]
staging: rtl8712: Use ether_addr_copy() instead of memcpy()

Fixes Warning encounter this by applying checkpatch.pl against this file:
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

pahole output for respective structures:
- addr->sa_data
struct sockaddr {
sa_family_t                sa_family;            /*     0     2 */
char                       sa_data[14];          /*     2    14 */

/* size: 16, cachelines: 1, members: 2 */
/* last cacheline: 16 bytes */
};

- pnetdev->dev_addr
dev_addr is interface address infor from generic net_device structure
which is properly aligned and have some patches with this change as well.
"staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()"
(sha1: 36e4d8826b317080e283e4edd08bf8d5ac706f38)

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: core: Fix line over 80 characters
Jagan Teki [Mon, 18 May 2015 17:04:22 +0000 (22:34 +0530)]
staging: rtl8188eu: core: Fix line over 80 characters

This patch fixes line over 80 characters warninings while
running checkpatch.pl - "WARNING: line over 80 characters"

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: fix coding style
Sai.Jiang [Wed, 20 May 2015 08:37:50 +0000 (16:37 +0800)]
Staging: rtl8188eu: fix coding style

Remove two warnings of missing-blank-line-after-declaration.

Signed-off-by: Sai.Jiang <sai.d.jiang@foxmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: slicoss: restore IRQs correctly after slic_cmdq_reset()
Dan Carpenter [Tue, 19 May 2015 12:25:24 +0000 (15:25 +0300)]
staging: slicoss: restore IRQs correctly after slic_cmdq_reset()

We can't save two different values in "flags" so it means that IRQs are
not enabled properly at the end of this function.  This isn't a problem
in the current code because it's always called with IRQs disabled so we
don't want to enable them at the end.

This bug is old but it's thanks to David Matlack's recent cleanups that
Smatch can detect it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gdm72xx: Fix typos in printk
Masanari Iida [Wed, 27 May 2015 14:51:51 +0000 (23:51 +0900)]
staging: gdm72xx: Fix typos in printk

This patch fix 2 spelling typos in printk within gdm72xx.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gdm724x: Remove test for host endian
Jaime Arrocha [Tue, 26 May 2015 18:14:05 +0000 (13:14 -0500)]
staging: gdm724x: Remove test for host endian

gdm_endian.c: small changes were done to remove testing for host
endianness and in-driver conversion for byte-ordering.
The linux/kernel.h functions are used now.

gdm_endian.h: removal of code no longer needed with changes
in gdm_endian.c.

Signed-off-by: Jaime Arrocha <jarr@kerneldev.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rts5208: pass timeout as HZ independent value
Nicholas Mc Guire [Wed, 27 May 2015 16:02:38 +0000 (18:02 +0200)]
staging: rts5208: pass timeout as HZ independent value

schedule_timeout takes a timeout in jiffies but the code currently is
passing in a constant POLLING_INTERVAL which makes this timeout HZ
dependent, so pass it through msecs_to_jiffies() to fix this up.

patch was compile tested for x86_64_defconfig + CONFIG_STAGING=y,
CONFIG_RTS5208=m

Patch is against 4.0-rc5 (localversion-next is -next-20150527)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>