aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-07-11clean up BUS_ATTR() usagesbus_cleanupGreg Kroah-Hartman10-79/+59
Not-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11driver core: add BUS_ATTR_WO() macroGreg Kroah-Hartman1-0/+2
Many bus attributes are write-only, so provide a simple macro for that to be able to match the other driver core attribute macros. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: vt6655: remove some redundant variablesColin Ian King3-10/+3
Variables rx_sts, sq, frame and is_pspoll are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'sq' set but not used [-Wunused-but-set-variable] warning: variable 'rx_sts' set but not used [-Wunused-but-set-variable] warning: variable 'frame' set but not used [-Wunused-but-set-variable] warning: variable 'is_pspoll' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: rtl8188eu: remove blank linesMichael Straube2-7/+0
Remove unrequired blank lines as reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: rtl8188eu: fix lines over 80 charactersMichael Straube1-6/+12
Fix lines over 80 characters by adding appropriate line breaks. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: rtl8188eu: add spaces around '|'Michael Straube1-8/+8
Add spaces around '|' to follow kernel coding style. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: rtl8723bs: simplify ratetbl_val_2wifirate()Michael Straube1-39/+14
Simplify ratetbl_val_2wifirate() by not using extra variable for the return value. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: rtl8723bs: fix comparsions to NULLMichael Straube1-7/+7
Fix comparsions to NULL to follow kernel coding style. x == NULL -> !x x != NULL -> x Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: rtl8723bs: remove blank linesMichael Straube1-30/+0
Remove unrequired blank lines as reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: rtl8723bs: fix lines over 80 charactersMichael Straube1-3/+6
Fix lines over 80 characters by adding appropriate line breaks. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: rtl8723bs: add spaces around '|'Michael Straube1-4/+4
Add spaces around '|' to follow kernel coding style. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: speakup: remove redundant variable lColin Ian King1-3/+2
Variable l is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'l' set but not used [-Wunused-but-set-variable Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: sm750fb: remove redundant pointer 'output'Colin Ian King1-2/+0
Pointer 'output' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'output' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: gasket: fix plain integer as NULL pointer warningIvan Bornyakov1-3/+3
Trivial fix to remove sparse warnings: drivers/staging/gasket/gasket_page_table.c:884:40: warning: Using plain integer as NULL pointer drivers/staging/gasket/gasket_page_table.c:1743:57: warning: Using plain integer as NULL pointer drivers/staging/gasket/gasket_page_table.c:1768:57: warning: Using plain integer as NULL pointer Signed-off-by: Ivan Bornyakov <brnkv.i1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging:rtl8192u: Correction of indentation issues - Coding StyleJohn Whitmore1-39/+37
Simple changes to correct indentation issues. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging:rtl8192u: Correct indentation of ieee80211_softmac_new_net()John Whitmore1-51/+50
Coding style change to correct the indentation of the function ieee80211_softmac_new_net(). A large proportion of the function's if statements were incorrectly indented. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging:rtl8192u: Remove unnecessary parentheses - Coding StyleJohn Whitmore1-4/+4
checkpatch.pl flags unnecessary parentheses, so removed from code. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging:rtl8192u: Move trailing conditional statement to the following lineJohn Whitmore1-8/+17
Coding standard requires that the conditional statement is not on the same line as the 'if' or 'else' but on the following line. Statements moved accordingly. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging:rtl8192u: Remove prohibited spaces - Coding StyleJohn Whitmore1-6/+6
Simple removal of spaces prohibited by the coding standard. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging:rtl8192u: Correct spacing before and after parenthesis - StyleJohn Whitmore1-42/+36
Corrected coding style issues aroung opening and closed parenthesis. Spaces, or blank line, removed from after '(' or before ')' Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging:rtl8192u: Correct indentation and spacing for braces of code blocksJohn Whitmore1-147/+107
Simple style change to fix the indentaiton and spacing of the braces around multiline code blocks. Braces removed from code block with a single line. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging:rtl8192u: Remove blank lines before '}' and after '{' charactersJohn Whitmore1-18/+0
Coding style change to simply remove the unrequired blanks lines before a closing brace or after an opening brace. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: ks7010: remove redundant variable eth_protoColin Ian King1-2/+0
Variable eth_proto is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'eth_proto' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: gdm724x: redundant variables idProduct and idVendorColin Ian King1-5/+0
Variable idProduct and idVendor are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'idProduct' set but not used [-Wunused-but-set-variable] warning: variable 'idVendor' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: gasket: remove redundant pointer bar_dataColin Ian King1-3/+0
Pointer bar_data is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'bar_data' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: comedi: remove redundant variable segposColin Ian King2-4/+4
Variable segpos is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'segpos' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: pi433: Make only one statement per lineSophie Matter1-6/+18
Lines containing multiple statements were broken into multiple lines, increasing readability and complying with the coding standard. This also fixes several checkpatch.pl errors complaining about the lines being too long. Signed-off-by: Sophie Matter <sophie.matter@web.de> Signed-off-by: Rico Schrage <rico.schrage@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: pi433: Use preferred commenting styleSophie Matter2-15/+30
For multi-line comments, the preferred commenting style from the coding style Documentation was applied to the comments, meaning almost blank lines at the beginning and end of the comment. One changed comment includes a line over 80 characters, causing checkpatch.pl to complain, however breaking this line would not make much sense, so it is kept like it is. Signed-off-by: Sophie Matter <sophie.matter@web.de> Signed-off-by: Rico Schrage <rico.schrage@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: pi433: Comply with 80 character column limitSophie Matter3-8/+21
Lines have been split where it makes sense to shorten them in order to comply with the coding standards and fix checkpatch.pl warnings. There are still lines left that are too long, however breaking those would impair readability. Changes in v2: - now working on staging-next branch of the staging tree - the changes to the defines previously made are deleted due to readability Signed-off-by: Sophie Matter <sophie.matter@web.de> Signed-off-by: Rico Schrage <rico.schrage@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: mt7621-pci: factor out mt7621_pci_get_cfgaddr functionSergio Paracuellos1-7/+14
To get config address the same pattern is repeated in some functions along the code. Factor out a new mt7621_pci_get_cfgaddr for calculate it and use it in convenient places. Adjust types to match to u32 where is neccesary. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: mt7621-pci: remove unused macro MV_READ_DATASergio Paracuellos1-3/+0
This macro is not being used at all along the code. Just remove it. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: mt7621-gpio: remove driver from stagingSergio Paracuellos7-383/+0
Remove driver from staging. It has been accepted in the linux-gpio tree. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: rtl8723bs: use mac_pton()Michael Straube1-40/+1
Use mac_pton() instead of custom approach. Remove the now unused hex2num_i() and hwaddr_aton_i(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10Revert "staging: mt7621-pinctrl: replace core_initcall_sync with ↵Sergio Paracuellos1-1/+6
builtin_platform_driver" That patch causes the network interface on the device to stop working. device_initcall() is called much later than core_initcall_sync() and that seem to be a problem. Revert it to get a correct behaviour. Reported-by: NeilBrown <neil@brown.name> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: mt7621-pinctrl: init *map to NULL for correct memory assignationSergio Paracuellos1-0/+1
pinctrl_utils_reserve_map() calls krealloc() on *map. Because of this *map need to be initialized to NULL before calling it. Fixes: 62b6215c11ea ("staging: mt7621-pinctrl: make use of pinctrl_utils_reserve_map") Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: fsl-dpaa2/eth: Remove Rx frame size checkIoana Radulescu1-20/+6
Most Ethernet drivers don't enforce the MTU value as upper limit for ingress frames. We too support receiving frames larger than MTU, so allow that. Remove our ndo_change_mtu implementation, letting the default stack implementation handle things. Also, set the max frame length allowed by hardware only once at probe time, with the largest possible value. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: fsl-dpaa2/eth: MTU cleanupIoana Radulescu1-2/+1
Don't set the lower MTU limit explicitly, since we use the default value anyway. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: fsl-dpaa2/eth: Remove pointless instructionIoana Radulescu1-1/+0
We don't need to call dev_set_drvdata(dev, NULL) on driver remove since core kernel code also performs this step. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: fsl-dpaa2/eth: Remove obsolete referenceIoana Radulescu1-2/+0
Commit 2b7c86eb7bf3 ("staging: fsl-dpaa2/eth: Don't enable FAS on Tx") removed the status field from the TX confirm frame annotation, but a reference to it remained in the description of free_tx_fd(). Remove it. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-10staging: fsl-dpaa2/eth: Fix DMA mapping directionIoana Radulescu1-1/+1
We are using DMA_FROM_DEVICE when mapping RX frame buffers, but DMA_BIDIRECTIONAL for unmap. Fix the direction for DMA unmapping operation. Fixes: 87eb55e418b7 ("staging: fsl-dpaa2/eth: Fix potential endless loop") Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging: rtl8188eu: replace tabs with spacesMichael Straube1-6/+6
Replace tabs with spaces in some function definitions and variable declarations. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging: rtl8188eu: refactor rtw_macaddr_cfg()Michael Straube1-15/+5
Use ether_addr_copy() instead of memcpy() to copy the mac address. Using is_broadcast_ether_addr() and is_zero_ether_addr() instead of testing each byte of the mac[] array for 0xff and 0x00 shortens the code and improves readability. Instead of a fixed default mac address use a random one to reduce the likelihood of mac address collision. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging: rtl8723bs: remove braces from single if statementMichael Straube1-2/+1
Remove braces from single if statement to follow kernel coding style. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging: rtl8723bs: add missing blank linesMichael Straube1-0/+2
Add missing blank lines after declarations as reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging: rtl8723bs: remove blank linesMichael Straube1-31/+0
Remove unrequired blank lines as reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging: rtl8723bs: fix indentationMichael Straube1-8/+8
Remove unrequired extra indentations. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging: rtl8723bs: replace tab with spaceMichael Straube1-3/+3
Replace tabs with spaces in some function definitions. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging: rtl8723bs: replace while with shorter for loopMichael Straube1-9/+3
Simplify rtw_get_rateset_len() by replacing the while loop with a shorter for loop. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging:rtl8192u: rename HT_EXTCHNL_OFFSET -> enum ht_extension_chan_widthJohn Whitmore6-12/+13
remove the typedef of enumerated type HT_EXTCHNL_OFFSET and replace it with 'enum ht_extension_chan_offset' Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging:rtl8192u: Add spaces required around operators - Coding StyleJohn Whitmore1-62/+62
Added the spaces, required by coding style, around the various operators. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging:rtl8192u: Add space required before '(' - StyleJohn Whitmore1-88/+86
Simple addition of the coding style required space before '('. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-08staging:rtl8192u: rename HT_CHANNEL_WIDTH -> enum ht_channel_widthJohn Whitmore9-14/+15
remove the typedef HT_CHANNEL_WIDTH and replace with 'enum ht_channel_width' Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07MAINTAINERS: update two greybus sectionsJohan Hovold1-4/+2
Fix a file entry typo and drop the obsolete timesync entries, which were all caught by: scripts/get_maintainer.pl --self-test=patterns Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: rtl8188eu: replace while with shorter for loopMichael Straube1-8/+4
Simplify rtw_get_rateset_len() by replacing the while loop with a shorter for loop. Also replace tabs with spaces in the definition line. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: rtl8723bs: remove rtw_beamforming.hMichael Straube1-127/+0
The header rtw_beamforming.h is not used anywhere. 'git grep rtw_beamforming.h' returns nothing, remove the file. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: rtl8723bs: remove rtw_br_ext.hMichael Straube1-55/+0
The header rtw_br_ext.h is not used anywhere. 'git grep rtw_br_ext.h' returns nothing, remove the file. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: wlan-ng: remove unneeded parentheses from prism2mgmt.cTim Collier1-4/+4
remove parentheses reported as unnecessary by checkpatch Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: wlan-ng: fix expression continuation in prism2mgmt.cTim Collier1-5/+5
checkpatch reports "CHECK: Logical continuations should be on the previous line" when a continuation line begins with an operator. Reformat the code so that the operator appears at the end of the line being continued. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: wlan-ng: fix expression continuation in prism2fw.cTim Collier1-3/+4
checkpatch reports "CHECK: Logical continuations should be on the previous line" when a continuation line begins with an operator. Reformat the code so that the operator appears at the end of the line being continued. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging/rtl8192u: fix defined but not used build warningsRandy Dunlap2-4/+5
Fix build warnings in rtl8192u when CONFIG_PROC_FS is not enabled by marking the unused functions as __maybe_unused. ../drivers/staging/rtl8192u/r8192U_core.c:508:12: warning: 'proc_get_stats_ap' defined but not used [-Wunused-function] ../drivers/staging/rtl8192u/r8192U_core.c:527:12: warning: 'proc_get_registers' defined but not used [-Wunused-function] ../drivers/staging/rtl8192u/r8192U_core.c:568:12: warning: 'proc_get_stats_tx' defined but not used [-Wunused-function] ../drivers/staging/rtl8192u/r8192U_core.c:627:12: warning: 'proc_get_stats_rx' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jerry chuang <wlanfae@realtek.com> Cc: devel@driverdev.osuosl.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: mt7621-pci: Move open-braces to match kernel code stylePeter Vernia1-4/+2
Moves some open-braces to the end of the conditional statement to match the kernel's coding style Signed-off-by: Peter Vernia <peter.vernia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: mt7621-pci: Add spaces after commas in pci-mt7621.cPeter Vernia1-8/+8
Adds spaces after commas in parameter lists in pci-mt7621.c Signed-off-by: Peter Vernia <peter.vernia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: mt7621-pci: Fix spacing around equals signPeter Vernia1-3/+3
Add spaces in front of the equals sign in assignment operations Signed-off-by: Peter Vernia <peter.vernia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07staging: mt7621-pci: Fix spaces around parenthesis in pci-7621.cPeter Vernia1-14/+14
Adds spaces before open parenthesis, and removes spaces after open parenthesis Signed-off-by: Peter Vernia <peter.vernia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07drivers/staging/gasket: Use refcount_read()Todd Poynor1-1/+1
Use the refcount_read accessor function, avoid reaching into refcount and atomic struct fields. Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Add space after ', ' character - Coding StyleJohn Whitmore1-26/+31
checkpatch requires a space after ',' - Added. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Add required space around '=' operator - StyleJohn Whitmore1-25/+25
checkpatch requires spaces around '=' operator so added. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Remove space after cast - Coding StyleJohn Whitmore1-15/+15
According to checkpatch - No space is necessary after a cast. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Add required spaces around '||' operator - SytleJohn Whitmore1-6/+6
Additon of the coding style required spaces around the '||' operator. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Add space required around '==' opeartor - StyleJohn Whitmore1-7/+7
Simple addition of the coding style required spaces around '==' operator. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Remove superfluous blank lines - Coding StyleJohn Whitmore1-105/+0
Removal of extra blank lines from the ieee80211_softmac.c file Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Remove redundant definitions in headerJohn Whitmore1-117/+0
Truncated header file removing definitions which aren't used. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Use memset to initialize memory, instead of loop.John Whitmore1-4/+1
Replaced memory initialising loop with memset instead. Suggested-by: Andy Shevchenko Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8192u: Use __func__ instead of hardcoded string - StyleJohn Whitmore1-6/+18
Changed logging statements to use %s and __func__ instead of hard coding the function name in a string. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8188eu: rename Hal8188ERateAdaptiveMichael Straube4-2/+2
Rename header and source file to avoid CamelCase. Hal8188ERateAdaptive.h -> hal8188e_rate_adaptive.h Hal8188ERateAdaptive.c -> hal8188e_rate_adaptive.c Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8188eu: rename Hal8188EPhyReg.hMichael Straube2-1/+1
Rename header file to avoid CamelCase. Hal8188EPhyReg.h -> hal8188e_phy_reg.h Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8188eu: rename Hal8188EPhyCfg.hMichael Straube3-2/+2
Rename header file to avoid CamelCase. Hal8188EPhyCfg.h -> hal8188e_phy_cfg.h Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8723bs: remove rtl8192c_rf.hMichael Straube2-29/+0
All functions declared in rtl8192c_rf.h have no definition/are not used in any other file/anywhere. Checked with 'git grep <function_name>'. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: wilc1000: fix static checker warning to unlock mutex in wilc_deinit()Ajay Singh1-9/+9
Fix for static checker warning inconsistent returns of 'hif_deinit_lock'(more details [1]). "drivers/staging/wilc1000/host_interface.c:3390 wilc_deinit() warn: inconsistent returns 'hif_deinit_lock'." Fixes: ff52a57a7a42 ("staging: wilc1000: move the allocation of cmd out of wilc_enqueue_cmd()") [1]. https://www.spinics.net/lists/linux-driver-devel/msg114216.html Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rtl8188eu: remove rtw_mp_phy_regdef.hMichael Straube1-1078/+0
The header rtw_mp_phy_regdef.h is not used anywhere. 'git grep rtw_mp_phy_regdef.h' returns nothing, remove the file. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: fsl-dpaa2/ethsw: Update maintainers for Ethernet Switch driverRazvan Stefanescu1-1/+2
Removing myself as the maintainer for this driver and adding Ioana R. and Ioana C. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com> Acked-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: rts5208: fix missing error check on call to rtsx_write_registerColin Ian King1-1/+1
Currently the check on error return from the call to rtsx_write_register is checking the error status from the previous call. Fix this by adding in the missing assignment of retval. Detected by CoverityScan, CID#709877 Fixes: fa590c222fba ("staging: rts5208: add support for rts5208 and rts5288") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06Staging: Gasket: shift wrapping bug in gasket_read_modify_write_64()Dan Carpenter1-1/+1
This function only has one caller so mask_width is 1 and mask_shift is 32. Shifting an int by 32 bits is undefined, but I guess on GCC it wraps to 0x1? Anyway it's supposed to be 0x100000000. Fixes: 9a69f5087ccc ("drivers/staging: Gasket driver framework + Apex driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06Staging: Gasket: fix a couple off by one bugsDan Carpenter1-2/+2
The > should be >= or we end up writing one element beyond the end of the interrupt_data->eventfd_ctxs[] array. Fixes: 9a69f5087ccc ("drivers/staging: Gasket driver framework + Apex driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06Staging: Gasket: uninitialized return in gasket_mmap()Dan Carpenter1-1/+3
We forgot to set the error code on this error path so ret can be uninitialized. Fixes: 9a69f5087ccc ("drivers/staging: Gasket driver framework + Apex driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06drivers/staging/gasket: Use 2-factor allocator callsKees Cook4-18/+21
As already done treewide, switch from open-coded multiplication to using 2-factor allocator helpers. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: replace core_initcall_sync with builtin_platform_driverSergio Paracuellos1-6/+1
We don't really need initialization of this at such an early stage. Just use builtin_platform_driver to initialize this driver. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: remove 'rt2880_pinctrl_pin_dbg_show' callbackSergio Paracuellos1-8/+0
The debug information provided by this function does not make sense at all, so just remove it. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: use ternary operator return in rt2880_get_group_nameSergio Paracuellos1-4/+1
Trivial change to have only one return in 'rt2880_get_group_name' function using a ternary operator instead of an if statement and two returns. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map functionSergio Paracuellos1-43/+15
Using 'function' and 'group' bindings in the device tree give the posibility of refactor 'rt2880_pinctrl_dt_node_to_map' and simplify it a lot. Make use of 'for_each_node_with_property' function to count number of groups for the node and iterate over the groups using 'of_property_for_each_string' calling 'pinctrl_utils_add_map_mux' function which is the same of the custom function in this driver code 'rt2880_pinctrl_dt_subnode_to_map' which is not needed anymore. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-dts: use 'function' and 'group' for pinctrl bindingsSergio Paracuellos1-24/+24
According to documentation 'pinctrl-bindings.txt' bindings 'group' and 'function' can be used directly. So replace all of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: make use of pinctrl_utils_reserve_mapSergio Paracuellos1-3/+9
Function rt2880_pinctrl_dt_node_to_map was using 'kzalloc' to reserve map memory. There is a 'pinctrl_utils_reserve_map' to do this function. Just use it. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: replace uint8_t type with u8 for 'gpio' fieldSergio Paracuellos1-4/+3
Struct 'rt2880_priv' contains a field 'gpio' which is defined as uint8_t and should be defined with 'u8' which is preferred. Update some cast along the code related with this new change. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: make use of pinctrl_utils_free_mapSergio Paracuellos1-14/+2
There was a custom 'rt2880_pinctrl_dt_free_map' function which it was doing the same as pinctrl_utils_free_map defined in 'pinctrl-utils.h' header file. Use it instead avoiding code duplications. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: use tabs instead of spaces in some indentationsSergio Paracuellos1-3/+3
Kernel coding style use tabs for indent code instead of spaces. Fix some places where spaces were being used silencing also checkpatch script complains. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: align function parameters in some functionsSergio Paracuellos1-15/+14
Function parameters along the code has different alignment styles. Just unify all of them making style consistent. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: replace seq_printf with seq_putsSergio Paracuellos1-1/+1
For a constant format without additional arguments, use seq_puts() instead of seq_printf() fixing also the following checkpatch.pl warning: 'Prefer seq_puts to seq_printf' Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: avoid lines over 80 charsSergio Paracuellos1-11/+15
This commit silence checkpatch warnings about lines which exceeds 80 chars. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-pinctrl: avoid space after if conditionSergio Paracuellos1-1/+1
Adding spaces between if condition and parenthesis are not needed at all and checkpatch script complains about them. Fix one in driver code. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-mmc: Fix printk() facility levelSergej Perschin1-27/+27
The patch fixes the following issue: WARNING: printk() should include KERN_<LEVEL> facility level Signed-off-by: Sergej Perschin <ser.perschin@gmail.com> Signed-off-by: Marcel Budoj <marcel.budoj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-gpio: use devm_kasprintf to set gpio banks labelsSergio Paracuellos1-10/+2
Instead of using a custom function to return desired name for gpio use the default assigned one and concat it '-bankN' suffix using devm_kasprintf kernel function. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-gpio: assign gpio chip custom changes after bgpio_initSergio Paracuellos1-3/+4
bgpio_init function set different data of the gpio chip, like the name. We want specific name for each bank so to get that not overwritten move all custom changes after the bgpio_init function call. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-gpio: use custom xlate functionSergio Paracuellos1-0/+18
The default gpio.of_xlate function assumes there is one gpio chip for each devicetree node. Device tree had changed to only use one node, which corresponds to 3 different gpio chips now. For that approach to work we need a custom xlate function. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-gpio: set irq chip name only onceSergio Paracuellos1-1/+1
There is only one irq chip so set its name only once in driver probe function. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: fbtft: indent fbtft_device_display - last entry - pdev - devRadek Dostál1-5/+5
The dev section was opening curly bracket, but not adding ident, which resulted in two times "}," after each other with same indentation. Add ident at the right place fixes this problem. This formatting issue is not detectable by checkpatch.pl Signed-off-by: Radek Dostál <radek.dostal@streamunlimited.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8188eu: fix block comments - coding styleMichael Straube1-22/+28
Write multiple single line comments as block comments to follow kernel coding style and improve readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8188eu: move return type to functions definition lineMichael Straube1-4/+4
The return type of a function should be on the same line as the definition. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8188eu: reorder switch cases and remove default breakMichael Straube1-4/+3
Reorder the cases of a switch statement to be in ascending order. Remove unrequired break from default case. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8723bs: simplify if else statementMichael Straube1-5/+1
Simplify if else statement to a single function call by passing the variable. Suggested-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8723bs: fix comparsion to true/false and brace issuesMichael Straube2-7/+6
Use if(x) and if(!x) instead of comparsion to true/false. Reported by checkpatch. Remove unrequired braces from single if else statement. Add missing space after else: else{ -> else { Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8192u Remove redundant #include directiveJohn Whitmore1-1/+1
The file includes the file rtl819x_HT.h, which has already been included by the previously included file ieee80211.h Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging:r8188eu: Use lib80211 to encrypt (WEP) tx framesIvan Safonov1-35/+47
Put data to skb, decrypt with lib80211_crypt_wep, and place back to tx buffer. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8723bs: remove pointless if else in rtw_sdio_resume()Michael Straube1-17/+2
Whether any of the conditions is true or not, the return variable is always set to rtw_resume_process(padapter). Replace the if else construct with a single call to rtw_resume_process(). Also remove the now unused local variable pwrpriv. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8188eu: remove unnecessary parenthesesMichael Straube1-11/+11
Remove unnecessary parentheses as reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8723bs: fix line over 80 charactersMichael Straube1-1/+1
Fix line over 80 characters by replacing tab with space. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: rtl8188eu: remove rtw_ioctl_rtl.hMichael Straube1-66/+0
The header rtw_ioctl_rtl.h is not used anywhere. Running 'grep -r rtw_ioctl_rtl *' from kernel root directory returns nothing, remove the file. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: speakup: Replace strncpy with memcpyGuenter Roeck1-2/+2
gcc 8.1.0 generates the following warnings. drivers/staging/speakup/kobjects.c: In function 'punc_store': drivers/staging/speakup/kobjects.c:522:2: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length drivers/staging/speakup/kobjects.c:504:6: note: length computed here drivers/staging/speakup/kobjects.c: In function 'synth_store': drivers/staging/speakup/kobjects.c:391:2: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length drivers/staging/speakup/kobjects.c:388:8: note: length computed here Using strncpy() is indeed less than perfect since the length of data to be copied has already been determined with strlen(). Replace strncpy() with memcpy() to address the warning and optimize the code a little. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02drivers/staging: Gasket driver framework + Apex driverSimon Que21-0/+8083
The Gasket (Google ASIC Software, Kernel Extensions, and Tools) kernel framework is a generic, flexible system that supports thin kernel drivers. Gasket kernel drivers are expected to handle opening and closing devices, mmap'ing BAR space as requested, a small selection of ioctls, and handling page table translation (covered below). Any other functions should be handled by userspace code. The Gasket common module is not enough to run a device. In order to customize the Gasket code for a given piece of hardware, a device specific module must be created. At a minimum, this module must define a struct gasket_driver_desc containing the device-specific data for use by the framework; in addition, the module must declare an __init function that calls gasket_register_device with the module's gasket_driver_desc struct. Finally, the driver must define an exit function that calls gasket_unregister_device with the module's gasket_driver_desc struct. One of the core assumptions of the Gasket framework is that precisely one process is allowed to have an open write handle to the device node at any given time. (That process may, once it has one write handle, open any number of additional write handles.) This is accomplished by tracking open and close data for each driver instance. Signed-off-by: Rob Springer <rspringer@google.com> Signed-off-by: John Joseph <jnjoseph@google.com> Signed-off-by: Simon Que <sque@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging/skein: Remove Skein and Threefish codeJason Cooper16-11415/+0
It's been four years since this was added. In the interim, skein has not seen any mainstream adoption. Same with the threefish block cipher upon which it's based. In the discussion over which hash algorithm will replace SHA1 in git, it's not one of the contenders. There's absolutely no reason to think that there is anything wrong with Skein or Threefish. The only reason for this removal is a lack of adoption. If a real user comes forward, I'd be happy to assist with integrating this code into mainline. Signed-off-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02Merge 4.18-rc3 into staging-nextGreg Kroah-Hartman718-3789/+7141
We want the staging/iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-01Linux 4.18-rc3v4.18-rc3Linus Torvalds1-1/+1
2018-07-01Merge tag 'for-4.18-rc2-tag' of ↵Linus Torvalds2-5/+15
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "We have a few regression fixes for qgroup rescan status tracking and the vm_fault_t conversion that mixed up the error values" * tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix mount failure when qgroup rescan is in progress Btrfs: fix regression in btrfs_page_mkwrite() from vm_fault_t conversion btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf
2018-07-01Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-1/+10
Pull vfs fix from Al Viro: "Followup to procfs-seq_file series this window" This fixes a memory leak by making sure that proc seq files release any private data on close. The 'proc_seq_open' has to be properly paired with 'proc_seq_release' that releases the extra private data. * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: proc: add proc_seq_release
2018-07-01Merge tag 'staging-4.18-rc3' of ↵Linus Torvalds7-7/+10
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO fixes from Greg KH: "Here are a few small staging and IIO driver fixes for 4.18-rc3. Nothing major or big, all just fixes for reported problems since 4.18-rc1. All of these have been in linux-next this week with no reported problems" * tag 'staging-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: android: ion: Return an ERR_PTR in ion_map_kernel staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write() iio: imu: inv_mpu6050: Fix probe() failure on older ACPI based machines iio: buffer: fix the function signature to match implementation iio: mma8452: Fix ignoring MMA8452_INT_DRDY iio: tsl2x7x/tsl2772: avoid potential division by zero iio: pressure: bmp280: fix relative humidity unit
2018-07-01Merge tag 'tty-4.18-rc3' of ↵Linus Torvalds4-27/+35
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are five fixes for the tty core and some serial drivers. The tty core ones fix some security and other issues reported by the syzbot that I have taken too long in responding to (sorry Tetsuo!). The 8350 serial driver fix resolves an issue of devices that used to work properly stopping working as they shouldn't have been added to a blacklist. All of these have been in linux-next for a few days with no reported issues" * tag 'tty-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt: prevent leaking uninitialized data to userspace via /dev/vcs* serdev: fix memleak on module unload serial: 8250_pci: Remove stalled entries in blacklist n_tty: Access echo_* variables carefully. n_tty: Fix stall at n_tty_receive_char_special().
2018-07-01Merge tag 'usb-4.18-rc3' of ↵Linus Torvalds28-66/+373
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here is a number of USB gadget and other driver fixes for 4.18-rc3. There's a bunch of them here, most of them being gadget driver and xhci host controller fixes for reported issues (as normal), but there are also some new device ids, and some fixes for the typec code. There is an acpi core patch in here that was acked by the acpi maintainer as it is needed for the typec fixes in order to properly solve a problem in that driver. All of these have been in linux-next this week with no reported issues" * tag 'usb-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits) usb: chipidea: host: fix disconnection detect issue usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered typec: tcpm: Fix a msecs vs jiffies bug NFC: pn533: Fix wrong GFP flag usage usb: cdc_acm: Add quirk for Uniden UBC125 scanner staging/typec: fix tcpci_rt1711h build errors usb: typec: ucsi: Fix for incorrect status data issue usb: typec: ucsi: acpi: Workaround for cache mode issue acpi: Add helper for deactivating memory region usb: xhci: increase CRS timeout value usb: xhci: tegra: fix runtime PM error handling usb: xhci: remove the code build warning xhci: Fix kernel oops in trace_xhci_free_virt_device xhci: Fix perceived dead host due to runtime suspend race with event handler dwc2: gadget: Fix ISOC IN DDMA PID bitfield value calculation usb: gadget: dwc2: fix memory leak in gadget_init() usb: gadget: composite: fix delayed_status race condition when set_interface usb: dwc2: fix isoc split in transfer with no data usb: dwc2: alloc dma aligned buffer for isoc split in usb: dwc2: fix the incorrect bitmaps for the ports of multi_tt hub ...
2018-07-01Merge tag 'dma-mapping-4.18-2' of git://git.infradead.org/users/hch/dma-mappingLinus Torvalds1-0/+1
Pull dma mapping fixlet from Christoph Hellwig: "Add a missing export required by riscv and unicore" * tag 'dma-mapping-4.18-2' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: export swiotlb_dma_ops
2018-06-30Merge branch 'parisc-4.18-1' of ↵Linus Torvalds7-34/+17
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes and cleanups from Helge Deller: "Nothing exiting in this patchset, just - small cleanups of header files - default to 4 CPUs when building a SMP kernel - mark 16kB and 64kB page sizes broken - addition of the new io_pgetevents syscall" * 'parisc-4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Build kernel without -ffunction-sections parisc: Reduce debug output in unwind code parisc: Wire up io_pgetevents syscall parisc: Default to 4 SMP CPUs parisc: Convert printk(KERN_LEVEL) to pr_lvl() parisc: Mark 16kB and 64kB page sizes BROKEN parisc: Drop struct sigaction from not exported header file
2018-06-30Merge tag 'armsoc-fixes' of ↵Linus Torvalds11-24/+39
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A smaller batch for the end of the week (let's see if I can keep the weekly cadence going for once). All medium-grade fixes here, nothing worrisome: - Fixes for some fairly old bugs around SD card write-protect detection and GPIO interrupt assignments on Davinci. - Wifi module suspend fix for Hikey. - Minor DT tweaks to fix inaccuracies for Amlogic platforms, one of which solves booting with third-party u-boot" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: dts: hikey960: Define wl1837 power capabilities arm64: dts: hikey: Define wl1835 power capabilities ARM64: dts: meson-gxl: fix Mali GPU compatible string ARM64: dts: meson-axg: fix ethernet stability issue ARM64: dts: meson-gx: fix ATF reserved memory region ARM64: dts: meson-gxl-s905x-p212: Add phy-supply for usb0 ARM64: dts: meson: fix register ranges for SD/eMMC ARM64: dts: meson: disable sd-uhs modes on the libretech-cc ARM: dts: da850: Fix interrups property for gpio ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD
2018-06-30Merge tag 'kbuild-fixes-v4.18' of ↵Linus Torvalds17-41/+74
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - introduce __diag_* macros and suppress -Wattribute-alias warnings from GCC 8 - fix stack protector test script for x86_64 - fix line number handling in Kconfig - document that '#' starts a comment in Kconfig - handle P_SYMBOL property in dump debugging of Kconfig - correct help message of LD_DEAD_CODE_DATA_ELIMINATION - fix occasional segmentation faults in Kconfig * tag 'kbuild-fixes-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: loop boundary condition fix kbuild: reword help of LD_DEAD_CODE_DATA_ELIMINATION kconfig: handle P_SYMBOL in print_symbol() kconfig: document Kconfig source file comments kconfig: fix line numbers for if-entries in menu tree stack-protector: Fix test with 32-bit userland and CONFIG_64BIT=y powerpc: Remove -Wattribute-alias pragmas disable -Wattribute-alias warning for SYSCALL_DEFINEx() kbuild: add macro for controlling warnings to linux/compiler.h
2018-06-30Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds8-51/+60
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "The biggest diffstat comes from self-test updates, plus there's entry code fixes, 5-level paging related fixes, console debug output fixes, and misc fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Clean up the printk()s in show_fault_oops() x86/mm: Drop unneeded __always_inline for p4d page table helpers x86/efi: Fix efi_call_phys_epilog() with CONFIG_X86_5LEVEL=y selftests/x86/sigreturn: Do minor cleanups selftests/x86/sigreturn/64: Fix spurious failures on AMD CPUs x86/entry/64/compat: Fix "x86/entry/64/compat: Preserve r8-r11 in int $0x80" x86/mm: Don't free P4D table when it is folded at runtime x86/entry/32: Add explicit 'l' instruction suffix x86/mm: Get rid of KERN_CONT in show_fault_oops()
2018-06-30Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds22-22/+201
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Tooling fixes mostly, plus a build warning fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) perf/core: Move inline keyword at the beginning of declaration tools/headers: Pick up latest kernel ABIs perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] perf script: Fix crash because of missing evsel->priv perf script: Add missing output fields in a hint perf bench: Fix numa report output code perf stat: Remove duplicate event counting perf alias: Rebuild alias expression string to make it comparable perf alias: Remove trailing newline when reading sysfs files perf tools: Fix a clang 7.0 compilation error tools include uapi: Synchronize bpf.h with the kernel tools include uapi: Update if_link.h to pick IFLA_{BRPORT_ISOLATED,VXLAN_TTL_INHERIT} tools include powerpc: Update arch/powerpc/include/uapi/asm/unistd.h copy to get 'rseq' syscall perf tools: Update x86's syscall_64.tbl, adding 'io_pgetevents' and 'rseq' tools headers uapi: Synchronize drm/drm.h perf intel-pt: Fix packet decoding of CYC packets perf tests: Add valid callback for parse-events test perf tests: Add event parsing error handling to parse events test perf report powerpc: Fix crash if callchain is empty perf test session topology: Fix test on s390 ...
2018-06-30Merge tag 'selinux-pr-20180629' of ↵Linus Torvalds1-45/+33
git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "One fairly straightforward patch to fix a longstanding issue where a process could stall while accessing files in selinuxfs and block everyone else due to a held mutex. The patch passes all our tests and looks to apply cleanly to your current tree" * tag 'selinux-pr-20180629' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: move user accesses in selinuxfs out of locked regions
2018-06-30Merge tag 'for-linus-20180629' of git://git.kernel.dk/linux-blockLinus Torvalds9-51/+25
Pull block fixes from Jens Axboe: "Small set of fixes for this series. Mostly just minor fixes, the only oddball in here is the sg change. The sg change came out of the stall fix for NVMe, where we added a mempool and limited us to a single page allocation. CONFIG_SG_DEBUG sort-of ruins that, since we'd need to account for that. That's actually a generic problem, since lots of drivers need to allocate SG lists. So this just removes support for CONFIG_SG_DEBUG, which I added back in 2007 and to my knowledge it was never useful. Anyway, outside of that, this pull contains: - clone of request with special payload fix (Bart) - drbd discard handling fix (Bart) - SATA blk-mq stall fix (me) - chunk size fix (Keith) - double free nvme rdma fix (Sagi)" * tag 'for-linus-20180629' of git://git.kernel.dk/linux-block: sg: remove ->sg_magic member drbd: Fix drbd_request_prepare() discard handling blk-mq: don't queue more if we get a busy return block: Fix cloning of requests with a special payload nvme-rdma: fix possible double free of controller async event buffer block: Fix transfer when chunk sectors exceeds max
2018-06-29Merge tag 'powerpc-4.18-3' of ↵Linus Torvalds6-12/+23
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Two regression fixes, and a new syscall wire-up: - A fix for the recent conversion to time64_t in the powermac RTC routines, which caused time to go backward. - Another fix for fallout from the split PMD PTL conversion. - Wire up the new io_pgetevents() syscall. Thanks to: Aneesh Kumar K.V, Arnd Bergmann, Breno Leitao, Mathieu Malaterre" * tag 'powerpc-4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/powermac: Fix rtc read/write functions powerpc/mm/32: Fix pgtable_page_dtor call powerpc: Wire up io_pgetevents
2018-06-29Merge tag 'davinci-fixes-for-v4.18' of ↵Olof Johansson2-6/+2
git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes This fixes polarity of SD card write-protect pin on DA850 EVM and fixes interrupt property for DA850 SoC GPIO as defined in device-tree. Both of these are not introduced with v4.18 merge but have existed prior. * tag 'davinci-fixes-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850: Fix interrups property for gpio ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD Signed-off-by: Olof Johansson <olof@lixom.net>
2018-06-29Merge tag 'hisi-fixes-for-4.18' of git://github.com/hisilicon/linux-hisi ↵Olof Johansson2-0/+4
into fixes ARM64: hisi fixes for 4.18 - Added power capabilities for the mmc host controller on the hikey and hikey960 boards to avoid broken wifi. * tag 'hisi-fixes-for-4.18' of git://github.com/hisilicon/linux-hisi: arm64: dts: hikey960: Define wl1837 power capabilities arm64: dts: hikey: Define wl1835 power capabilities Signed-off-by: Olof Johansson <olof@lixom.net>
2018-06-29Merge tag 'amlogic-fixes' of ↵Olof Johansson7-18/+33
https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes Amlogic fixes for v4.18-rc - minor 64-bit DT fixes * tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gxl: fix Mali GPU compatible string ARM64: dts: meson-axg: fix ethernet stability issue ARM64: dts: meson-gx: fix ATF reserved memory region ARM64: dts: meson-gxl-s905x-p212: Add phy-supply for usb0 ARM64: dts: meson: fix register ranges for SD/eMMC ARM64: dts: meson: disable sd-uhs modes on the libretech-cc Signed-off-by: Olof Johansson <olof@lixom.net>
2018-06-29Merge tag 'arm64-fixes' of ↵Linus Torvalds5-17/+54
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - The alternatives patching code uses flush_icache_range() which itself uses alternatives. Change the code to use an unpatched variant of cache maintenance - Remove unnecessary ISBs from set_{pte,pmd,pud} - perf: xgene_pmu: Fix IOB SLOW PMU parser error * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Remove unnecessary ISBs from set_{pte,pmd,pud} arm64: Avoid flush_icache_range() in alternatives patching code drivers/perf: xgene_pmu: Fix IOB SLOW PMU parser error
2018-06-29Merge branch 'i2c/for-current-fixed' of ↵Linus Torvalds3-11/+15
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - a revert because of bugzilla #200045 (and some documentation about it) - another regression fix in the i2c-gpio driver - a leak fix for the i2c core * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: gpio: initialize SCL to HIGH again i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfers i2c: algos: bit: mention our experience about initial states Revert "i2c: algo-bit: init the bus to a known state"
2018-06-29Merge tag 'ceph-for-4.18-rc3' of git://github.com/ceph/ceph-clientLinus Torvalds1-0/+1
Pull ceph fix from Ilya Dryomov: "A trivial dentry leak fix from Zheng" * tag 'ceph-for-4.18-rc3' of git://github.com/ceph/ceph-client: ceph: fix dentry leak in splice_dentry()
2018-06-29parisc: Build kernel without -ffunction-sectionsHelge Deller1-4/+0
As suggested by Nick Piggin it seems we can drop the -ffunction-sections compile flag, now that the kernel uses thin archives. Testing with 32- and 64-bit kernel showed no difference in kernel size. Suggested-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
2018-06-29sg: remove ->sg_magic memberJens Axboe4-45/+0
This was introduced more than a decade ago when sg chaining was added, but we never really caught anything with it. The scatterlist entry size can be critical, since drivers allocate it, so remove the magic member. Recently it's been triggering allocation stalls and failures in NVMe. Tested-by: Jordan Glover <Golden_Miller83@protonmail.ch> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-06-29Merge tag 'pci-v4.18-fixes-1' of ↵Linus Torvalds6-8/+21
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Fix crash caused by endpoint library initialization order change (Alan Douglas) - Fix shpchp NULL pointer dereference regression on non-ACPI platforms (Bjorn Helgaas) - Move PCI_DOMAINS selection to fix build regression (Lorenzo Pieralisi) * tag 'pci-v4.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: controller: Move PCI_DOMAINS selection to arch Kconfig PCI: Initialize endpoint library before controllers PCI: shpchp: Manage SHPC unconditionally on non-ACPI systems
2018-06-29Merge tag 'pm-4.18-rc3' of ↵Linus Torvalds4-13/+22
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix up recently added features (the Kryo cpufreq driver and performance states coverage in the generic power domains framework), add missing documentation for a recently added sysfs knob in the intel_pstate driver and fix an error in its documentation. Specifics: - Fix the initialization time error handling in the recently added Kryo cpufreq driver (Dan Carpenter). - Fix up the recently added coverage of performance states in the generic power domains (genpd) framework (Viresh Kumar). - Add missing documentation of the new hwp_dynamic_boost sysfs knob in the intel_pstate driver (Rafael Wysocki). - Fix incorrect sysfs path in the intel_pstate driver documentation (Rafael Wysocki)" * tag 'pm-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Documentation: intel_pstate: Describe hwp_dynamic_boost sysfs knob Documentation: admin-guide: intel_pstate: Fix sysfs path PM / Domains: Rename opp_node to np PM / Domains: Fix return value of of_genpd_opp_to_performance_state() cpufreq: qcom-kryo: Fix error handling in probe()
2018-06-29Merge tag 'drm-fixes-2018-06-29' of git://anongit.freedesktop.org/drm/drmLinus Torvalds8-27/+59
Pull drm fixes from Dave Airlie: "Nothing too major this round: - small set of mali-dp fixes - single meson fix - a bunch of amdgpu fixes (one makes non-4k page sizes not be a bad experience)" * tag 'drm-fixes-2018-06-29' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: release spinlock before committing updates to stream drm/amdgpu:Support new VCN FW version naming convention drm/amdgpu: fix UBSAN: Undefined behaviour for amdgpu_fence.c drm/meson: Fix an un-handled error path in 'meson_drv_bind_master()' drm/amdgpu: GPU vs CPU page size fixes in amdgpu_vm_bo_split_mapping drm/amdgpu: Count disabled CRTCs in commit tail earlier drm/mali-dp: Rectify the width and height passed to rotmem_required() drm/arm/malidp: Preserve LAYER_FORMAT contents when setting format drm: mali-dp: Enable Global SE interrupts mask for DP500 drm/arm/malidp: Ensure that the crtcs are shutdown before removing any encoder/connector
2018-06-29Merge tag 'for-4.18/dm-fixes' of ↵Linus Torvalds9-27/+33
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix dm core to use more efficient bio_split() instead of bio_clone_bioset(). Also fixes splitting bio that has integrity payload. - Three fixes related to properly validating DAX capabilities of a stacked DM device that will advertise DAX support. - Update DM writecache target to use 2-factor allocator arguments. Kees says this is the last related change for 4.18. - Fix DM zoned target to use GFP_NOIO to avoid triggering reclaim during IO submission (caught by lockdep). - Fix DM thinp to gracefully recover from running out of data space while a previous async discard completes (whereby freeing space). - Fix DM thinp's metadata transaction commit to avoid needless work. * tag 'for-4.18/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: prevent DAX mounts if not supported dax: check for QUEUE_FLAG_DAX in bdev_dax_supported() pmem: only set QUEUE_FLAG_DAX for fsdax mode dm thin: handle running out of data space vs concurrent discard dm raid: don't use 'const' in function return dm zoned: avoid triggering reclaim from inside dmz_map() dm writecache: use 2-factor allocator arguments dm thin metadata: remove needless work from __commit_transaction dm: use bio_split() when splitting out the already processed bio
2018-06-29Merge branch 'nvme-4.18' of git://git.infradead.org/nvme into for-linusJens Axboe1-2/+5
Pull single NVMe fix from Christoph. * 'nvme-4.18' of git://git.infradead.org/nvme: nvme-rdma: fix possible double free of controller async event buffer
2018-06-29drbd: Fix drbd_request_prepare() discard handlingBart Van Assche1-2/+2
Fix the test that verifies whether bio_op(bio) represents a discard or write zeroes operation. Compile-tested only. Cc: Philipp Reisner <philipp.reisner@linbit.com> Cc: Lars Ellenberg <lars.ellenberg@linbit.com> Fixes: 7435e9018f91 ("drbd: zero-out partial unaligned discards on local backend") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-06-29blk-mq: don't queue more if we get a busy returnJens Axboe1-0/+12
Some devices have different queue limits depending on the type of IO. A classic case is SATA NCQ, where some commands can queue, but others cannot. If we have NCQ commands inflight and encounter a non-queueable command, the driver returns busy. Currently we attempt to dispatch more from the scheduler, if we were able to queue some commands. But for the case where we ended up stopping due to BUSY, we should not attempt to retrieve more from the scheduler. If we do, we can get into a situation where we attempt to queue a non-queueable command, get BUSY, then successfully retrieve more commands from that scheduler and queue those. This can repeat forever, starving the non-queuable command indefinitely. Fix this by NOT attempting to pull more commands from the scheduler, if we get a BUSY return. This should also be more optimal in terms of letting requests stay in the scheduler for as long as possible, if we get a BUSY due to the regular out-of-tags condition. Reviewed-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-06-29aio: mark __aio_sigset::sigmask constAvi Kivity1-1/+1
io_pgetevents() will not change the signal mask. Mark it const to make it clear and to reduce the need for casts in user code. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Avi Kivity <avi@scylladb.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [hch: reapply the patch that got incorrectly reverted] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-29net: handle NULL ->poll gracefullyChristoph Hellwig1-0/+2
The big aio poll revert broke various network protocols that don't implement ->poll as a patch in the aio poll serie removed sock_no_poll and made the common code handle this case. Reported-by: syzbot+57727883dbad76db2ef0@syzkaller.appspotmail.com Reported-by: syzbot+cdb0d3176b53d35ad454@syzkaller.appspotmail.com Reported-by: syzbot+2c7e8f74f8b2571c87e8@syzkaller.appspotmail.com Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Fixes: a11e1d432b51 ("Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-29Merge branch 'pm-domains'Rafael J. Wysocki2-7/+6
Merge fixups for the recent extenstion of the generic power domains (genpd) framework covering performance states. * pm-domains: PM / Domains: Rename opp_node to np PM / Domains: Fix return value of of_genpd_opp_to_performance_state()
2018-06-29i2c: gpio: initialize SCL to HIGH againWolfram Sang1-2/+2
It seems that during the conversion from gpio* to gpiod*, the initial state of SCL was wrongly switched to LOW. Fix it to be HIGH again. Fixes: 7bb75029ef34 ("i2c: gpio: Enforce open drain through gpiolib") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
2018-06-29i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfersPeter Rosin1-5/+9
If DMA safe memory was allocated, but the subsequent I2C transfer fails the memory is leaked. Plug this leak. Fixes: 8a77821e74d6 ("i2c: smbus: use DMA safe buffers for emulated SMBus transactions") Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
2018-06-29i2c: algos: bit: mention our experience about initial statesWolfram Sang1-0/+5
So, if somebody wants to re-implement this in the future, we pinpoint to a problem case. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-06-29Revert "i2c: algo-bit: init the bus to a known state"Wolfram Sang1-5/+0
This reverts commit 3e5f06bed72fe72166a6778f630241a893f67799. As per bugzilla #200045, this caused a regression. I don't really see a way to fix it without having the hardware. So, revert the patch and I will fix the issue I was seeing originally in the i2c-gpio driver itself. I couldn't find new users of this algorithm since, so there should be no one depending on the new behaviour. Reported-by: Sergey Larin <cerg2010cerg2010@mail.ru> Fixes: 3e5f06bed72f ("i2c: algo-bit: init the bus to a known state") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Sergey Larin <cerg2010cerg2010@mail.ru> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
2018-06-28selinux: move user accesses in selinuxfs out of locked regionsJann Horn1-45/+33
If a user is accessing a file in selinuxfs with a pointer to a userspace buffer that is backed by e.g. a userfaultfd, the userspace access can stall indefinitely, which can block fsi->mutex if it is held. For sel_read_policy(), remove the locking, since this method doesn't seem to access anything that requires locking. For sel_read_bool(), move the user access below the locked region. For sel_write_bool() and sel_commit_bools_write(), move the user access up above the locked region. Cc: stable@vger.kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jann Horn <jannh@google.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> [PM: removed an unused variable in sel_read_policy()] Signed-off-by: Paul Moore <paul@paul-moore.com>
2018-06-28parisc: Reduce debug output in unwind codeHelge Deller1-2/+2
Signed-off-by: Helge Deller <deller@gmx.de>
2018-06-29Merge tag 'drm-misc-fixes-2018-06-28' of ↵Dave Airlie1-4/+8
git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v4.18-rc3: - A single fix in meson for an unhandled error path in meson_drv_bind_master(). Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/fa740f31-5a8d-ed45-5e8a-aecd3f6f11b7@linux.intel.com
2018-06-29Merge branch 'drm-fixes-4.18' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie4-14/+35
into drm-fixes A few fixes for 4.18: - fix a read past the end of an array due to vega20 changes - fix driver on systems with non-4K pages - fix locking with pageflipping in DC that could lead to a sleep while atomic - fix VCN firmware version reporting for upcoming firmware Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180628032641.2765-1-alexander.deucher@amd.com
2018-06-28dm: prevent DAX mounts if not supportedRoss Zwisler2-5/+5
Currently device_supports_dax() just checks to see if the QUEUE_FLAG_DAX flag is set on the device's request queue to decide whether or not the device supports filesystem DAX. Really we should be using bdev_dax_supported() like filesystems do at mount time. This performs other tests like checking to make sure the dax_direct_access() path works. We also explicitly clear QUEUE_FLAG_DAX on the DM device's request queue if any of the underlying devices do not support DAX. This makes the handling of QUEUE_FLAG_DAX consistent with the setting/clearing of most other flags in dm_table_set_restrictions(). Now that bdev_dax_supported() explicitly checks for QUEUE_FLAG_DAX, this will ensure that filesystems built upon DM devices will only be able to mount with DAX if all underlying devices also support DAX. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Fixes: commit 545ed20e6df6 ("dm: add infrastructure for DAX support") Cc: stable@vger.kernel.org Acked-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Toshi Kani <toshi.kani@hpe.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2018-06-28dax: check for QUEUE_FLAG_DAX in bdev_dax_supported()Ross Zwisler1-0/+8
Add an explicit check for QUEUE_FLAG_DAX to __bdev_dax_supported(). This is needed for DM configurations where the first element in the dm-linear or dm-stripe target supports DAX, but other elements do not. Without this check __bdev_dax_supported() will pass for such devices, letting a filesystem on that device mount with the DAX option. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Suggested-by: Mike Snitzer <snitzer@redhat.com> Fixes: commit 545ed20e6df6 ("dm: add infrastructure for DAX support") Cc: stable@vger.kernel.org Acked-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Toshi Kani <toshi.kani@hpe.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2018-06-28pmem: only set QUEUE_FLAG_DAX for fsdax modeRoss Zwisler1-1/+2
QUEUE_FLAG_DAX is an indication that a given block device supports filesystem DAX and should not be set for PMEM namespaces which are in "raw" mode. These namespaces lack struct page and are prevented from participating in filesystem DAX as of commit 569d0365f571 ("dax: require 'struct page' by default for filesystem dax"). Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Suggested-by: Mike Snitzer <snitzer@redhat.com> Fixes: 569d0365f571 ("dax: require 'struct page' by default for filesystem dax") Cc: stable@vger.kernel.org Acked-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Toshi Kani <toshi.kani@hpe.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2018-06-28Merge tag 'printk-for-4.18-rc3' of ↵Linus Torvalds1-7/+0
git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk fix from Petr Mladek: "Revert a commit that went in by mistake. I already have a better fix in the queue for 4.19" * tag 'printk-for-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: Revert "lib/test_printf.c: call wait_for_random_bytes() before plain %p tests"
2018-06-28Merge tag 'sound-4.18-rc3' of ↵Linus Torvalds8-48/+53
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Over a dozen changes, but all small and clear fixes. Half of them are the regression fixes for CA0132 HD-audio codec, and the rest are, again, a few more fixups for HD-audio, two UBSAN fixes in the core ioctls, and a trivial fix in the error path handling in lx6464es driver" * tag 'sound-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Fix UBSAN warning at SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT ioctl ALSA: timer: Fix UBSAN warning at SNDRV_TIMER_IOCTL_NEXT_DEVICE ioctl ALSA: hda/realtek - Fix the problem of two front mics on more machines ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210 ALSA: hda/ca0132: make array ca0132_alt_chmaps static ALSA: hda - Force to link down at runtime suspend on ATI/AMD HDMI ALSA: lx6464es: Missing error code in snd_lx6464es_create() ALSA: hda/ca0132: Fix DMic data rate for Alienware M17x R4 ALSA: hda/ca0132: Restore PCM Analog Mic-In2 ALSA: hda/ca0132: Don't test for QUIRK_NONE ALSA: hda/ca0132: Restore behavior of QUIRK_ALIENWARE ALSA: hda/ca0132: Delete redundant UNSOL event requests ALSA: hda/ca0132: Delete pointless assignments to struct auto_pin_cfg fields ALSA: hda/realtek - Fix pop noise on Lenovo P50 & co
2018-06-28Merge tag 'mtd/fixes-for-4.18-rc3' of git://git.infradead.org/linux-mtdLinus Torvalds7-25/+61
Pull mtd fixes from Boris Brezillon: "NAND fixes: - add a quirk for a bunch of broken Macronix chips - fix nand_block_bad() when chip->ecc.read_oob() returns a positive value encoding the number of bitflips - fix OOB handling in the MXC driver fo V2.1 controllers - flag the ONFI_FEATURE_ON_DIE_ECC as supported in the Micron driver - hardcode clk rate in the denali_dt driver to address a bad DT representation (the proper fix will be queued for 4.19) SPI NOR fixes: - add an ULL constant to some ID definitions so that the ID is not truncated on 32-bit platforms MTD fixes: - fix the sector unlocking logic in the CFI driver" * tag 'mtd/fixes-for-4.18-rc3' of git://git.infradead.org/linux-mtd: mtd: rawnand: denali_dt: set clk_x_rate to 200 MHz unconditionally mtd: dataflash: Use ULL suffix for 64-bit constants mtd: cfi_cmdset_0002: Avoid walking all chips when unlocking. mtd: cfi_cmdset_0002: Fix unlocking requests crossing a chip boudary mtd: cfi_cmdset_0002: fix SEGV unlocking multiple chips mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock() mtd: rawnand: All AC chips have a broken GET_FEATURES(TIMINGS). mtd: rawnand: fix return value check for bad block status mtd: rawnand: mxc: set spare area size register explicitly mtd: rawnand: micron: add ONFI_FEATURE_ON_DIE_ECC to supported features
2018-06-28Merge branch 'akpm' (patches from Andrew)Linus Torvalds9-8/+38
Merge fixes from Andrew Morton: "7 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: proc: add Alexey to MAINTAINERS kasan: depend on CONFIG_SLUB_DEBUG include/linux/dax.h: dax_iomap_fault() returns vm_fault_t x86/e820: put !E820_TYPE_RAM regions into memblock.reserved slub: fix failure when we delete and create a slab cache Revert mm/vmstat.c: fix vmstat_update() preemption BUG lib/percpu_ida.c: don't do alloc from per-CPU list if there is none
2018-06-28proc: add Alexey to MAINTAINERSAlexey Dobriyan1-0/+9
I know I'll regret it. Link: http://lkml.kernel.org/r/20180627194840.GA18113@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-28kasan: depend on CONFIG_SLUB_DEBUGJason A. Donenfeld1-0/+1
KASAN depends on having access to some of the accounting that SLUB_DEBUG does; without it, there are immediate crashes [1]. So, the natural thing to do is to make KASAN select SLUB_DEBUG. [1] http://lkml.kernel.org/r/CAHmME9rtoPwxUSnktxzKso14iuVCWT7BE_-_8PAC=pGw1iJnQg@mail.gmail.com Link: http://lkml.kernel.org/r/20180622154623.25388-1-Jason@zx2c4.com Fixes: f9e13c0a5a33 ("slab, slub: skip unnecessary kasan_cache_shutdown()") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Shakeel Butt <shakeelb@google.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Shakeel Butt <shakeelb@google.com> Cc: David Rientjes <rientjes@google.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-28include/linux/dax.h: dax_iomap_fault() returns vm_fault_tSouptick Joarder1-1/+1
Commit 1c8f422059ae ("mm: change return type to vm_fault_t") missed a conversion. It's not a big problem at present because mainline is still using typedef int vm_fault_t; Fixes: 1c8f422059ae ("mm: change return type to vm_fault_t") Link: http://lkml.kernel.org/r/20180620172046.GA27894@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Matthew Wilcox <willy@infradead.org> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-28x86/e820: put !E820_TYPE_RAM regions into memblock.reservedNaoya Horiguchi1-3/+12
There is a kernel panic that is triggered when reading /proc/kpageflags on the kernel booted with kernel parameter 'memmap=nn[KMG]!ss[KMG]': BUG: unable to handle kernel paging request at fffffffffffffffe PGD 9b20e067 P4D 9b20e067 PUD 9b210067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 2 PID: 1728 Comm: page-types Not tainted 4.17.0-rc6-mm1-v4.17-rc6-180605-0816-00236-g2dfb086ef02c+ #160 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.fc28 04/01/2014 RIP: 0010:stable_page_flags+0x27/0x3c0 Code: 00 00 00 0f 1f 44 00 00 48 85 ff 0f 84 a0 03 00 00 41 54 55 49 89 fc 53 48 8b 57 08 48 8b 2f 48 8d 42 ff 83 e2 01 48 0f 44 c7 <48> 8b 00 f6 c4 01 0f 84 10 03 00 00 31 db 49 8b 54 24 08 4c 89 e7 RSP: 0018:ffffbbd44111fde0 EFLAGS: 00010202 RAX: fffffffffffffffe RBX: 00007fffffffeff9 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000202 RDI: ffffed1182fff5c0 RBP: ffffffffffffffff R08: 0000000000000001 R09: 0000000000000001 R10: ffffbbd44111fed8 R11: 0000000000000000 R12: ffffed1182fff5c0 R13: 00000000000bffd7 R14: 0000000002fff5c0 R15: ffffbbd44111ff10 FS: 00007efc4335a500(0000) GS:ffff93a5bfc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffffffffffffe CR3: 00000000b2a58000 CR4: 00000000001406e0 Call Trace: kpageflags_read+0xc7/0x120 proc_reg_read+0x3c/0x60 __vfs_read+0x36/0x170 vfs_read+0x89/0x130 ksys_pread64+0x71/0x90 do_syscall_64+0x5b/0x160 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7efc42e75e23 Code: 09 00 ba 9f 01 00 00 e8 ab 81 f4 ff 66 2e 0f 1f 84 00 00 00 00 00 90 83 3d 29 0a 2d 00 00 75 13 49 89 ca b8 11 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 db d3 01 00 48 89 04 24 According to kernel bisection, this problem became visible due to commit f7f99100d8d9 ("mm: stop zeroing memory during allocation in vmemmap") which changes how struct pages are initialized. Memblock layout affects the pfn ranges covered by node/zone. Consider that we have a VM with 2 NUMA nodes and each node has 4GB memory, and the default (no memmap= given) memblock layout is like below: MEMBLOCK configuration: memory size = 0x00000001fff75c00 reserved size = 0x000000000300c000 memory.cnt = 0x4 memory[0x0] [0x0000000000001000-0x000000000009efff], 0x000000000009e000 bytes on node 0 flags: 0x0 memory[0x1] [0x0000000000100000-0x00000000bffd6fff], 0x00000000bfed7000 bytes on node 0 flags: 0x0 memory[0x2] [0x0000000100000000-0x000000013fffffff], 0x0000000040000000 bytes on node 0 flags: 0x0 memory[0x3] [0x0000000140000000-0x000000023fffffff], 0x0000000100000000 bytes on node 1 flags: 0x0 ... If you give memmap=1G!4G (so it just covers memory[0x2]), the range [0x100000000-0x13fffffff] is gone: MEMBLOCK configuration: memory size = 0x00000001bff75c00 reserved size = 0x000000000300c000 memory.cnt = 0x3 memory[0x0] [0x0000000000001000-0x000000000009efff], 0x000000000009e000 bytes on node 0 flags: 0x0 memory[0x1] [0x0000000000100000-0x00000000bffd6fff], 0x00000000bfed7000 bytes on node 0 flags: 0x0 memory[0x2] [0x0000000140000000-0x000000023fffffff], 0x0000000100000000 bytes on node 1 flags: 0x0 ... This causes shrinking node 0's pfn range because it is calculated by the address range of memblock.memory. So some of struct pages in the gap range are left uninitialized. We have a function zero_resv_unavail() which does zeroing the struct pages within the reserved unavailable range (i.e. memblock.memory && !memblock.reserved). This patch utilizes it to cover all unavailable ranges by putting them into memblock.reserved. Link: http://lkml.kernel.org/r/20180615072947.GB23273@hori1.linux.bs1.fc.nec.co.jp Fixes: f7f99100d8d9 ("mm: stop zeroing memory during allocation in vmemmap") Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Tested-by: Oscar Salvador <osalvador@suse.de> Tested-by: "Herton R. Krzesinski" <herton@redhat.com> Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Pavel Tatashin <pasha.tatashin@oracle.com> Cc: Steven Sistare <steven.sistare@oracle.com> Cc: Daniel Jordan <daniel.m.jordan@oracle.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-28slub: fix failure when we delete and create a slab cacheMikulas Patocka3-1/+14
In kernel 4.17 I removed some code from dm-bufio that did slab cache merging (commit 21bb13276768: "dm bufio: remove code that merges slab caches") - both slab and slub support merging caches with identical attributes, so dm-bufio now just calls kmem_cache_create and relies on implicit merging. This uncovered a bug in the slub subsystem - if we delete a cache and immediatelly create another cache with the same attributes, it fails because of duplicate filename in /sys/kernel/slab/. The slub subsystem offloads freeing the cache to a workqueue - and if we create the new cache before the workqueue runs, it complains because of duplicate filename in sysfs. This patch fixes the bug by moving the call of kobject_del from sysfs_slab_remove_workfn to shutdown_cache. kobject_del must be called while we hold slab_mutex - so that the sysfs entry is deleted before a cache with the same attributes could be created. Running device-mapper-test-suite with: dmtest run --suite thin-provisioning -n /commit_failure_causes_fallback/ triggered: Buffer I/O error on dev dm-0, logical block 1572848, async page read device-mapper: thin: 253:1: metadata operation 'dm_pool_alloc_data_block' failed: error = -5 device-mapper: thin: 253:1: aborting current metadata transaction sysfs: cannot create duplicate filename '/kernel/slab/:a-0000144' CPU: 2 PID: 1037 Comm: kworker/u48:1 Not tainted 4.17.0.snitm+ #25 Hardware name: Supermicro SYS-1029P-WTR/X11DDW-L, BIOS 2.0a 12/06/2017 Workqueue: dm-thin do_worker [dm_thin_pool] Call Trace: dump_stack+0x5a/0x73 sysfs_warn_dup+0x58/0x70 sysfs_create_dir_ns+0x77/0x80 kobject_add_internal+0xba/0x2e0 kobject_init_and_add+0x70/0xb0 sysfs_slab_add+0xb1/0x250 __kmem_cache_create+0x116/0x150 create_cache+0xd9/0x1f0 kmem_cache_create_usercopy+0x1c1/0x250 kmem_cache_create+0x18/0x20 dm_bufio_client_create+0x1ae/0x410 [dm_bufio] dm_block_manager_create+0x5e/0x90 [dm_persistent_data] __create_persistent_data_objects+0x38/0x940 [dm_thin_pool] dm_pool_abort_metadata+0x64/0x90 [dm_thin_pool] metadata_operation_failed+0x59/0x100 [dm_thin_pool] alloc_data_block.isra.53+0x86/0x180 [dm_thin_pool] process_cell+0x2a3/0x550 [dm_thin_pool] do_worker+0x28d/0x8f0 [dm_thin_pool] process_one_work+0x171/0x370 worker_thread+0x49/0x3f0 kthread+0xf8/0x130 ret_from_fork+0x35/0x40 kobject_add_internal failed for :a-0000144 with -EEXIST, don't try to register things with the same name in the same directory. kmem_cache_create(dm_bufio_buffer-16) failed with error -17 Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1806151817130.6333@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reported-by: Mike Snitzer <snitzer@redhat.com> Tested-by: Mike Snitzer <snitzer@redhat.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-28Revert mm/vmstat.c: fix vmstat_update() preemption BUGSebastian Andrzej Siewior1-2/+0
Revert commit c7f26ccfb2c3 ("mm/vmstat.c: fix vmstat_update() preemption BUG"). Steven saw a "using smp_processor_id() in preemptible" message and added a preempt_disable() section around it to keep it quiet. This is not the right thing to do it does not fix the real problem. vmstat_update() is invoked by a kworker on a specific CPU. This worker it bound to this CPU. The name of the worker was "kworker/1:1" so it should have been a worker which was bound to CPU1. A worker which can run on any CPU would have a `u' before the first digit. smp_processor_id() can be used in a preempt-enabled region as long as the task is bound to a single CPU which is the case here. If it could run on an arbitrary CPU then this is the problem we have an should seek to resolve. Not only this smp_processor_id() must not be migrated to another CPU but also refresh_cpu_vm_stats() which might access wrong per-CPU variables. Not to mention that other code relies on the fact that such a worker runs on one specific CPU only. Therefore revert that commit and we should look instead what broke the affinity mask of the kworker. Link: http://lkml.kernel.org/r/20180504104451.20278-1-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Steven J. Hill <steven.hill@cavium.com> Cc: Tejun Heo <htejun@gmail.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-28lib/percpu_ida.c: don't do alloc from per-CPU list if there is noneSebastian Andrzej Siewior1-1/+1
In commit 804209d8a009 ("lib/percpu_ida.c: use _irqsave() instead of local_irq_save() + spin_lock") I inlined alloc_local_tag() and mixed up the >= check from percpu_ida_alloc() with the one in alloc_local_tag(). Don't alloc from per-CPU freelist if ->nr_free is zero. Link: http://lkml.kernel.org/r/20180613075830.c3zeva52fuj6fxxv@linutronix.de Fixes: 804209d8a009 ("lib/percpu_ida.c: use _irqsave() instead of local_irq_save() + spin_lock") Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reported-by: David Disseldorp <ddiss@suse.de> Tested-by: David Disseldorp <ddiss@suse.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Nicholas Bellinger <nab@linux-iscsi.org> Cc: Shaohua Li <shli@fb.com> Cc: Kent Overstreet <kent.overstreet@gmail.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-28Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLLLinus Torvalds80-450/+301
The poll() changes were not well thought out, and completely unexplained. They also caused a huge performance regression, because "->poll()" was no longer a trivial file operation that just called down to the underlying file operations, but instead did at least two indirect calls. Indirect calls are sadly slow now with the Spectre mitigation, but the performance problem could at least be largely mitigated by changing the "->get_poll_head()" operation to just have a per-file-descriptor pointer to the poll head instead. That gets rid of one of the new indirections. But that doesn't fix the new complexity that is completely unwarranted for the regular case. The (undocumented) reason for the poll() changes was some alleged AIO poll race fixing, but we don't make the common case slower and more complex for some uncommon special case, so this all really needs way more explanations and most likely a fundamental redesign. [ This revert is a revert of about 30 different commits, not reverted individually because that would just be unnecessarily messy - Linus ] Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-28arm64: dts: hikey960: Define wl1837 power capabilitiesoscardagrach1-0/+2
These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES. This fixes a regression found here: https://lkml.org/lkml/2018/6/12/930 Fixes: 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power") Signed-off-by: Ryan Grachek <ryan@edited.us> Tested-by: John Stultz <john.stultz@linaro.org> Acked-by: John Stultz <john.stultz@linaro.org> Tested-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-06-28arm64: dts: hikey: Define wl1835 power capabilitiesoscardagrach1-0/+2
These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES. Fixes: 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power") Signed-off-by: Ryan Grachek <ryan@edited.us> Tested-by: John Stultz <john.stultz@linaro.org> Acked-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-06-28block: Fix cloning of requests with a special payloadBart Van Assche1-0/+4
This patch avoids that removing a path controlled by the dm-mpath driver while mkfs is running triggers the following kernel bug: kernel BUG at block/blk-core.c:3347! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 20 PID: 24369 Comm: mkfs.ext4 Not tainted 4.18.0-rc1-dbg+ #2 RIP: 0010:blk_end_request_all+0x68/0x70 Call Trace: <IRQ> dm_softirq_done+0x326/0x3d0 [dm_mod] blk_done_softirq+0x19b/0x1e0 __do_softirq+0x128/0x60d irq_exit+0x100/0x110 smp_call_function_single_interrupt+0x90/0x330 call_function_single_interrupt+0xf/0x20 </IRQ> Fixes: f9d03f96b988 ("block: improve handling of the magic discard payload") Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Johannes Thumshirn <jthumshirn@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-06-28parisc: Wire up io_pgetevents syscallHelge Deller2-1/+3
Signed-off-by: Helge Deller <deller@gmx.de>
2018-06-28parisc: Default to 4 SMP CPUsHelge Deller1-1/+1
I haven't seen any real SMP machine yet with > 4 CPUs (we don't suport SuperDomes yet), so reducing the default maximum number of CPUs may speed up various bitop functions which depend on number of CPUs in the system. bload-o-meter on a typical 64-bit kernel shows: Data: add/remove: 0/0 grow/shrink: 0/10 up/down: 0/-3724 (-3724) Total: Before=1910404, After=1906680, chg -0.19% Code: add/remove: 0/2 grow/shrink: 42/38 up/down: 2320/-3500 (-1180) Total: Before=11053099, After=11051919, chg -0.01% Signed-off-by: Helge Deller <deller@gmx.de>
2018-06-28parisc: Convert printk(KERN_LEVEL) to pr_lvl()Andy Shevchenko1-16/+9
Convert printk(KERN_LEVEL) type of calls to pr_lvl() macros. While here, - convert printk() to pr_info() - join back string literal to be on one line - use %*phN (note, it gives 1 byte more for sake of simplicity) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Helge Deller <deller@gmx.de>
2018-06-28parisc: Mark 16kB and 64kB page sizes BROKENHelge Deller1-2/+2
A full boot only succeeds with 4kB page sizes currently. For 16kB and 64kB page size support somone needs to fix the LBA PCI code at least, so mark those broken for now. Signed-off-by: Helge Deller <deller@gmx.de>
2018-06-28parisc: Drop struct sigaction from not exported header fileHelge Deller1-8/+0
This header file isn't exported to userspace, so there is no benefit in defining struct sigaction for userspace here. Signed-off-by: Helge Deller <deller@gmx.de>
2018-06-28nvme-rdma: fix possible double free of controller async event bufferSagi Grimberg1-2/+5
If reconnect/reset failed where the controller async event buffer was freed, we might end up freeing it again as we call nvme_rdma_destroy_admin_queue again in the remove path. Given that the sequence is guaranteed to serialize by .ctrl_stop, we simply set ctrl->async_event_sqe.data to NULL and don't free it in future visits. Reported-by: Max Gurtovoy <maxg@mellanox.com> Tested-by: Max Gurtovoy <maxg@mellanox.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-06-28kconfig: loop boundary condition fixJerry James1-1/+1
If buf[-1] just happens to hold the byte 0x0A, then nread can wrap around to (size_t)-1, leading to invalid memory accesses. This has caused segmentation faults when trying to build the latest kernel snapshots for i686 in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1592374 Signed-off-by: Jerry James <loganjerry@gmail.com> [alexpl@fedoraproject.org: reformatted patch for submission] Signed-off-by: Alexander Ploumistos <alexpl@fedoraproject.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-28kbuild: reword help of LD_DEAD_CODE_DATA_ELIMINATIONMasahiro Yamada1-4/+3
Since commit 5d20ee3192a5 ("kbuild: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selectable if enabled"), HAVE_LD_DEAD_CODE_DATA_ELIMINATION is supposed to be selected by architectures that are capable of this functionality. LD_DEAD_CODE_DATA_ELIMINATION is now users' selection. Update the help message. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-28kconfig: handle P_SYMBOL in print_symbol()Dirk Gouders2-0/+7
Each symbol has a property of type P_SYMBOL since commit 59e89e3ddf85 (kconfig: save location of config symbols). Handle those properties in print_symbol(). Further, place a pointer to print_symbol() in the comment above the list of known property type. Signed-off-by: Dirk Gouders <dirk@gouders.net> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-28staging: rtl8188eu: remove whitespace - coding styleMichael Straube1-7/+4
Remove unrequired whitespace in some declarations, fix an indentation and remove unrequired blank lines. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: rtl8723bs: use mac_pton() in rtw_macaddr_cfg()Michael Straube2-29/+4
Use the mac_pton() helper to convert the mac address string. The functions key_char2num() and key_2char2num() are not used anywhere else and can be removed. This also has the benefit of validating the input since mac_pton() returns false if the string is not valid. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: rtl8723bs: use ether_addr_copy() in rtw_macaddr_cfg()Michael Straube1-3/+3
Use ether_addr_copy() instead of memcpy() to copy the mac address. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: rtl8723bs: refactor rtw_macaddr_cfg()Michael Straube1-15/+4
Using is_broadcast_ether_addr() and is_zero_ether_addr() instead of testing each byte of the mac[] array for 0xff and 0x00 shortens the code and improves readability. If np == NULL, of_get_property() returns NULL, hence the "np" check is not needed. Instead of a fixed default mac address use a random one to reduce the likelihood of mac address collision. Thanks to Joe Perches and Dan Carpenter. Suggested-by: Joe Perches <joe@perches.com> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: rtl8723bs: fix comparsion to NULL - coding styleMichael Straube1-2/+2
Fix comparsion to NULL issues found by checkpatch. Use !x instead of x == NULL. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: Convert random_ether_addr to eth_random_addrJoe Perches1-1/+1
random_ether_addr is a #define for eth_random_addr which is generally preferred in kernel code by ~3:1 Convert the uses of random_ether_addr to enable removing the #define Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: rtl8188eu: remove blank linesMichael Straube7-15/+0
Remove unrequired blank lines after open and before close braces. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: wlan-ng: add parentheses to macro argument usage in prism2mgmt.cTim Collier1-2/+2
Fix two "CHECK: Macro argument 'N' may be better as '(N)' to avoid precedence issue" messages, reported by checkpatch, by adding parentheses around the offending macro argument references. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: wlan-ng: replace macro with inline function in prism2mgmt.cTim Collier1-4/+15
checkpatch gives the following message for the p80211rate_to_p2bit macro: CHECK: Macro argument reuse 'n' - possible side-effects? To fix the message, replace the macro with an equivalent inline function. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: wlan-ng: replace WLAN_CTL_FRAMELEN with inline function in p80211hdr.hTim Collier1-10/+20
checkpatch reports a "CHECK" diagnostic for WLAN_CTL_FRAMELEN as the macro reuses its argument, leading to possible side-effects. Avoid this by replacing the macro with an equivalent function, named wlan_ctl_framelen (as recommended in the coding style). All references to the macro also updated accordingly. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: wlan-ng: fix coding style (indentation) in prism2mib.cTim Collier1-4/+4
Fix "CHECK: Alignment should match open parenthesis" reported by checkpatch.pl. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: rtlwifi: Fix a possible sleep-in-atomic-context bug in ↵Jia-Ju Bai1-1/+1
_is_fw_read_cmd_down() The driver may sleep with holding a spinlock. The function call path (from bottom to top) in Linux-4.16.7 is: [FUNC] schedule drivers/staging/rtlwifi/halmac/rtl_halmac.c, 884: schedule in _is_fw_read_cmd_down drivers/staging/rtlwifi/halmac/rtl_halmac.c, 912: _is_fw_read_cmd_down in rtl_halmac_send_h2c drivers/staging/rtlwifi/halmac/rtl_halmac.c, 907: _raw_spin_lock_irqsave in rtl_halmac_send_h2c To fix this bug, schedule() is replaced with mdelay(1). This bug is found by my static analysis tool (DSAC-2) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>