platform/kernel/linux-rpi.git
6 years agostaging:rtl8192u: Rename member variables - Style
John Whitmore [Sat, 28 Jul 2018 23:14:47 +0000 (00:14 +0100)]
staging:rtl8192u: Rename member variables - Style

Rename the member variables of union aci_aifsn, which should be named
in lowercase. The only member variable, of this union, which is
actually used is 'acm'.

This are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename ACI_AIFSN - Style
John Whitmore [Sat, 28 Jul 2018 23:14:46 +0000 (00:14 +0100)]
staging:rtl8192u: Rename ACI_AIFSN - Style

Rename the union ACI_AIFSN to aci_aifsn and remove the typedef directive.

The removal of the typedef clears the checkpatch issue with defining
new types. The renaming is to adhere to the coding style where types
are name in lower case.

These changes are coding style changes which should have no impact on
runtime execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Add spaces around operators - Style
John Whitmore [Sat, 28 Jul 2018 23:14:45 +0000 (00:14 +0100)]
staging:rtl8192u: Add spaces around operators - Style

Add the required spaces around '+' and '*' operators. This is a
coding style change to clear the checkpatch issue. There should be
no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unnecessary parentheses
Michael Straube [Sun, 29 Jul 2018 18:54:47 +0000 (20:54 +0200)]
staging: rtl8188eu: remove unnecessary parentheses

Remove unnecessary parentheses, also clears checkpatch issues about
missing spaces around '-'.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: fix comparsion to true
Michael Straube [Sun, 29 Jul 2018 18:54:46 +0000 (20:54 +0200)]
staging: rtl8188eu: fix comparsion to true

Use if(x) instead of if(x == true).

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: replace tabs with spaces
Michael Straube [Sun, 29 Jul 2018 18:54:45 +0000 (20:54 +0200)]
staging: rtl8188eu: replace tabs with spaces

Replace tabs with spaces in function definition and variable
declarations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove redundant includes
Michael Straube [Sun, 29 Jul 2018 18:54:44 +0000 (20:54 +0200)]
staging: rtl8188eu: remove redundant includes

Both osdep_service.h and drv_types.h are included from hal_intf.h,
so remove the redundant includes from hal_intf.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused should_forbid_n_rate()
Michael Straube [Sun, 29 Jul 2018 18:54:42 +0000 (20:54 +0200)]
staging: rtl8188eu: remove unused should_forbid_n_rate()

The function should_forbid_n_rate() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused dump_txrpt_ccx_88e()
Michael Straube [Sun, 29 Jul 2018 18:54:41 +0000 (20:54 +0200)]
staging: rtl8188eu: remove unused dump_txrpt_ccx_88e()

The function dump_txrpt_ccx_88e() is nerver used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: apex: fix function param line continuation style
Todd Poynor [Sun, 29 Jul 2018 19:36:46 +0000 (12:36 -0700)]
staging: gasket: apex: fix function param line continuation style

Fix multi-line alignment formatting to look like:
      int ret = long_function_name(device, VARIABLE1, VARIABLE2,
                                   VARIABLE3, VARIABLE4);

Many of these TODO items were previously cleaned up during the conversion
to standard logging functions.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: apex: remove static function forward declarations
Todd Poynor [Sun, 29 Jul 2018 19:36:45 +0000 (12:36 -0700)]
staging: gasket: apex: remove static function forward declarations

Remove forward declarations of static functions, move code to avoid
forward references, for kernel style.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: TODO: remove entry for static function kernel docs
Todd Poynor [Sun, 29 Jul 2018 19:36:44 +0000 (12:36 -0700)]
staging: gasket: TODO: remove entry for static function kernel docs

Remove the TODO entry for simplifying kernel doc style comments for
static functions, now that this has been addressed.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: sysfs: simplify comments for static functions
Todd Poynor [Sun, 29 Jul 2018 19:36:43 +0000 (12:36 -0700)]
staging: gasket: sysfs: simplify comments for static functions

Static functions don't need kernel doc formatting, can be simplified.
Reformat comments that can be single-line.  Remove extraneous text.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: interrupt: simplify comments for static functions
Todd Poynor [Sun, 29 Jul 2018 19:36:42 +0000 (12:36 -0700)]
staging: gasket: interrupt: simplify comments for static functions

Static functions don't need kernel doc formatting, can be simplified.
Reformat comments that can be single-line.  Remove extraneous text.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: page table: simplify comments for static functions
Todd Poynor [Sun, 29 Jul 2018 19:36:41 +0000 (12:36 -0700)]
staging: gasket: page table: simplify comments for static functions

Static functions don't need kernel doc formatting, can be simplified.
Reformat comments that can be single-line.  Remove extraneous text.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: ioctl: simplify comments for static functions
Todd Poynor [Sun, 29 Jul 2018 19:36:40 +0000 (12:36 -0700)]
staging: gasket: ioctl: simplify comments for static functions

