Commit Graph

722562 Commits

Author SHA1 Message Date
Dan Carpenter 7679458278 staging: ccree: cleanup a small white space issue
The call to set_flow_mode() was supposed to be on the next line.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:36:14 +01:00
Simon Sandström 9b65e91010 staging: pi433: Add spaces around & and + operator
Fixes checkpatch warning: "spaces preferred around that '&'".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:34:50 +01:00
Simon Sandström 02dd7bc27a staging: pi433: Fix ISO-8859 encoded non-english comments
Some comments, like "without memcpy would be nice", are removed.
Other comments are just translated to english.
rf69.c is now plain ASCII.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:34:49 +01:00
Ioana Radulescu c163685fc8 staging: fsl-dpaa2/eth: Make Tx buffer alignment optional
Aligning the Tx buffers at 64B is a performance optimization
recommendation, not a hard requirement.

Make optional the alignment of Tx FD buffers, without enforcing
a reallocation in case there is not enough headroom for it.

On Rx, we keep allocating buffers with enough headroom to allow
Tx alignment of forwarded frames.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:33:29 +01:00
Ioana Radulescu 18c21467b2 staging: fsl-dpaa2/eth: Compute needed headroom per frame
For non-linear skbs we build scatter-gather frames and allocate
a new buffer for the S/G table in which we reserve the required
headroom, so the actual skb headroom size doesn't matter.

Rather than use a one-size-fits-all approach, decide when to
enforce headroom requirements on a frame by frame basis.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:33:29 +01:00
Ioana Radulescu 2b7c86eb7b staging: fsl-dpaa2/eth: Don't enable FAS on Tx
For Tx confirmed frames that have an error indication in the frame
descriptor, we look at the Frame Annotation Status field (in the
buffer headroom) for details on the root cause and then print
a debug message with that information.

While useful in initial development stages, it doesn't bring
enough added value to justify reserving 64B of headroom for all
Tx frames (FAS is only 8B long, but we must reserve chunks of 64B
from the hardware annotation area).

