summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)Author
2019-09-03staging: greybus: light: fix a couple double freesDan Carpenter
The problem is in gb_lights_request_handler(). If we get a request to change the config then we release the light with gb_lights_light_release() and re-allocated it. However, if the allocation fails part way through then we call gb_lights_light_release() again. This can lead to a couple different double frees where we haven't cleared out the original values: gb_lights_light_v4l2_unregister(light); ... kfree(light->channels); kfree(light->name); I also made a small change to how we set "light->channels_count = 0;". The original code handled this part fine and did not cause a use after free but it was sort of complicated to read. Fixes: 2870b52bae4c ("greybus: lights: add lights implementation") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Rui Miguel Silva <rmfrfs@gmail.com> Link: https://lore.kernel.org/r/20190829122839.GA20116@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: rts5208: Fix checkpath warningP SAI PRASANTH
This patch fixes the following checkpath warning in the file drivers/staging/rts5208/rtsx_transport.c:546 WARNING: line over 80 characters + option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA; Signed-off-by: P SAI PRASANTH <saip2823@gmail.com> Link: https://lore.kernel.org/r/20190831034926.GA17810@dell-inspiron Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: rts5208: Fixed checkpath warning.Prakhar Sinha
This patch solves the following checkpatch.pl's message in drivers/staging/rts5208/rtsx_transport.c:397. WARNING: line over 80 characters + option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA; Signed-off-by: Prakhar Sinha <prakharsinha2808@gmail.com> Link: https://lore.kernel.org/r/20190830121656.GA2740@MeraComputer Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: rts5208: remove redundant sd30_mode checksColin Ian King
There are two hunks of code that check if sd30_mode is true however an earlier check in an outer code block on sd30_mode being false means that sd30_mode can never be true at these points so these checks are redundant. Remove the dead code. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190830081047.13630-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: exfat: remove return and error return via a gotoColin Ian King
The return statement is incorrect, the error exit should be by assigning ret with the error code and exiting via label out. Thanks to Valdis Klētnieks for correcting my original fix. Addresses-Coverity: ("Structurally dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190902094052.28029-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: exfat: fix uninitialized variable retColin Ian King
Currently there are error return paths in ffsReadFile that exit via lable err_out that return and uninitialized error return in variable ret. Fix this by initializing ret to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: c48c9f7ff32b ("staging: exfat: add exfat filesystem code to staging") Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>, Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Link: https://lore.kernel.org/r/20190830184644.15590-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: exfat: use BIT macro for defining sizesValentin Vidic
Fixes checkpatch.pl warning: CHECK: Prefer using the BIT macro Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr> Link: https://lore.kernel.org/r/20190902184319.11971-1-vvidic@valentin-vidic.from.hr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: exfat: cleanup blank line warningsValentin Vidic
Fixes checkpatch.pl warnings: CHECK: Please don't use multiple blank lines CHECK: Blank lines aren't necessary after an open brace '{' CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr> Link: https://lore.kernel.org/r/20190902190329.18685-1-vvidic@valentin-vidic.from.hr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-02staging: exfat: make exfat depend on BLOCKGreg Kroah-Hartman
This should fix a build error in some configurations when CONFIG_BLOCK is not selected. Also properly set the dependancy for no FAT support at the same time. Reported-by: Randy Dunlap <rdunlap@infradead.org> Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu> Link: https://lore.kernel.org/r/20190902174631.GB31445@kroah.com Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-02drivers/staging/exfat - by default, prohibit mount of fat/vfatValdis Klētnieks
Concerns have been raised about the exfat driver accidentally mounting fat/vfat file systems. Add an extra configure option to help prevent that. Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Link: https://lore.kernel.org/r/245727.1567183359@turing-police Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-30staging: exfat: add exfat filesystem code to stagingValdis Klētnieks
The exfat code needs a lot of work to get it into "real" shape for the fs/ part of the kernel, so put it into drivers/staging/ for now so that it can be worked on by everyone in the community. The full specification of the filesystem can be found at: https://docs.microsoft.com/en-us/windows/win32/fileio/exfat-specification Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20190828160817.6250-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-28staging: most: sound: Fix error path of audio_initYueHaibing
If most_register_configfs_subsys() fails, we should call most_deregister_component() do cleanup. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 919c03ae11b9 ("staging: most: enable configfs support") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190827131346.12704-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-28staging: rtl8192u: Fix indentationStephen Brennan
Checkpatch reports WARNING:SUSPECT_CODE_INDENT in several places. Fix this by aligning code properly with tabs. Signed-off-by: Stephen Brennan <stephen@brennan.io> Link: https://lore.kernel.org/r/20190828043542.3753-1-stephen@brennan.io Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: move es2 to drivers/greybus/Greg Kroah-Hartman
The es2 Greybus host controller has long been stable, so move it out of drivers/staging/ to drivers/greybus/ Cc: Johan Hovold <johan@kernel.org> Cc: greybus-dev@lists.linaro.org Cc: linux-kernel@vger.kernel.org Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: move the greybus core to drivers/greybusGreg Kroah-Hartman
The Greybus core code has been stable for a long time, and has been shipping for many years in millions of phones. With the advent of a recent Google Summer of Code project, and a number of new devices in the works from various companies, it is time to get the core greybus code out of staging as it really is going to be with us for a while. Cc: Johan Hovold <johan@kernel.org> Cc: linux-kernel@vger.kernel.org Cc: greybus-dev@lists.linaro.org Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: move core include files to include/linux/greybus/Greg Kroah-Hartman
With the goal of moving the core of the greybus code out of staging, the include files need to be moved to include/linux/greybus.h and include/linux/greybus/ Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com> Cc: Johan Hovold <johan@kernel.org> Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com> Cc: Rui Miguel Silva <rmfrfs@gmail.com> Cc: David Lin <dtwlin@gmail.com> Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie> Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Acked-by: Mark Greer <mgreer@animalcreek.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: loopback: Fix up some alignment checkpatch issuesGreg Kroah-Hartman
Some function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy. Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie> Cc: Johan Hovold <johan@kernel.org> Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: log: Fix up some alignment checkpatch issuesGreg Kroah-Hartman
Some function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy. Cc: David Lin <dtwlin@gmail.com> Cc: Johan Hovold <johan@kernel.org> Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: manifest: Fix up some alignment checkpatch issuesGreg Kroah-Hartman
Some function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy. Cc: Johan Hovold <johan@kernel.org> Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: hd: Fix up some alignment checkpatch issuesGreg Kroah-Hartman
Some function prototypes do not match the expected alignment formatting so fix that up so that checkpatch is happy. Cc: Johan Hovold <johan@kernel.org> Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: remove license "boilerplate"Greg Kroah-Hartman
When the greybus drivers were converted to SPDX identifiers for the license text, some license boilerplate was not removed. Clean this up by removing this unneeded text now. Cc: Johan Hovold <johan@kernel.org> Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com> Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie> Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Acked-by: Mark Greer <mgreer@animalcreekk.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: greybus: fix up SPDX comment in .h filesGreg Kroah-Hartman
When these files originally got an SPDX tag, I used // instead of /* */ for the .h files. Fix this up to use // properly. Cc: Johan Hovold <johan@kernel.org> Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Alex Elder <elder@kernel.org> Link: https://lore.kernel.org/r/20190825055429.18547-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: rtl8192u: Add or remove blank lines as requiredSumera Priyadarsini
This patch fixes the file r8190_rtl8256.c to avoid the following checkpatch.pl warnings: CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: Please don't use multiple blank line Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com> Link: https://lore.kernel.org/r/20190826182227.30738-1-sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: rtl8192u: Add or remove spaces to fix style issuesSumera Priyadarsini
This patch fixes the file r8190_rtl8256.c to avoid the following checkpatch.pl warnings: CHECK: spaces preferred around that '<<' (ctx:VxV) CHECK: spaces preferred around that '-' (ctx:VxV) CHECK: No space is necessary after a cast Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com> Link: https://lore.kernel.org/r/20190826180909.27775-1-sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: rtl8712: wifi: checkpatch style fixTaihsiang Ho (tai271828)
Remove multiple blank lines. Signed-off-by: Taihsiang Ho (tai271828) <tai271828@gmail.com> Link: https://lore.kernel.org/r/20190826052018.18649-1-tai271828@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27staging: most-core: Fix checkpatch warningsPeikan Tsai
Hi, This patch solves the following checkpatch.pl's messages in drivers/staging/most/core.c. WARNING: line over 80 characters + return snprintf(buf, PAGE_SIZE, "%s", ch_data_type[i].name); CHECK: Please use a blank line after function/struct/union/enum declarations +} +/** Signed-off-by: Peikan Tsai <peikantsai@gmail.com> Link: https://lore.kernel.org/r/20190825175849.GA74586@MarkdeMacBook-Pro.local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25staging: rtl8192u: Add space around binary operatorsSumera Priyadarsini
This patch fixes the file r8180_93cx6.c to avoid the checkpatch.pl warnings: CHECK: spaces preferred around that '<<' (ctx:VxV) CHECK: spaces preferred around that '-' (ctx:VxV) Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com> Link: https://lore.kernel.org/r/20190822193535.14357-1-sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25staging: rtl8192u: remove code under TO_DO_LISTStephen Brennan
Several blocks of code are guarded by #ifdef TO_DO_LIST. If this is defined, compilation fails. No machinery exists to define this, and no documenation on the in-progress feature exists. Since this code is dead, let's delete it. Signed-off-by: Stephen Brennan <stephen@brennan.io> Link: https://lore.kernel.org/r/20190823162410.10038-1-stephen@brennan.io Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25staging: rtl8192u: Remove unnecessary blank linesSumera Priyadarsini
This patch fixes the file r8180_93cx6.c to avoid the checkpatch.pl warning: CHECK: Please don't use multiple blank lines Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com> Link: https://lore.kernel.org/r/20190822145545.19894-1-sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25staging: rtl8192u: remove redundant assignment to pointer cryptColin Ian King
The pointer crypt is being set with a value that is never read, the assignment is redundant and hence can be removed. Thanks to Dan Carpenter for sanity checking that this was indeed redundant. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20190822084609.8971-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25staging: rtl8723bs: os_dep: Drop condition with no effectSaurav Girepunje
As the "else if" and "else" branch body are identical the condition has no effect. So drop the "else if" condition. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/20190821181631.GA11082@saurav Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25staging: rtl8723bs: hal: Drop condition with no effectSaurav Girepunje
As the "else if" and "else" branch body are identical the condition has no effect. So drop the else if condition. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/20190821180153.GA10678@saurav Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25staging: rtl8723bs: os_dep: Remove unused declarationsHariprasad Kelam
Remove unused Macro declarations Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Link: https://lore.kernel.org/r/1566406901-6700-1-git-send-email-hariprasad.kelam@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>