Static functions don't need kernel doc formatting, can be simplified.
Reformat comments that can be single-line.  Remove extraneous text.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: core: simplify comments for static functions
Todd Poynor [Sun, 29 Jul 2018 19:36:39 +0000 (12:36 -0700)]
staging: gasket: core: simplify comments for static functions

Static functions don't need kernel doc formatting, can be simplified.
Reformat comments that can be single-line.  Remove extraneous text.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: apex: simplify comments for static functions
Todd Poynor [Sun, 29 Jul 2018 19:36:38 +0000 (12:36 -0700)]
staging: gasket: apex: simplify comments for static functions

Static functions don't need kernel doc formatting, can be simplified.
Reformat comments that can be single-line.  Remove extraneous text.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: core: allow root access based on user namespace
Todd Poynor [Sun, 29 Jul 2018 19:36:37 +0000 (12:36 -0700)]
staging: gasket: core: allow root access based on user namespace

Use user namespace to determine whether gasket device file opener is
root, allowing root access to containers, if necessary.

Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: page table: hold references to device and pci_dev
Todd Poynor [Sun, 29 Jul 2018 19:36:36 +0000 (12:36 -0700)]
staging: gasket: page table: hold references to device and pci_dev

Hold references to the struct device and the pci_dev for the page table
while the data structures contian pointers to these.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: sysfs: hold reference to device while in use
Todd Poynor [Sun, 29 Jul 2018 19:36:35 +0000 (12:36 -0700)]
staging: gasket: sysfs: hold reference to device while in use

Hold a reference to the struct device while a gasket sysfs mapping
exists for the device and a pointer to the struct is kept in the mapping
data structures.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: core: hold reference to pci_dev while used
Todd Poynor [Sun, 29 Jul 2018 19:36:34 +0000 (12:36 -0700)]
staging: gasket: core: hold reference to pci_dev while used

Hold a reference on the struct pci_dev while a pointer to it is held in
the gasket data structures.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "staging:r8188eu: Use lib80211 to encrypt (TKIP) tx frames"
Greg Kroah-Hartman [Mon, 30 Jul 2018 08:46:03 +0000 (10:46 +0200)]
Revert "staging:r8188eu: Use lib80211 to encrypt (TKIP) tx frames"

This reverts commit 0d4876f4e977798238db594321db9184704fcf5d as it
breaks the build once 4.18-rc7 was merged into the staging-next tree.

Cc: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMerge 4.18-rc7 into staging-next
Greg Kroah-Hartman [Mon, 30 Jul 2018 08:13:15 +0000 (10:13 +0200)]
Merge 4.18-rc7 into staging-next

We want the staging changes in here for testing and merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: use the wrapped PTR_ERR_OR_ZERO instead of open code
Gao Xiang [Mon, 30 Jul 2018 01:51:01 +0000 (09:51 +0800)]
staging: erofs: use the wrapped PTR_ERR_OR_ZERO instead of open code

Just clean up and logic doesn't change.

Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050766.html
Fixes: d72d1ce60174 ("staging: erofs: add namei functions")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoLinux 4.18-rc7
Linus Torvalds [Sun, 29 Jul 2018 21:44:52 +0000 (14:44 -0700)]
Linux 4.18-rc7

6 years agoMerge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 29 Jul 2018 20:13:45 +0000 (13:13 -0700)]
Merge tag 'ext4_for_linus_stable' of git://git./linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Some miscellaneous ext4 fixes for 4.18; one fix is for a regression
  introduced in 4.18-rc4.

  Sorry for the late-breaking pull. I was originally going to wait for
  the next merge window, but Eric Whitney found a regression introduced
  in 4.18-rc4, so I decided to push out the regression plus the other
  fixes now. (The other commits have been baking in linux-next since
  early July)"

* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix check to prevent initializing reserved inodes
  ext4: check for allocation block validity with block group locked
  ext4: fix inline data updates with checksums enabled
  ext4: clear mmp sequence number when remounting read-only
  ext4: fix false negatives *and* false positives in ext4_check_descriptors()

6 years agosquashfs: be more careful about metadata corruption
Linus Torvalds [Sun, 29 Jul 2018 19:44:46 +0000 (12:44 -0700)]
squashfs: be more careful about metadata corruption

Anatoly Trosinenko reports that a corrupted squashfs image can cause a
kernel oops.  It turns out that squashfs can end up being confused about
negative fragment lengths.

The regular squashfs_read_data() does check for negative lengths, but
squashfs_read_metadata() did not, and the fragment size code just
blindly trusted the on-disk value.  Fix both the fragment parsing and
the metadata reading code.

Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Phillip Lougher <phillip@squashfs.org.uk>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
6 years agoext4: fix check to prevent initializing reserved inodes
Theodore Ts'o [Sat, 28 Jul 2018 12:12:04 +0000 (08:12 -0400)]
ext4: fix check to prevent initializing reserved inodes

