Commit graph

31398 commits

Author SHA1 Message Date
Tina Johnson dce34aee00 drivers: staging: rtl8188eu: core: Removed unnecessary parentheses
Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:

@rule1@
identifier x,y;
constant c;
@@

(

 x =
-(
 y << c
-)
 ;
|
 x =
-(
 y >> c
-)
 ;
|
 x =
-(
 y + c
-)
 ;
|
 x =
-(
 y - c
-)
 ;

)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:37:22 +01:00
Dilek Uzulmez a429238b9a Staging: rtl8192u: Replace #include <asm/string.h>
The following patch fixes the checkpatch.pl warning:
WARNING: Use #include <linux/string.h> instead of #include <asm/string.h>

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:36:22 +01:00
Dilek Uzulmez 9a4ed8c506 Staging: rtl8192u: Added #include <linux/string.h> instead of <asm/string.h>
The following patch fixes the checkpatch.pl warning:
WARNING: Use #include <linux/string.h> instead of #include <asm/string.h>

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:36:22 +01:00
Dilek Uzulmez a6a93bc03b Staging: rtl8192u: Added #include <linux/string.h> instead of <asm/string.h>
The following patch fixes the checkpatch.pl warning:
WARNING: Use #include <linux/string.h> instead of #include <asm/string.h>

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:36:22 +01:00
Darshana Padmadas d009f0d7ae staging: rtl8192e: Replace min with min_t
This patch replaces min with min_t and eliminates the
following warnings found by checkpatch.pl:

WARNING: min() should probably be min_t

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:30:40 +01:00
Darshana Padmadas a3d81a379b drivers: staging: dgnc: Replace min with min_t
This patch replaces min with min_t and eliminates
the following warning found by checkpatch.pl:

WARNING: min() should probably be min_t(uint, n, 12)

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:30:40 +01:00
Haneen Mohammed f7d63547ea Staging: speakup: Remove unused variable
This patch removes variable that was used to store only the return value of a function call.

The issue was detected and resolved using the following coccinelle script:

@@
expression ret;
identifier f;
@@

 -ret =
 +return
    f(...);
 -return ret;

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:30:40 +01:00
Haneen Mohammed 6019ee4095 Staging: dgap: Remove unused variable
This patch removes variable that was used to store only the return value of a function call.

The issue was detected and resolved using the following coccinelle script:

@@
expression ret;
identifier f;
@@

-ret =
+return
	f(...);
-return ret;

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:30:40 +01:00
Somya Anand acd3f6cf05 staging: rtl8188eu: Remove unneeded parentheses
This patch removes unneeded parentheses from a if statement
for better readability.

This issue is identified by checkpatch.pl

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:19:17 +01:00
Somya Anand b62a569e4a Staging: iio: Change data type to u16 to avoid unnecessary typecast
In the adis16220_read16bit() function we earlier used a s16 value 'val'
which is used by the adis_read_reg_16 function to read data and takes a
u16 value as a parameter.

So, this patch changes the data type of 'val' from s16 to u16. It is safe
to remove the extra sign extension, since the user of the function uses it
to read a 10 unsigned value which will lead to the same result in both cases.
Further this patch removes the unnecessary typecast for the simplification of
code. In addition to this, initialization of 'val' to 0 is also dropped. This is
due to the fact that not initializing helps the compiler provide useful warnings
if the code gets changed to return an otherwise uninitialized result.

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:18:04 +01:00
Greg Kroah-Hartman 355a73f07d Merge 4.0-rc3 into staging-next
We want the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 08:13:01 +01:00
J. German Rivera 197f4d6a4a staging: fsl-mc: fsl-mc object allocator driver
The fsl-mc object allocator driver manages "allocatable" fsl-mc
objects such as DPBPs, DPMCPs and DPCONs. It provides services to
other fsl-mc drivers to allocate/deallocate these types of objects.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:29:10 -08:00
J. German Rivera f2f2726b62 staging: fsl-mc: Device driver for FSL-MC DPRC devices
A DPRC (Data Path Resource Container) is an isolation device
that contains a set of DPAA networking devices to be
assigned to an isolation domain (e.g., a virtual machine).

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:28:33 -08:00
J. German Rivera bbf9d17d98 staging: fsl-mc: Freescale Management Complex (fsl-mc) bus driver
Platform device driver that sets up the basic bus infrastructure
for the fsl-mc bus type, including support for adding/removing
fsl-mc devices, register/unregister of fsl-mc drivers, and bus
match support to bind devices to drivers.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:28:09 -08:00
J. German Rivera 31c889653c staging: fsl-mc: Added Freescale Management Complex APIs
APIs to access the Management Complex (MC) hardware
module of Freescale LS2 SoCs. This patch includes
APIs to check the MC firmware version and to manipulate
DPRC objects in the MC.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:28:09 -08:00
Quentin Lambert 11201769d1 staging: rts5208: Convert variable from int to bool and propagate the change to function parameters
This patch convert local variables declared as int into booleans.
It also propagates the conversion when these variables were used
as function parameters.

