summaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)Author
2019-08-24erofs: move erofs out of stagingGao Xiang
EROFS filesystem has been merged into linux-staging for a year. EROFS is designed to be a better solution of saving extra storage space with guaranteed end-to-end performance for read-only files with the help of reduced metadata, fixed-sized output compression and decompression inplace technologies. In the past year, EROFS was greatly improved by many people as a staging driver, self-tested, betaed by a large number of our internal users, successfully applied to almost all in-service HUAWEI smartphones as the part of EMUI 9.1 and proven to be stable enough to be moved out of staging. EROFS is a self-contained filesystem driver. Although there are still some TODOs to be more generic, we have a dedicated team actively keeping on working on EROFS in order to make it better with the evolution of Linux kernel as the other in-kernel filesystems. As Pavel suggested, it's better to do as one commit since git can do moves and all histories will be saved in this way. Let's promote it from staging and enhance it more actively as a "real" part of kernel for more wider scenarios! Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Theodore Ts'o <tytso@mit.edu> Cc: Pavel Machek <pavel@denx.de> Cc: David Sterba <dsterba@suse.cz> Cc: Amir Goldstein <amir73il@gmail.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Darrick J . Wong <darrick.wong@oracle.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Jaegeuk Kim <jaegeuk@kernel.org> Cc: Jan Kara <jack@suse.cz> Cc: Richard Weinberger <richard@nod.at> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Chao Yu <yuchao0@huawei.com> Cc: Miao Xie <miaoxie@huawei.com> Cc: Li Guifu <bluce.liguifu@huawei.com> Cc: Fang Wei <fangwei1@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190822213659.5501-1-hsiangkao@aol.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8192u: fix spacing in ieee80211Stephen Brennan
Checkpatch emits several errors, warnings, and checks about spacing. Apply checkpatch's suggested spacing rules. Signed-off-by: Stephen Brennan <stephen@brennan.io> Link: https://lore.kernel.org/r/20190821143540.4501-4-stephen@brennan.io Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8192u: fix macro alignment in ieee80211Stephen Brennan
Several macros display unaligned, due to mixes of tabs and spaces. These can be fixed by making spacing consistent, do this. Signed-off-by: Stephen Brennan <stephen@brennan.io> Link: https://lore.kernel.org/r/20190821143540.4501-3-stephen@brennan.io Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8192u: fix OPEN_BRACE errors in ieee80211Stephen Brennan
Checkpatch emits several errors regarding braces being on the incorrect line. These can be fixed by moving the brace, do this. In a few cases, some comments were moved to facilitate this. Signed-off-by: Stephen Brennan <stephen@brennan.io> Link: https://lore.kernel.org/r/20190821143540.4501-2-stephen@brennan.io Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8192e: remove set but not used variable 'data_len'YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: In function ieee80211_ccmp_encrypt: drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:162:6: warning: variable data_len set but not used [-Wunused-but-set-variable] It is not used since commit 5ee5265674ce ("staging: rtl8192e: rtllib_crypt_ccmp.c: Use crypto API ccm(aes)") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190821122802.44028-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8192e: remove two set but not used variablesYueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: In function '_rtl92e_dm_tx_power_tracking_callback_tssi': drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:621:7: warning: variable 'bHighpowerstate' set but not used [-Wunused-but-set-variable] In function '_rtl92e_dm_rx_path_sel_byrssi': drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:1904:32: warning: variable 'cck_rx_ver2_min_index' set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190821122556.37636-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8192u: ieee80211: remove set but not used variable 'data_len'YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c: In function ieee80211_ccmp_encrypt: drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:162:6: warning: variable data_len set but not used [-Wunused-but-set-variable] It is not used since commit eb0e7bf3ca94 ("staging: rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Use crypto API ccm(aes)") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190821122250.71404-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: erofs: detect potential multiref due to corrupted imagesGao Xiang
As reported by erofs-utils fuzzer, currently, multiref (ondisk deduplication) hasn't been supported for now, we should forbid it properly. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") Cc: <stable@vger.kernel.org> # 4.19+ Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190821140152.229648-1-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rts5208: remove redundant assignment to retvalColin Ian King
Variable retval is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190818184649.13828-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: kpc2000: kpc2000_i2c: Fix different address spaces warningsEduardo Barretto
This patch fixes the following sparse warnings: kpc2000_i2c.c:137: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:137: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:137: got void * kpc2000_i2c.c:146: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:146: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:146: got void * kpc2000_i2c.c:147: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:147: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:147: got void * kpc2000_i2c.c:166: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:166: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:166: got void * kpc2000_i2c.c:166: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:166: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:166: got void * kpc2000_i2c.c:168: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:168: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:168: got void * kpc2000_i2c.c:168: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:168: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:168: got void * kpc2000_i2c.c:171: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:171: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:171: got void * kpc2000_i2c.c:174: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:174: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:174: got void * kpc2000_i2c.c:193: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:193: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:193: got void * kpc2000_i2c.c:194: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:194: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:194: got void * kpc2000_i2c.c:214: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:214: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:214: got void * kpc2000_i2c.c:219: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:219: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:219: got void * kpc2000_i2c.c:226: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:226: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:226: got void * kpc2000_i2c.c:238: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:238: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:238: got void * kpc2000_i2c.c:244: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:244: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:244: got void * kpc2000_i2c.c:252: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:252: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:252: got void * kpc2000_i2c.c:257: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:257: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:257: got void * kpc2000_i2c.c:259: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:259: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:259: got void * kpc2000_i2c.c:267: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:267: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:267: got void * kpc2000_i2c.c:273: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:273: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:273: got void * kpc2000_i2c.c:293: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:293: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:293: got void * kpc2000_i2c.c:294: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:294: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:294: got void * kpc2000_i2c.c:309: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:309: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:309: got void * kpc2000_i2c.c:312: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:312: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:312: got void * kpc2000_i2c.c:317: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:317: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:317: got void * kpc2000_i2c.c:324: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:324: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:324: got void * kpc2000_i2c.c:328: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:328: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:328: got void * kpc2000_i2c.c:329: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:329: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:329: got void * kpc2000_i2c.c:330: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:330: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:330: got void * kpc2000_i2c.c:338: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:338: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:338: got void * kpc2000_i2c.c:340: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:340: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:340: got void * kpc2000_i2c.c:342: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:342: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:342: got void * kpc2000_i2c.c:350: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:350: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:350: got void * kpc2000_i2c.c:350: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:350: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:350: got void * kpc2000_i2c.c:351: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:351: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:351: got void * kpc2000_i2c.c:414: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:414: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:414: got void * kpc2000_i2c.c:420: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:420: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:420: got void * kpc2000_i2c.c:422: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:422: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:422: got void * kpc2000_i2c.c:427: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:427: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:427: got void * kpc2000_i2c.c:428: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:428: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:428: got void * kpc2000_i2c.c:430: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:430: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:430: got void * kpc2000_i2c.c:435: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:435: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:435: got void * kpc2000_i2c.c:436: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:436: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:436: got void * kpc2000_i2c.c:438: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:438: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:438: got void * kpc2000_i2c.c:439: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:439: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:439: got void * kpc2000_i2c.c:445: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:445: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:445: got void * kpc2000_i2c.c:446: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:446: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:446: got void * kpc2000_i2c.c:454: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:454: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:454: got void * kpc2000_i2c.c:459: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:459: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:459: got void * kpc2000_i2c.c:461: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:461: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:461: got void * kpc2000_i2c.c:472: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:472: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:472: got void * kpc2000_i2c.c:472: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:472: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:472: got void * kpc2000_i2c.c:475: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:475: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:475: got void * kpc2000_i2c.c:475: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:475: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:475: got void * kpc2000_i2c.c:493: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:493: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:493: got void * kpc2000_i2c.c:493: warning: incorrect type in argument 2 (different address spaces) kpc2000_i2c.c:493: expected void volatile [noderef] <asn:2> *addr kpc2000_i2c.c:493: got void * kpc2000_i2c.c:512: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:512: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:512: got void * kpc2000_i2c.c:516: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:516: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:516: got void * kpc2000_i2c.c:516: warning: incorrect type in argument 1 (different address spaces) kpc2000_i2c.c:516: expected void const volatile [noderef] <asn:2> *addr kpc2000_i2c.c:516: got void * Signed-off-by: Eduardo Barretto <edusbarretto@gmail.com> Link: https://lore.kernel.org/r/20190818183555.7167-1-edusbarretto@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: android: Remove ion device tree bindings from the TODODonald Yandt
Commit 23a4388f24f5 ("staging: android: ion: Remove file ion_chunk_heap.c") and eadbf7a34e44 ("staging: android: ion: Remove file ion_carveout_heap.c") removed the chunk and carveout heaps from ion but left behind the device tree bindings for them in the TODO, this patch removes it. Signed-off-by: Donald Yandt <donald.yandt@gmail.com> Link: https://lore.kernel.org/r/20190818152023.891-1-donald.yandt@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8712: Improve naming of include hearder guardsChristophe JAILLET
Choose a better name for the include hearder guard used in rtl871x_io.h. '_IO_H_' is to generic and does not match the comment after the #endif. Use '_RTL871X_IO_H_' instead. Also make the comments in the #endif /* XXX */ match the name used in #ifndef. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20190818150609.3376-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: erofs: avoid loop in submit chainsGao Xiang
As reported by erofs-utils fuzzer, 2 conditions can happen in corrupted images, which can cause unexpected behaviors. - access the same pcluster one more time; - access the tail end pcluster again, e.g. _ access again (will trigger tail merging) | 1 2 3 1 2 -> 1 2 3 1 |_ tail end of the chain \___/ (unexpected behavior) Let's detect and avoid them now. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190821030908.40282-1-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: rtl8723bs: core: Remove unneeded declaration WFD_OUIHariprasad Kelam
Remove unneeded declaration "extern unsigned char WFD_OUI" Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Link: https://lore.kernel.org/r/20190819165705.GA5782@hari-Inspiron-1545 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: comedi: ni_mio_common: Fix a typo in ni_mio_common.cMasanari Iida
This patch fix a spelling typo in ni_mio_common.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Link: https://lore.kernel.org/r/20190820153356.25189-1-standby24x7@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21staging: erofs: avoid endless loop of invalid lookback distance 0Gao Xiang
As reported by erofs-utils fuzzer, Lookback distance should be a positive number, so it should be actually looked back rather than spinning. Fixes: 02827e1796b3 ("staging: erofs: add erofs_map_blocks_iter") Cc: <stable@vger.kernel.org> # 4.19+ Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190819103426.87579-7-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-20staging: erofs: add two missing erofs_workgroup_put for corrupted imagesGao Xiang
As reported by erofs-utils fuzzer, these error handling path will be entered to handle corrupted images. Lack of erofs_workgroup_puts will cause unmounting unsuccessfully. Fix these return values to EFSCORRUPTED as well. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") Cc: <stable@vger.kernel.org> # 4.19+ Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190819103426.87579-4-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-20staging: erofs: cannot set EROFS_V_Z_INITED_BIT if fill_inode_lazy failsGao Xiang
As reported by erofs-utils fuzzer, unsupported compressed clustersize will make fill_inode_lazy fail, for such case we cannot set EROFS_V_Z_INITED_BIT since we need return failure for each z_erofs_map_blocks_iter(). Fixes: 152a333a5895 ("staging: erofs: add compacted compression indexes support") Cc: <stable@vger.kernel.org> # 5.3+ Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190819103426.87579-3-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-20staging: erofs: some compressed cluster should be submitted for corrupted imagesGao Xiang
As reported by erofs_utils fuzzer, a logical page can belong to at most 2 compressed clusters, if one compressed cluster is corrupted, but the other has been ready in submitting chain. The chain needs to submit anyway in order to keep the page working properly (page unlocked with PG_error set, PG_uptodate not set). Let's fix it now. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") Cc: <stable@vger.kernel.org> # 4.19+ Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190819103426.87579-2-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-20staging: erofs: fix an error handling in erofs_readdir()Gao Xiang
Richard observed a forever loop of erofs_read_raw_page() [1] which can be generated by forcely setting ->u.i_blkaddr to 0xdeadbeef (as my understanding block layer can handle access beyond end of device correctly). After digging into that, it seems the problem is highly related with directories and then I found the root cause is an improper error handling in erofs_readdir(). Let's fix it now. [1] https://lore.kernel.org/r/1163995781.68824.1566084358245.JavaMail.zimbra@nod.at/ Reported-by: Richard Weinberger <richard@nod.at> Fixes: 3aa8ec716e52 ("staging: erofs: add directory operations") Cc: <stable@vger.kernel.org> # 4.19+ Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190818125457.25906-1-hsiangkao@aol.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-20staging: erofs: refuse to mount images with malformed volume nameGao Xiang
As Richard reminder [1], A valid volume name should be ended in NIL terminator within the length of volume_name. Since this field currently isn't really used, let's fix it to avoid potential bugs in the future. [1] https://lore.kernel.org/r/1133002215.69049.1566119033047.JavaMail.zimbra@nod.at/ Reported-by: Richard Weinberger <richard@nod.at> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190818102824.22330-1-hsiangkao@aol.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-19Merge 5.3-rc5 into staging-nextGreg Kroah-Hartman
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-18staging: gasket: Remove unnecessary line-breaks in function signaturesSumera Priyadarsini
This patch fixes the function signatures for gasket_read_page_table_size, gasket_read_simple_page_table_size, gasket_partition_page_table, gasket_config_coherent_allocator to avoid the checkpatch.pl warning: CHECK: Lines should not end with a '(' Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com> Link: https://lore.kernel.org/r/20190816213702.32116-1-sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-18staging: erofs: use common file type conversionGao Xiang
Deduplicate the EROFS file type conversion implementation and remove EROFS_FT_* definitions since it's the same as defined by POSIX, let's follow ext2 as Linus pointed out [1] commit e10892189428 ("ext2: use common file type conversion"). [1] https://lore.kernel.org/r/CAHk-=wiUs+b=iVKM3mVooXgVk7cmmC67KTmnAuL0cd_cMMVAKw@mail.gmail.com/ Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190816071142.8633-1-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-18staging: rtl8192e: rtllib_crypt_ccmp.c: Use crypto API ccm(aes)Christina Quast
Use ccm(aes) aead transform instead of invoking the AES block cipher block by block. Signed-off-by: Christina Quast <contact@christina-quast.de> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Link: https://lore.kernel.org/r/20190816065936.12214-3-contact@christina-quast.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-18staging: rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Use crypto API ccm(aes)Christina Quast
Use ccm(aes) aead transform instead of invoking the AES block cipher block by block. Signed-off-by: Christina Quast <contact@christina-quast.de> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Link: https://lore.kernel.org/r/20190816065936.12214-2-contact@christina-quast.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: sm750fb: fix odd license textGreg Kroah-Hartman
There is some "confusing" license text in some of the sm750fb driver files. After discussing it with the company, it turns out to have been a mistake and these lines can be safely removed. The files are all to be licensed under the GPLv2 license. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: linux-fbdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20190815123009.16499-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: erofs: correct all misused ENOTSUPPGao Xiang
As Chao pointed out [1], ENOTSUPP is used for NFS protocol only, we should use EOPNOTSUPP instead... [1] https://lore.kernel.org/lkml/108ee2f9-75dd-b8ab-8da7-b81c17bafbf6@huawei.com/ Reported-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-3-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: erofs: differentiate unsupported on-disk formatGao Xiang
For some specific fields, use EOPNOTSUPP instead of EIO for values which look sane but aren't supported right now. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-2-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: erofs: introduce EFSCORRUPTED and more logsGao Xiang
Previously, EROFS uses EIO to indicate that filesystem is corrupted as well. However, as Pavel said [1], other filesystems tend to use EUCLEAN(EFSCORRUPTED) instead, let's follow what others do right now. Also, add some more prints to the syslog. [1] https://lore.kernel.org/lkml/20190813114821.GB11559@amd/ Suggested-by: Pavel Machek <pavel@denx.de> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-1-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: comedi: usbduxsigma: remove redundant assignment to variable fx2delayColin Ian King
Variable fx2delay is being initialized with a value that is never read and fx2delay is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190815105314.5756-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: rtl8192u: fix up indentation of a statementColin Ian King
There is a statement that is indented one level too deeply, remove the extraneous tab. Addresses-Coverity: ("Identation does not match nesting level") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190815084034.13885-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: gasket: apex: Make structure apex_desc constantNishka Dasgupta
Static structure apex_desc, of type gasket_driver_desc, is used only as an argument to the functions gasket_register_device() and gasket_unregister_device(). In the definitions of both these functions, their parameter is declared as const. Hence make apex_desc itself constant to protect it from modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190815054924.643-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: erofs: removing an extra call to iloc() in fill_inode()Pratik Shinde
in fill_inode() we call iloc() twice.Avoiding the extra call by storing the result. Signed-off-by: Pratik Shinde <pratikshinde320@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Cc: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190813203840.13782-1-pratikshinde320@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: do not force user to bring interface downIoana Ciornei
Link settings can be changed only when the interface is down. Disable and re-enable the interface, if necessary, behind the scenes so that we do not force users to an if down/up sequence. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-11-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: register_netdev only when readyIoana Ciornei
The register_netdev() call should be made only when ready to process any user request on the interface. Move the call to be the last one issued in the probe sequence. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-10-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: reword error messageIoana Ciornei
In the current state, the dpaa2-ethsw driver supports only one bridge per DPSW object. Reword the error message so that this information is much more clear. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-9-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove redundant VLAN checkIoana Ciornei
The ethsw_add_vlan() function is already called only when the VLAN is not yet configured on the switch. Remove the redundant check. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-8-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove unnecessary memsetIoana Ciornei
The ethtool core already zeroes the memory before calling .get_ethtool_stats() thus making the memset unnecessary. Remove it. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-7-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: use bool when encoding learning/flooding stateIoana Ciornei
Use a bool instead of an u8 in ethsw_set_learning() and ethsw_port_set_flood() to encode an binary type property. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-6-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove debug messageIoana Ciornei
Since ethtool will be loud enough if the .set_link_ksettings() callback fails, remove the debug messages which do not add additional information. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-5-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: add line terminator to all formatsIoana Ciornei
Add the '\n' line terminator to the string formats missing it. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-4-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: enable switch ports only on dev_openIoana Ciornei
At probe time, only the DPSW object should be enabled without the associated ports, which will get enabled on dev_open. Remove the ethsw_open() and ethsw_stop() functions and replace them only with dpsw_enable()/_disable(). Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-3-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove IGMP default addressIoana Ciornei
Do not add an IGMP multicast address by default since we do not support Rx/Tx ar the moment. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-2-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8723bs: remove redundant assignment to retColin Ian King
Variable ret is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190813124838.1317-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14Staging: rtl8712: rtl8712_recv: fixed 80 character length warningMerwin Trever Ferrao
When the checkpatch.pl script was run, it showed lines with length more than 80 characters in rtl8712_recv.c file. Fixed by breaking it up into two lines within 80 characters. Signed-off-by: Merwin Trever Ferrao <merwintf@gmail.com> Link: https://lore.kernel.org/r/20190813065806.GA23606@IoT-COE Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: r8712_dump_aggr_xframe(): Change type to voidNishka Dasgupta
Change return type of r8712_dump_aggr_xframe from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-4-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: r8712_xmitframe_aggr_1st(): Change return type to voidNishka Dasgupta
Change return type of r8712_xmitframe_aggr_1st from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: r8712_append_mpdu_unit(): Change return typeNishka Dasgupta
Change return type of r8712_append_mpdu_unit from u8 to void and remove its return statement as it always returns only _SUCCESS. Modify call sites to simply call this function instead of checking its return value, and execute all the statements in the if-block for when the function returns _SUCCESS. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: xmitframe_addmic(): Change return values and typeNishka Dasgupta
Change return values of xmitframe_addmic from _SUCCESS and _FAIL to 0 and -ENOMEM respectively. Modify call sites to check for non-zero values instead of _FAIL. Also change return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>