Commit 8844618d8aa7: "ext4: only look at the bg_flags field if it is
valid" will complain if block group zero does not have the
EXT4_BG_INODE_ZEROED flag set.  Unfortunately, this is not correct,
since a freshly created file system has this flag cleared.  It gets
almost immediately after the file system is mounted read-write --- but
the following somewhat unlikely sequence will end up triggering a
false positive report of a corrupted file system:

   mkfs.ext4 /dev/vdc
   mount -o ro /dev/vdc /vdc
   mount -o remount,rw /dev/vdc

Instead, when initializing the inode table for block group zero, test
to make sure that itable_unused count is not too large, since that is
the case that will result in some or all of the reserved inodes
getting cleared.

This fixes the failures reported by Eric Whiteney when running
generic/230 and generic/231 in the the nojournal test case.

Fixes: 8844618d8aa7 ("ext4: only look at the bg_flags field if it is valid")
Reported-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
6 years agostaging: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Sun, 29 Jul 2018 11:19:26 +0000 (19:19 +0800)]
staging: fix platform_no_drv_owner.cocci warnings

drivers/staging/axis-fifo/axis-fifo.c:1081:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core")
CC: Jacob Feder <jacobsfeder@gmail.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused rtw_calculate_wlan_pkt_size_by_attribue()
Michael Straube [Sat, 28 Jul 2018 14:29:17 +0000 (16:29 +0200)]
staging: rtl8188eu: remove unused rtw_calculate_wlan_pkt_size_by_attribue()

The function rtw_calculate_wlan_pkt_size_by_attribue() also defined as
rtw_wlan_pkt_size() is never used, so remove it. Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: replace tabs with spaces
Michael Straube [Sat, 28 Jul 2018 14:29:16 +0000 (16:29 +0200)]
staging: rtl8188eu: replace tabs with spaces

Replace tabs with spaces, clears a checkpatch 'line over 80 characters'
warning.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: fix comparsions to NULL - coding style
Michael Straube [Sat, 28 Jul 2018 14:29:15 +0000 (16:29 +0200)]
staging: rtl8188eu: fix comparsions to NULL - coding style

Use !x instead of x == NULL.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove unused DM_check_fsync_time_interval - Style
John Whitmore [Fri, 27 Jul 2018 23:28:17 +0000 (00:28 +0100)]
staging:rtl8192u: Remove unused DM_check_fsync_time_interval - Style

Remove the unused definition for DM_check_fsync_time_interval.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove blank line - Style
John Whitmore [Fri, 27 Jul 2018 17:31:23 +0000 (18:31 +0100)]
staging:rtl8192u: Remove blank line - Style

Remove a blank line to clear the checkpatch issue with use of multiple
blank lines.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename RxLastFragNum - Style
John Whitmore [Fri, 27 Jul 2018 17:31:22 +0000 (18:31 +0100)]
staging:rtl8192u: Rename RxLastFragNum - Style

Rename the member variable RxLastFragNum to rx_last_frag_num. This
change clears the checkpatch issue with CamelCase naming.

The resulting edits are all coding style changes which should have
no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename RxLastSeqNum - Style
John Whitmore [Fri, 27 Jul 2018 17:31:21 +0000 (18:31 +0100)]
staging:rtl8192u: Rename RxLastSeqNum - Style

Rename the member variable RxLastSeqNum to rx_last_seq_num. This change
clears the checkpatch issue with CamelCase naming.

The resulting changes are purely coding style in nature so should have
no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename RxAdmittedBARecord - Style
John Whitmore [Fri, 27 Jul 2018 17:31:20 +0000 (18:31 +0100)]
staging:rtl8192u: Rename RxAdmittedBARecord - Style

Rename the member variable RxAdmittedBARecord to rx_admitted_ba_record.
This change clears the checkpatch issue with CamelCase naming.

The resulting changes are coding style in nature and as such should have
no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename RxPktPendingTimer - Style
John Whitmore [Fri, 27 Jul 2018 17:31:19 +0000 (18:31 +0100)]
staging:rtl8192u: Rename RxPktPendingTimer - Style

Rename the member variable RxPktPendingTimer to rx_pkt_pending_timer.
This change clears the checkpatch issue with CamelCase naming.

The resulting changes are coding style changes in nature so should
have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename RxPendingPktList - Style
John Whitmore [Fri, 27 Jul 2018 17:31:18 +0000 (18:31 +0100)]
staging:rtl8192u: Rename RxPendingPktList - Style

Rename the member variable RxPendingPktList to rx_pending_pkt_list.
This change resolves the checkpatch issue with CamelCase naming.

The resulting changes are purely coding style changes which should have
no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename RxTimeoutIndicateSeq _Style
John Whitmore [Fri, 27 Jul 2018 17:31:17 +0000 (18:31 +0100)]
staging:rtl8192u: Rename RxTimeoutIndicateSeq _Style

Rename member variable RxTimeoutIndicateSeq to rx_timeout_indicate_seq.
This change clears the checkpatch issue with CamelCase naming.