Coccinelle was used to generate this patch.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:25:01 -08:00
Quentin Lambert de904bf0e4 staging: rts5208: Convert non-returned local variable to boolean when relevant
This patch was produced using Coccinelle. A simplified version of the
semantic patch is:

@r exists@
identifier f;
local idexpression u8 x;
identifier xname;
@@

f(...) {
...when any
(
  x@xname = 1;
|
  x@xname = 0;
)
...when any
}

@bad exists@
identifier r.f;
local idexpression u8 r.x
expression e1 != {0, 1}, e2;
@@

f(...) {
...when any
(
  x = e1;
|
  x + e2
)
...when any
}

@depends on !bad@
identifier r.f;
local idexpression u8 r.x;
identifier r.xname;
@@

f(...) {
...
++ bool xname;
- int xname;
<...
(
  x =
- 1
+ true
|
  x =
- -1
+ false
)
...>

}

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:25:00 -08:00
Jes Sorensen 6725e52d22 staging: rtl8723au: Eliminate ODM_SetBBReg()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:22:44 -08:00
Jes Sorensen 2635f19c7a staging: rtl8723au: odm.c: Further reduce the use of ODM_SetBBReg()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:22:28 -08:00
Jes Sorensen 3f9cb6a093 staging: rtl8723au: Eliminate ODM_GetBBReg()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:14:44 -08:00
Jes Sorensen 53de9947e3 staging: rtl8723au: Get rid of ODM_Read4Byte()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:14:44 -08:00
Jes Sorensen c43b3e319f staging: rtl8723au: Remove various ODM_* register access wrappers
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:14:44 -08:00
Jes Sorensen 4f092cc7ea staging: rtl8723au: Eliminate ODM_Write1Byte()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:14:43 -08:00
Jes Sorensen 2f3cf84fce staging: rtl8723au: odm_ConfigBB_PHY_8723A() always issues 32 bit writes
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:14:43 -08:00
Jes Sorensen 539b61bfd7 staging: rtl8723au: odm_ConfigBB_AGC_8723A() always does 32 bit writes
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:14:43 -08:00
Jes Sorensen a39bd1f53c staging: rtl8723au: odm.c: Use rtl8723au_{read, write}32() for 32 bit register access
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:12:02 -08:00
Jes Sorensen 2c177a8c77 staging: rtl8723au: usb_halinit.c: Use rtl8723au_{read,write}32()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:07:39 -08:00
Jes Sorensen dbe2d4dfde staging: rtl8723au: rtl8723a_phycfg.c: Use proper register read/write functions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:07:39 -08:00
Jes Sorensen b3ced7caa2 staging: rtl8723au: writeOFDMPowerReg() use rtl8723au_write32()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:07:39 -08:00
Jes Sorensen 598fda7b1c staging: rtl8723au: Clean up PHY_{Query,Set}BBReg() 32 bit read/writes
This switches pure 32 bit read/writes to use the
rtl8723au_{read,write}32() functions directly.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:07:39 -08:00
Jes Sorensen bfd83bbe92 staging: rtl8723au: Reduce the usage of ODM_[GS]et_BBReg()
The vendor code has at least three different APIs for accessing
registers. One more ugly than the other. This is the start to move
away from ODM_[GS]et_BBReg()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:07:39 -08:00
Jes Sorensen def0c45058 staging: rtl8723au: Remove pointless wrappers around odm_TXPowerTrackingInit()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:07:39 -08:00
Jes Sorensen bb51449453 staging: rtl8723au: Remove a number of unused entries from struct dm_odm_t
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:07:39 -08:00
Jes Sorensen c2073f3b0d staging: rtl8723au: Remove unused struct rx_hp
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:07:39 -08:00
Marek Belisko dae7f15e53 staging: iio: hmc5843: Set iio name property in sysfs
Without this change file name for hmc5843 is empty in
/sys/bus/iio/devices/iio\:device*/name

With this change name is reported correctly:
cat /sys/bus/iio/devices/iio\:device*/name
hmc5843

Signed-off-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:06:30 -08:00
Fabio Estevam 4c1d2dcb64 staging: dgap: Avoid name collision
Building for ARM64 leads to the following build warning:

In file included from drivers/staging/dgap/dgap.c:66:0:
drivers/staging/dgap/dgap.h:124:0: warning: "PCI_IO_SIZE" redefined
 #define PCI_IO_SIZE  0x00200000
 ^