If we remove the need for FAS field from egress frames, we can
renounce hardware annotation completely, since FAS is the only
HWA field we currently use.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:33:29 +01:00
Ioana Radulescu 6662b5e4ef staging: fsl-dpaa2/eth: Add counter for skb reallocs
Add a counter for the number of egress frames that need to be
realloc'ed due to insufficient headroom space.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:33:29 +01:00
Ioana Radulescu 441851b49a staging: fsl-dpaa2/eth: Don't set netdev->needed_headroom
Commit 4b2d9fe879 ("staging: fsl-dpaa2/eth: Extra headroom in RX
buffers") tried to avoid the performance penalty of doing skb
reallocations in the network stack for IP forwarded frames between
two DPAA2 Ethernet interfaces. This led to a (too) complicated
formula that relies on the stack's internal implementation.

Instead, it's safer and easier to just not request any guarantee
from the stack. We already double check in the driver the required
headroom size of egress frames and realloc the skb if needed, so
we don't need to add any extra code.

On forwarding between two of our own interfaces, there is no
functional change; for traffic forwarded from a different device or
generated on the core, skb realloc operations are moved from the stack
to our driver, with no visible impact on performance.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:33:29 +01:00
Ioana Radulescu 54ce891779 staging: fsl-dpaa2/eth: Fix access to FAS field
Commit 4b2d9fe879 ("staging: fsl-dpaa2/eth: Extra headroom in RX
buffers") removes the software annotation (SWA) area from the RX
buffer layout, as it's not used by anyone, but fails to update the
macros for accessing hardware annotation (HWA) fields, which is
right after the SWA in the buffer headroom.

This may lead to some frame annotation status fields (e.g. indication
if L3/L4 checksum is valid) to be read incorrectly.

Turn the accessor macros into inline functions and add a bool param
to specify if SWA is present or not.

Fixes: 4b2d9fe879 ("staging: fsl-dpaa2/eth: Extra headroom in RX buffers")

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:33:29 +01:00
Nguyen Phan Quang Minh 038a5b4eb3 staging: pi433: pi433_if.c remove SET_CHECKED macro
The macro calls its argument -a function- twice, makes the calling
function return prematurely -skipping resource cleanup code- and hurts
understandability.

Signed-off-by: Nguyen Phan Quang Minh <minhnpq16@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08 16:31:35 +01:00
Akash Kumar 985f0589b9 Staging: rtl8192u: Fix no spaces around '+'
Added spaces around '+'. Warning found using checkpatch.pl
Signed-off-by: Akash Kumar <bholuakku@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-07 15:34:17 +01:00
Luis de Bethencourt 5f10b935d1 staging: lustre: llite: Remove redundant else keyword
There is no need to use 'else' if in main branch 'return' is present.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-07 15:34:17 +01:00
Luis de Bethencourt 30c1e39fb6 staging: lustre: llite: Remove redundant else keyword
There is no need to use 'else' if in main branch 'goto' is present.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-07 15:34:17 +01:00
Luis de Bethencourt ee4bf6ed3a staging: lustre: llite: Remove else after goto
If an "if" branch is terminated by a "goto", there's no need to have an
"else" statement and an indented block of code.

Remove the "else" statement to simplify the code flow.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-07 15:34:17 +01:00
Simon Sandström 54fc95a7c5 staging: pi433: Remove SET_CHECKED usage from pi433_probe
SET_CHECKED returns from the function on failure and in pi433_probe it is
necessary to free the GPIOs and the device on failure.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 22:07:23 +01:00
Simon Sandström 534a2610e1 staging: pi433: Move enum option_on_off to pi433_if.h
The enum is now only used for ioctl, so move it pi433_if.h.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 22:07:23 +01:00
Simon Sandström c5a5bd6bda staging: pi433: Combine all rf69_set_amplifier_x()
Replaces the functions rf69_set_amplifier_1, _2, _3 with two
functions: rf69_enable_amplifier(dev, amp_mask) and
rf69_disable_amplifier(dev, amp_mask).

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 22:07:23 +01:00
Simon Sandström b92025a80c staging: pi433: Remove enum data_mode
Call rf69_set_data_mode with DATAMODUL_MODE value directly.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 22:07:23 +01:00
Simon Sandström 966debe09e staging: pi433: Split rf69_set_sync_enabled into two functions
Splits rf69_set_sync_enabled(dev, enabled) into
rf69_enable_sync(dev) and rf69_disable_sync(dev).

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 22:07:23 +01:00
Simon Sandström 39252a4bcf staging: pi433: Split rf69_set_crc_enabled into two functions
Splits rf69_set_crc_enabled(dev, enabled) into
rf69_enable_crc(dev) and rf69_disable_crc(dev).

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 22:07:23 +01:00
Pravin Shedge b89da27e10 drivers: staging: remove duplicate includes
These duplicate includes have been found with scripts/checkincludes.pl but
they have been removed manually to avoid removing false positives.

Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 18:26:05 +01:00
David Kershner 765e06f2ec staging: unisys: move dependencies from UNISYSSPAR to VISORBUS
The Kconfig flag UNISYSSPAR depended on ACPI and X86, these dependencies
really belong to visorbus, so move them there.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 17:48:26 +01:00
David Kershner f09177adbe staging: unisys: combine visorchannel.h and visorbus.h
Combine the include files visorchannel.h and visorbus.h so that only one
include file is needed for the .c files.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 17:48:26 +01:00
David Kershner e816d1f92e staging: unisys: remove !UML flag
Remove the dependency that the drivers are not built during UML.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 17:48:26 +01:00
David Kershner a51cf83d73 staging: unisys: fix dependencies with UNISYSSPAR Kconfig flag
The Kconfig file for UNISYSSPAR uses select ACPI and select PCI instead of
depends on ACPI. This patch fixes the problem.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 17:48:26 +01:00
Simon Sandström 494b11b662 staging: pi433: Rename enum modShaping in rf69_enum.h
Renames enum modShaping and its values to get rid of checkpatch.pl
warnings: "Avoid CamelCase: <modShaping>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 16:14:11 +01:00
Marcus Wolf d7b8943cf4 staging: pi433: rf69.c: Replace macros READ_REG and WRITE_REG with smarter functions
To increase the readability of the register accesses, the abstraction
of the helpers was increased from simple read and write to set bit,
clear bit and read modify write bit.

Annotation: This patch contains a lot of long lines and camel case
var names. These long lines and camel case vars weren't introduced
by this patch, but were long and camel cased before.

Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 16:08:40 +01:00
Simon Sandström d423c80929 staging: pi433: Rename enum optionOnOff in rf69_enum.h
Renames the enum optionOnOff and its values optionOn, optionOff to enum
option_on_off and OPTION_ON, OPTION_OFF. Fixes checkpatch.pl warnings:
"Avoid CamelCase: <optionOnOff>, <optionOn>, <optionOff>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 16:03:52 +01:00
Simon Sandström 5e656e3512 staging: pi433: Rename variable in struct pi433_rx_cfg
Renames variable thresholdDecrement in struct pi433_rx_cfg to
threshold_decrement to get rid of checkpatch.pl warning
"Avoid CamelCase: <thresholdDecrement>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 16:02:13 +01:00
Simon Sandström 3d7f3bf241 staging: pi433: Capitalize constant definitions
Fixes checkpatch.pl warnings "Avoid CamelCase <DIO_x>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 16:02:13 +01:00
Simon Sandström 21a9758984 staging: pi433: Fix indentation in rf69_enum.h
Basically just 's/    /\t/', to fix checkpatch.pl warnings:
"please, no spaces at the start of a line".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 16:02:13 +01:00
Andrii 6e6e26f91b staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap()
Change 0 to NULL in lov_object_fiemap() in order to fix warning produced by
sparse

Signed-off-by: Andrii Vladyka <tulup@mail.ru>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 15:56:47 +01:00
Greg Kroah-Hartman e8cd29b774 Merge Linus's staging merge point into staging-next
This resolves the merge issue pointed out by Stephen in
drivers/iio/adc/meson_saradc.c.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 15:27:17 +01:00
Ashish Kalra 7e739297cd staging: dgnc: add identifiers to function parameters
Fix checkpatch.pl warnings of the form "function definition argument
'foo' should also have an identifier name".

Signed-off-by: Ashish Kalra <eashishkalra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 10:08:21 +01:00
Ashish Kalra 43aa37d522 staging: android: add identifiers to function parameters
Fix checkpatch.pl warnings of the form "function definition argument
'foo' should also have an identifier name".

Signed-off-by: Ashish Kalra <eashishkalra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 10:05:06 +01:00
Ashish Kalra ba2d563f82 staging: android: Fix checkpatch.pl error
fixed CHECK: Lines should not end with a '('
reported by checkpatch.pl

Signed-off-by: Ashish Kalra <eashishkalra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 10:05:06 +01:00
Zebulon McCorkle 848d9eabca staging: olpc_dcon: Line up parentheses in func calls and defs
Line up arguments to opening parentheses and ensure lines stay under 80
columns, since checkpatch.pl was complaining about incorrect indentation
in function calls and definitions.

Signed-off-by: Zebulon McCorkle <zebmccorkle@zeb.fun>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 10:00:30 +01:00
Zebulon McCorkle f3b7e9019d staging: olpc_dcon: Change bitshifts to BIT macro
checkpatch.pl reported the bitshifts (1<<x) as a style violation, so
change them to the BIT macro (BIT(x)).

Signed-off-by: Zebulon McCorkle <zebmccorkle@zeb.fun>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 10:00:30 +01:00
Joshua Abraham f8de92c9f6 staging: xgifb: remove macros with hidden variable
This patch removes macros in XGI_main.h that contain a xgifb_info
variable.  These macros hurt readability by hiding said variable
behind a define.  It also uses a temporary variable to keep the
replaced code from getting too long.

Signed-off-by: Joshua Abraham <j.abraham1776@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:59:27 +01:00
Gilad Ben-Yossef 9911bac0cb staging: ccree: amend aead func def for readability
Func definitions in the aead implementation were did not adhere to
coding style. Fix them for better readability.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef a05db75cfa staging: ccree: fix AEAD func naming convention
The aead files was using a func naming convention which was inconsistent
(ssi vs. cc), included a useless prefix (ssi_aead) and often used
too long function names producing monster func names such as
ssi_aead_gcm_setup_ghash_desc() that made the call site code hard
to read.

Make the code more readable by switching to a simpler, consistent naming
conventionfor all the function defined in the file.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef 46df882498 staging: ccree: NULLify backup_info when unused
backup_info field is only allocated for decrypt code path.
The field was not nullified when not used causing a kfree
in an error handling path to attempt to free random
addresses as uncovered in stress testing.

Fixes: 737aed947f ("staging: ccree: save ciphertext for CTS IV")
Cc: stable@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef 0d527ecc48 staging: ccree: update TODO list
Update the ccree staging TODO list in light of recent work.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef d381f94894 staging: ccree: remove interim DT docs
As proper DT bindings doc where submitted and ACKed,
remove the interim one.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef 40def03a52 staging: ccree: remove braces for single statement blocks
Remove braces from single statement if clause.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef 1b37844735 staging: ccree: fix indentation of var assignment
Fix indentation of var assignment split across lines for
better readability.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef 38b6db1b5d staging: ccree: remove more unnecessary parentheses
The removal of likely/unlikely unearthed some more
unnecessary parentheses. Remove them for better readability.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef 9db83b4e4e staging: ccree: remove unproven likely/unlikely
The ccree code made a lot of use of likely/unlikely qualifiers without
proven measurements showing any benefits. Remove them all until we
see what is justified and what is not.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Gilad Ben-Yossef 8977c8248f staging: ccree: remove inline qualifiers
The ccree drivers was marking a lot of big functions in C file as
static inline for no good reason. Remove the inline qualifier from
any but the few truly single line functions.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:55:15 +01:00
Genki Sky 44208cf32e staging: vc04_services: Use __func__
This was found using checkpatch.pl's EMBEDDED_FUNCTION_NAME warning.
It is easier to be consistent and always use __func__ instead of having
to remember to update any hardcoded references to the original name.

Signed-off-by: Genki Sky <sky@genki.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06 09:48:54 +01:00