The resulting changes are purely coding style in nature and should have
no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename RxIndicateSeq - Style
John Whitmore [Fri, 27 Jul 2018 17:31:16 +0000 (18:31 +0100)]
staging:rtl8192u: Rename RxIndicateSeq - Style

Rename the member variable RxIndicateSeq to rx_indicate_seq. This change
clears the checkpatch issue with CamelCase naming.

The resulting changes are purely coding style changes which should have
no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove unused timer values - Style
John Whitmore [Fri, 27 Jul 2018 17:31:15 +0000 (18:31 +0100)]
staging:rtl8192u: Remove unused timer values - Style

Remove the unused timer constants TS_SETUP_TIMEOUT and TS_INACT_TIMEOUT
as neither are used in code.

This is a style change which should have no impact on runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove commented out code - Style
John Whitmore [Fri, 27 Jul 2018 17:31:14 +0000 (18:31 +0100)]
staging:rtl8192u: Remove commented out code - Style

Remove commented out sections of code, specifically for a structure,
QOS_DL_RECORD, which no longer exists in the module.

This change is a coding style change which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove typedef and rename RX_TS_RECORD - Style
John Whitmore [Fri, 27 Jul 2018 17:31:13 +0000 (18:31 +0100)]
staging:rtl8192u: Remove typedef and rename RX_TS_RECORD - Style

Remove the typedef from structure RX_TS_RECORD, this change clears the
checkpatch issue with creation of new types.

Additionally the structure is renamed from RX_TS_RECORD to rx_ts_record.
Whilst this is not raised as a checkpatch error structures are meant to
be named in lower case.

These changes are coding style changes which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename TsAddBaTimer - Style
John Whitmore [Fri, 27 Jul 2018 17:31:12 +0000 (18:31 +0100)]
staging:rtl8192u: Rename TsAddBaTimer - Style

Rename the member variable TsAddBaTimer to ts_add_ba_timer. This change
clears the checkpatch issue with CamelCase naming.

The resulting changes are coding style in nature and as such should not
have any impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename bUsingBa - Style
John Whitmore [Fri, 27 Jul 2018 17:31:11 +0000 (18:31 +0100)]
staging:rtl8192u: Rename bUsingBa - Style

Rename the member variable bUsingBa to using_ba. This change clears the
checkpatch issue with CamelCase naming.

The resulting changes are purely coding style and should not impact
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename bAddBaReqDelayed - Style
John Whitmore [Fri, 27 Jul 2018 17:31:10 +0000 (18:31 +0100)]
staging:rtl8192u: Rename bAddBaReqDelayed - Style

Rename the member variable bAddBaReqDelayed to add_ba_req_delayed
This change clears the checkpatch issue with CamelCase naming.

The resulting changes are purely coding style changes which should
have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename bAddBaReqInProgress - Style
John Whitmore [Fri, 27 Jul 2018 17:31:09 +0000 (18:31 +0100)]
staging:rtl8192u: Rename bAddBaReqInProgress - Style

Rename the member variable bAddBaReqInProgress to add_ba_req_in_progress
This change clears the checkpatch issue with CamelCase naming.

Changes are purely coding style and should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename TxAdmittedBARecord - Style
John Whitmore [Fri, 27 Jul 2018 17:31:08 +0000 (18:31 +0100)]
staging:rtl8192u: Rename TxAdmittedBARecord - Style

Rename the member variable TxAdmittedBARecord to tx_admitted_ba_record
This change clears the checkpatch issue with CamelCase naming.

The resulting changes are purely coding style changes which should not
impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename TxPendingBARecord - Style
John Whitmore [Fri, 27 Jul 2018 17:31:07 +0000 (18:31 +0100)]
staging:rtl8192u: Rename TxPendingBARecord - Style

Rename the member variable TxPendingBARecord to tx_pending_ba_record.
This change clears the checkpatch issue with CamelCase naming.

The changes are purely coding style changes and should not impact
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename TxCurSeq - Style
John Whitmore [Fri, 27 Jul 2018 17:31:06 +0000 (18:31 +0100)]
staging:rtl8192u: Rename TxCurSeq - Style

Rename the member variable TxCurSeq to tx_cur_seq. This change clears
the checkpatch issue with CamelCase naming.

The changes are coding style changes which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename TsCommonInfo - Style
John Whitmore [Fri, 27 Jul 2018 17:31:05 +0000 (18:31 +0100)]
staging:rtl8192u: Rename TsCommonInfo - Style

Rename the member variable TsCommonInfo in two structures, both
tx_ts_record and RX_TS_RECORD. This member variable is used in both
structures and in both cases causes a checkpatch issue with CamelCase
naming.

The changes are purely coding style and should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove typedef and rename TX_TS_RECORD - Style
John Whitmore [Fri, 27 Jul 2018 17:31:04 +0000 (18:31 +0100)]
staging:rtl8192u: Remove typedef and rename TX_TS_RECORD - Style

Remove the typdef from structure TX_TS_RECORD and rename to tx_ts_record.
The removal of the typedef clears the checkpatch issue with creating new
types in code. The name change, whilst not specifically flagged by
checkpatch, is an issue since types are meant to be named in lowercase.