In file included from ./arch/arm64/include/asm/page.h:66:0,
                 from include/linux/mm_types.h:15,
                 from include/linux/sched.h:27,
                 from ./arch/arm64/include/asm/compat.h:25,
                 from ./arch/arm64/include/asm/stat.h:23,
                 from include/linux/stat.h:5,
                 from include/linux/module.h:10,
                 from drivers/staging/dgap/dgap.c:47:
./arch/arm64/include/asm/memory.h:39:0: note: this is the location of the previous definition
 #define PCI_IO_SIZE  SZ_16M
 ^

Use PCI_IO_SIZE_DGAP to avoid the name collision.

Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:06:30 -08:00
Dmitry Kalinkin c74a804f11 staging: vme: mmap() support for vme_user
We also make sure that user won't be able to reconfigure the window while it is
mmap'ed.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Cc: Martyn Welch <martyn.welch@ge.com>
Cc: Igor Alekseev <igor.alekseev@itep.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:03:22 -08:00
Dmitry Kalinkin 0cd189a42d staging: vme: use image mutex for ioctl()
This implements more granular locking in vme_user_ioctl() by using separate
locks for each devfs device.

This also provides a synchronization between vme_user_read(), vme_user_write()
and vme_user_ioctl().

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Cc: Martyn Welch <martyn.welch@ge.com>
Cc: Igor Alekseev <igor.alekseev@itep.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 17:03:22 -08:00
Matteo Semenzato ad22d55c4b Staging: rtl8192e: remove assignment of function parameter
This patch removes the assignment of a function parameter that has no
effect.

Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:59:53 -08:00
Quentin Lambert b6b0012c2d staging: rtl8192e: Remove unnecessary OOM message
This patch reduces the kernel size by removing error messages that duplicate
the normal OOM message.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)

@@
identifier f,print,l;
expression e;
constant char[] c;
@@

e = \(kzalloc\|kmalloc\|devm_kzalloc\|devm_kmalloc\)(...);
if (e == NULL) {
  <+...
-  print(...,c,...);
  ... when any
(
  goto l;
|
  return ...;
)
  ...+> }

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:59:53 -08:00
Joe Perches d08c028c75 staging: rtl8192x: Remove use of seq_printf return value
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c03 ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:59:53 -08:00
Tolga Ceylan 5877ecc3f7 Staging: rtl8192u: ieee80211: dot11d: added parenthesis to RESET_CIE_WATCHDOG macro
Added parenthesis to RESET_CIE_WATCHDOG macro to resolve checkpatch
error.

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:58:32 -08:00
Tolga Ceylan 6f4380427b Staging: rtl9182u: r819xU_firmware: Replaced C99 comments with C89
Replaced C99 comments with C89.

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:57:13 -08:00
Tolga Ceylan 23723ea046 Staging: rtl8192u: r819xU_firmware: removed commented out assert
Removed an assert that was commented out. The comment provides
no documentation value as rt_status is properly handled.

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:57:13 -08:00
Tolga Ceylan 8edd9e7cf1 Staging: rtl8192u: r819xU_firmware: removed commented out variable
Removed commented out variable

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:57:13 -08:00
Rickard Strandqvist 535f2e7df8 staging: rtl8192u: r8192U_core: Fix driver_info dereference as a null pointer
Fix possible use of use of driver_info as a null pointer in
query_rxdesc_status()
This could happen if stats->RxIs40MHzPacket still has the
default value of zero.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:55:24 -08:00
Benjamin Romer 1b08872e59 staging: unisys: remove LOGWRN() macros and uniklog.h
Remove the last set of macros from uniklog.h. Without LOGWRN() and
friends, uniklog.h is empty so we can delete the file itself as well.

This macro was not used a lot but the file was included in many places.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:50:10 -08:00
Benjamin Romer 0aca78449b staging: unisys: remove ERRDEV macros
Remove the LOGERR, LOGERRDEV, LOGERRDEVX, LOGERRNAME, LOGORDUMPERR
macros from all the drivers.

In one case the removal of the ERRDRV() changed things such that a macro which
returned a value was needed, but the return value was no longer being used. In
this case the macro was replaced with the contents of the macro, but with the
truth calculation removed so that it would not generate a warning.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:50:10 -08:00
Benjamin Romer 61620a1b18 staging: unisys: remove LOGVER macro
Remove the LOGVER macro from the drivers entirely.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:48:44 -08:00
Benjamin Romer 1a84fec171 staging: unisys: remove ASSERT() macro
Remove the ASSERT macro from timskmod.h, and replace its single use with
WARN_ON() instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:48:44 -08:00