These changes are purely coding style changes and should have no impact
on runtime execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename eRFPath - Style
John Whitmore [Thu, 26 Jul 2018 19:24:26 +0000 (20:24 +0100)]
staging:rtl8192u: Rename eRFPath - Style

Rename the variable eRFPath to e_rfpath. This change resolves a
checkpatch issue with CamelCase naming. The variable name is used both
as a parameter name in function definitions, function prototypes and as
a local variable.

This change is purely a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove repeated definitions - Style
John Whitmore [Thu, 26 Jul 2018 19:24:25 +0000 (20:24 +0100)]
staging:rtl8192u: Remove repeated definitions - Style

Remove bit field masks which are defined in two files: r819xU_phy.h
and r819xU_phyreg.h. Or in the case of bMaskByte3 defined but never used.

The definitions have been removed from the file r819xU_phy.h.

This is a coding style change, which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename RF90_RADIO_PATH_E - Style
John Whitmore [Thu, 26 Jul 2018 19:24:24 +0000 (20:24 +0100)]
staging:rtl8192u: Rename RF90_RADIO_PATH_E - Style

Rename the enumerated type RF90_RADIO_PATH_E to rf90_radio_path_e.
Whilst it is not flagged as an issue by checkpatch, types are meant
to be named in lowercase.

This change is purely a coding style change which should have no
impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename HW90_BLOCK_E - Style
John Whitmore [Thu, 26 Jul 2018 19:24:23 +0000 (20:24 +0100)]
staging:rtl8192u: Rename HW90_BLOCK_E - Style

Rename the enumerated type HW90_BLOCK_E to hw90_block_e. Whilst this is
not flagged by checkpatch types are meant to be in lowercase.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove proxy rtl819XRadioD_Array - Style
John Whitmore [Thu, 26 Jul 2018 19:24:22 +0000 (20:24 +0100)]
staging:rtl8192u: Remove proxy rtl819XRadioD_Array - Style

Remove the array rtl819XRadioD_Array which is only acting as a proxy to
the real array Rtl8192UsbRadioD_Array.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove proxy rtl819XRadioC_Array - Style
John Whitmore [Thu, 26 Jul 2018 19:24:21 +0000 (20:24 +0100)]
staging:rtl8192u: Remove proxy rtl819XRadioC_Array - Style

Remove the array rtl819XRadioC_Array which is only serving as a proxy for
the real array Rtl8192UsbRadioC_Array. This is a coding style change and
should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove proxy rtl819XRadioB_Array - Style
John Whitmore [Thu, 26 Jul 2018 19:24:20 +0000 (20:24 +0100)]
staging:rtl8192u: Remove proxy rtl819XRadioB_Array - Style

Remove the array rtl819XRadioB_Array Rtl8192UsbRadioB_Array which acts
as a proxy the actual array Rtl8192UsbRadioB_Array. The only purpose, I
can see for this implementation is to obscure the actual array being
used Rtl8192UsbRadioB_Array.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove proxy rtl819XRadioA_Array - Style
John Whitmore [Thu, 26 Jul 2018 19:24:19 +0000 (20:24 +0100)]
staging:rtl8192u: Remove proxy rtl819XRadioA_Array - Style

The array rtl819XRadioA_Array serves as a proxy array for the actual
array Rtl8192UsbRadioA_Array. This implementation seems to serve no
other purpose then to obscure the actually array Rtl8192UsbRadioA_Array.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove proxy array rtl819XAGCTAB_Array - Style
John Whitmore [Thu, 26 Jul 2018 19:24:18 +0000 (20:24 +0100)]
staging:rtl8192u: Remove proxy array rtl819XAGCTAB_Array - Style

Remove the array rtl819XAGCTAB_Array which is only a proxy to the
array Rtl8192UsbAGCTAB_Array. There appears to be no purpose
served by this implementation, other then to obscure the
Rtl8192UsbAGCTAB_Array structure, which is actually written to and
read from.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove proxy struct rtl819XPHY_REG_1T2RArray - Style
John Whitmore [Thu, 26 Jul 2018 19:24:17 +0000 (20:24 +0100)]
staging:rtl8192u: Remove proxy struct rtl819XPHY_REG_1T2RArray - Style

Remove the struct rtl819XPHY_REG_1T2RArray which is simply a proxy for
the struct Rtl8192UsbPHY_REG_1T2RArray. There appears to be no purpose
served by this implementation, other then to obscure the
Rtl8192UsbPHY_REG_1T2RArray structure.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove proxy struct rtl819XMACPHY_Array_PG - Style
John Whitmore [Thu, 26 Jul 2018 19:24:16 +0000 (20:24 +0100)]
staging:rtl8192u: Remove proxy struct rtl819XMACPHY_Array_PG - Style

Remove the struct rtl819XMACPHY_Array_PG which is simply a proxy for
the struct Rtl8192UsbMACPHY_Array_PG. There appears to be no purpose
served by this implementation, other then to obscure the
Rtl8192UsbMACPHY_Array_PG structure.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename msDelay to ms_delay - Style
John Whitmore [Thu, 26 Jul 2018 19:24:15 +0000 (20:24 +0100)]
staging:rtl8192u: Rename msDelay to ms_delay - Style

Rename the member variable msDelay to ms_delay. This change clears the
checkpatch issue with CamelCase naming. The change is purely a coding
style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename Para2 to para_2 - style
John Whitmore [Thu, 26 Jul 2018 19:24:14 +0000 (20:24 +0100)]
staging:rtl8192u: Rename Para2 to para_2 - style

Rename member variable Para2 to para_2. This change clears the checkpatch
issue with CamelCase naming. The change is purely a coding style change
and should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename Para1 > para_1 - Style
John Whitmore [Thu, 26 Jul 2018 19:24:13 +0000 (20:24 +0100)]
staging:rtl8192u: Rename Para1 > para_1 - Style

Rename the member variable Para1 to para_1. This change clears the
checkpatch issue with CamelCase naming. The change is purely a coding
style change and should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename CmdID - Style
John Whitmore [Thu, 26 Jul 2018 19:24:12 +0000 (20:24 +0100)]
staging:rtl8192u: Rename CmdID - Style

Rename the member variable CmdId to cmd_id. This change clears the
checkpatch issue with CamelCase naming. The change is purely a coding
style change which should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename SwChnlCmd - Style
John Whitmore [Thu, 26 Jul 2018 19:24:11 +0000 (20:24 +0100)]
staging:rtl8192u: Rename SwChnlCmd - Style

Rename the structure SwChnlCmd to sw_chnl_cmd. This change clears the
checkpatch issue with CamelCase naming. The change is purely a coding
style change and should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove multiple blank lines - Style
John Whitmore [Wed, 25 Jul 2018 22:16:27 +0000 (23:16 +0100)]
staging:rtl8192u: Remove multiple blank lines - Style

Remove multiple blank lines, raise a checkpatch issue. This is purely
a coding style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename ISR_BcnTimerIntr - Style
John Whitmore [Wed, 25 Jul 2018 22:16:26 +0000 (23:16 +0100)]
staging:rtl8192u: Rename ISR_BcnTimerIntr - Style

Rename the bit definition ISR_BcnTimerIntr to ISR_BCN_TIMER_INTR. This
change clears the checkpatch issue with CamelCase naming. The change is
purely a style change and should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename ISR_TxBcnErr bit definition - Style
John Whitmore [Wed, 25 Jul 2018 22:16:25 +0000 (23:16 +0100)]
staging:rtl8192u: Rename ISR_TxBcnErr bit definition - Style

Rename the bit definition ISR_TxBcnErr to ISR_TX_BCN_ERR. This change
clears the checkpatch issue with CamelCase naming. The change is purely
a coding style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Rename bit definition ISR_TxBcnOk - Style
John Whitmore [Wed, 25 Jul 2018 22:16:23 +0000 (23:16 +0100)]
staging:rtl8192u: Rename bit definition ISR_TxBcnOk - Style

Rename the bit definition ISR_TxBcnOk to ISR_TX_BCN_OK. This change
clears the checkpatch issue with CamelCase naming. The change is a
coding style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused rtw_get_oper_choffset()
Michael Straube [Wed, 25 Jul 2018 19:37:58 +0000 (21:37 +0200)]
staging: rtl8188eu: remove unused rtw_get_oper_choffset()

The function rtw_get_oper_choffset() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused rtw_get_oper_bw()
Michael Straube [Wed, 25 Jul 2018 19:37:57 +0000 (21:37 +0200)]
staging: rtl8188eu: remove unused rtw_get_oper_bw()

The function rtw_get_oper_bw() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused CAM_empty_entry()
Michael Straube [Wed, 25 Jul 2018 19:37:56 +0000 (21:37 +0200)]
staging: rtl8188eu: remove unused CAM_empty_entry()

The function CAM_empty_entry() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused ODM_RASupport_Init()
Michael Straube [Wed, 25 Jul 2018 19:37:55 +0000 (21:37 +0200)]
staging: rtl8188eu: remove unused ODM_RASupport_Init()

The function ODM_RASupport_Init() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: correction to comment in hfa384x_usb
Tim Collier [Wed, 25 Jul 2018 19:30:32 +0000 (20:30 +0100)]
staging: wlan-ng: correction to comment in hfa384x_usb

The comment for hfa384x_docmd incorrectly states that usercb_data
should be NULL for DOASYNC calls; in fact, it should be NULL for
DOWAIT calls (this is consistent with the other similar functions and
the rest of the comment text).

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: remove volatile from reapable field in hfa384x_usbctlx
Tim Collier [Wed, 25 Jul 2018 19:30:31 +0000 (20:30 +0100)]
staging: wlan-ng: remove volatile from reapable field in hfa384x_usbctlx

Fix checkpatch.pl warning:

"Use of volatile is usually wrong: see
Documentation/process/volatile-considered-harmful.rs"

reapable is not used to access h/w directly, so volatile is not
necessary.

>From reading the code, the contexts in which the field may be
updated/accessed across threads are protected by the hw->ctlxq.lock
spinlock, where hw is the device struct, so appears thread-safe.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused sreset_get_wifi_status()
Michael Straube [Thu, 26 Jul 2018 19:46:59 +0000 (21:46 +0200)]
staging: rtl8188eu: remove unused sreset_get_wifi_status()

The function sreset_get_wifi_status() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-mmc: Use BIT macro instead of explicit shifting in board.h
Nishad Kamdar [Fri, 27 Jul 2018 16:07:37 +0000 (21:37 +0530)]
staging: mt7621-mmc: Use BIT macro instead of explicit shifting in board.h

Replace explicit shifting with BIT macro in board.h.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: ieee80211: Convert from ahash to shash
Kees Cook [Tue, 24 Jul 2018 16:49:32 +0000 (09:49 -0700)]
staging: rtl8192u: ieee80211: Convert from ahash to shash

This is an identical change to the wireless/lib80211 of the same name.
In preparing to remove all stack VLA usage from the kernel[1], this
removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of
the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash
to direct shash. By removing a layer of indirection this both improves
performance and reduces stack usage. The stack allocation will be made
a fixed size in a later patch to the crypto subsystem.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192e: ieee80211: Convert from ahash to shash
Kees Cook [Tue, 24 Jul 2018 16:49:33 +0000 (09:49 -0700)]
staging: rtl8192e: ieee80211: Convert from ahash to shash

This is an identical change to the wireless/lib80211 of the same name.
In preparing to remove all stack VLA usage from the kernel[1], this
removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of
the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash
to direct shash. By removing a layer of indirection this both improves
performance and reduces stack usage. The stack allocation will be made
a fixed size in a later patch to the crypto subsystem.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: use NULL instead of 0 for null pointer
Dmitriy Cherkasov [Sat, 28 Jul 2018 22:55:24 +0000 (22:55 +0000)]
staging: gasket: use NULL instead of 0 for null pointer

Fixes sparse warning: Using plain integer as NULL pointer

Signed-off-by: Dmitriy Cherkasov <dmitriy@oss-tech.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: core: hold reference on device while in use
Todd Poynor [Sat, 28 Jul 2018 19:33:24 +0000 (12:33 -0700)]
staging: gasket: core: hold reference on device while in use

Hold a reference on the struct device while a pointer to that
device is in use by gasket.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: fix conditional uninitialized `pcn' in z_erofs_map_blocks_iter
Gao Xiang [Sun, 29 Jul 2018 05:37:57 +0000 (13:37 +0800)]
staging: erofs: fix conditional uninitialized `pcn' in z_erofs_map_blocks_iter

This patch adds error handling code for
z_erofs_map_blocks_iter to fix the compiler blame.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: fix compile error without built-in decompression support
Gao Xiang [Sun, 29 Jul 2018 05:34:58 +0000 (13:34 +0800)]
staging: erofs: fix compile error without built-in decompression support

This patch fixes incorrect code snippets due to spilt code
into small patches by mistake.

Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050747.html
Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050750.html
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMerge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 29 Jul 2018 02:40:06 +0000 (19:40 -0700)]
Merge tag 'random_for_linus_stable' of git://git./linux/kernel/git/tytso/random

Pull random fixes from Ted Ts'o:
 "In reaction to the fixes to address CVE-2018-1108, some Linux
  distributions that have certain systemd versions in some cases
  combined with patches to libcrypt for FIPS/FEDRAMP compliance, have
  led to boot-time stalls for some hardware.

  The reaction by some distros and Linux sysadmins has been to install
  packages that try to do complicated things with the CPU and hope that
  leads to randomness.

  To mitigate this, if RDRAND is available, mix it into entropy provided
  by userspace. It won't hurt, and it will probably help"

* tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
  random: mix rdrand with entropy sent in from userspace

6 years agoMerge tag 'gpio-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Sat, 28 Jul 2018 22:43:14 +0000 (15:43 -0700)]
Merge tag 'gpio-v4.18-2' of git://git./linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "Just a smallish OF fix and a driver fix:

   - OF flag fix for special regulator flags

   - fix up the Uniphier IRQ callback"

* tag 'gpio-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: uniphier: set legitimate irq trigger type in .to_irq hook
  gpio: of: Handle fixed regulator flags properly

6 years agoMerge tag 'mips_fixes_4.18_5' of git://git.kernel.org/pub/scm/linux/kernel/git/mips...
Linus Torvalds [Sat, 28 Jul 2018 19:32:28 +0000 (12:32 -0700)]
Merge tag 'mips_fixes_4.18_5' of git://git./linux/kernel/git/mips/linux

Pull MIPS fix from Paul Burton:
 "Here's one more MIPS fix, reverting an errata workaround that was
  merged for v4.18-rc2 but has since been found to cause system hangs on
  some BCM4718A1-based systems by the OpenWRT project"

* tag 'mips_fixes_4.18_5' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  Revert "MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum"

6 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 28 Jul 2018 17:04:40 +0000 (10:04 -0700)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Some driver bugfixes"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: imx: use open drain for recovery GPIO
  i2c: rcar: handle RXDMA HW behaviour on Gen3
  i2c: imx: Fix reinit_completion() use
  i2c: davinci: Avoid zero value of CLKH

6 years agostaging: axis-fifo: fix return value check in axis_fifo_probe()
Wei Yongjun [Fri, 27 Jul 2018 07:15:15 +0000 (07:15 +0000)]
staging: axis-fifo: fix return value check in axis_fifo_probe()

In case of error, the function device_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: page table: remove code for "no dma_ops"
Todd Poynor [Sat, 28 Jul 2018 05:21:59 +0000 (22:21 -0700)]
staging: gasket: page table: remove code for "no dma_ops"

Remove code with TODOs on it for working around apparent problems
previously seen in a qemu environment where dma_ops was not set
correctly.  There is no user of this in the current code.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: sysfs: remove unnecessary NULL check on device ptr
Todd Poynor [Sat, 28 Jul 2018 05:21:58 +0000 (22:21 -0700)]
staging: gasket: sysfs: remove unnecessary NULL check on device ptr

The device pointer passed into get_mapping() will never be NULL; the
check is unnecessary.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: apex: fixup undefined PCI class
Todd Poynor [Sat, 28 Jul 2018 05:21:57 +0000 (22:21 -0700)]
staging: gasket: apex: fixup undefined PCI class

Apex chips with class 0 (PCI_CLASS_NOT_DEFINED) fixed up to
PCI_CLASS_SYSTEM_OTHER to enable PCI resource assignments.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: gasket: sysfs: remove check for refcount already zero
Todd Poynor [Sat, 28 Jul 2018 05:21:56 +0000 (22:21 -0700)]
staging: gasket: sysfs: remove check for refcount already zero

Remove the check for refcount already zero, which shouldn't be
necessary.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: fix a compile warning of Z_EROFS_VLE_VMAP_ONSTACK_PAGES
Gao Xiang [Sat, 28 Jul 2018 07:10:32 +0000 (15:10 +0800)]
staging: erofs: fix a compile warning of Z_EROFS_VLE_VMAP_ONSTACK_PAGES

There is a type mismatch in the definition of
Z_EROFS_VLE_VMAP_ONSTACK_PAGES, let's fix it.

Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050707.html
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMerge tag 'for-linus-20180727' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 27 Jul 2018 19:51:00 +0000 (12:51 -0700)]
Merge tag 'for-linus-20180727' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Bigger than usual at this time, mostly due to the O_DIRECT corruption
  issue and the fact that I was on vacation last week. This contains:

   - NVMe pull request with two fixes for the FC code, and two target
     fixes (Christoph)

   - a DIF bio reset iteration fix (Greg Edwards)

   - two nbd reply and requeue fixes (Josef)

   - SCSI timeout fixup (Keith)

   - a small series that fixes an issue with bio_iov_iter_get_pages(),
     which ended up causing corruption for larger sized O_DIRECT writes
     that ended up racing with buffered writes (Martin Wilck)"

* tag 'for-linus-20180727' of git://git.kernel.dk/linux-block:
  block: reset bi_iter.bi_done after splitting bio
  block: bio_iov_iter_get_pages: pin more pages for multi-segment IOs
  blkdev: __blkdev_direct_IO_simple: fix leak in error case
  block: bio_iov_iter_get_pages: fix size of last iovec
  nvmet: only check for filebacking on -ENOTBLK
  nvmet: fixup crash on NULL device path
  scsi: set timed out out mq requests to complete
  blk-mq: export setting request completion state
  nvme: if_ready checks to fail io to deleting controller
  nvmet-fc: fix target sgl list on large transfers
  nbd: handle unexpected replies better
  nbd: don't requeue the same request twice.

6 years agoMerge branch 'akpm' (patches from Andrew)
Linus Torvalds [Fri, 27 Jul 2018 17:30:47 +0000 (10:30 -0700)]
Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "11 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  kvm, mm: account shadow page tables to kmemcg
  zswap: re-check zswap_is_full() after do zswap_shrink()
  include/linux/eventfd.h: include linux/errno.h
  mm: fix vma_is_anonymous() false-positives
  mm: use vma_init() to initialize VMAs on stack and data segments
  mm: introduce vma_init()
  mm: fix exports that inadvertently make put_page() EXPORT_SYMBOL_GPL
  ipc/sem.c: prevent queue.status tearing in semop
  mm: disallow mappings that conflict for devm_memremap_pages()
  kasan: only select SLUB_DEBUG with SYSFS=y
  delayacct: fix crash in delayacct_blkio_end() after delayacct init failure