summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2015-10-27staging: rtl8712: Remove unnecessary variablesAmitoj Kaur Chawla
Remove unnecessary variables that can be replaced with a single line of code. The semantic patch used to find this is: // <smpl> @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; expression E; @@ - T i = E; ... when != i @@ type T; identifier i; @@ - T i; ... when != i // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: lprocfs_status: Remove unused declarationShraddha Barke
Remove declaration of function lprocfs_wr_timeouts from header file since it is not used Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: lustre_log: Remove unused functionsShraddha Barke
Remove the functions which are defined but not used anywhere Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: mt29f_spinand: Indent to match open parenthesisEva Rachel Retuya
Fix alignment issues by properly indenting function parameters in accordance to the kernel coding style. Checkpatch pointed out this issue. CHECK: Alignment should match open parenthesis Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: rtl8192u: ieee80211: Do not export static functionAmitoj Kaur Chawla
Remove the export symbol for static function. The semantic patch used to find this is: // <smpl> @r@ type T; identifier f; @@ static T f (...) { ... } @@ identifier r.f; declarer name EXPORT_SYMBOL; @@ -EXPORT_SYMBOL(f); // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: media: omap4iss: Fixes line breakAmarjargal Gundjalam
This patch fixes the checkpatch issue: CHECK: Logical continuations should be on the previous line Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: media: omap4iss: Matches alignment with open parenthesisAmarjargal Gundjalam
This patch fixes some of the checkpatch issue: CHECK: Alignment should match open parenthesis Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: media: omap4iss: Removes unnecessary blank linesAmarjargal Gundjalam
This patch fixes checkpatch issues: CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Please don't use multiple blank lines Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: media: omap4iss: Replaces bit shift on 1 with BIT MacroAmarjargal Gundjalam
This patch fixes some of the checkpatch issue: CHECK: Prefer using the BIT macro Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: media: omap4iss: Fixes misspellingAmarjargal Gundjalam
This patch fixes the checkpatch issue: CHECK: 'splitted' may be misspelled - perhaps 'split'? Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: media: omap4iss: Fixes NULL comparisonAmarjargal Gundjalam
This patch fixes the checkpatch issue: CHECK: Comparison to NULL could be written Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: vt6656: Do not use multiple blank lines.Burcin Akalin
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines" Signed-off-by: Burcin Akalin <brcnakalin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: vt6656: Add space around '|'Burcin Akalin
Add space around operator '|'. Problem found using checkpatch.pl CHECK: spaces preferred around that '|' (ctx:VxV) Signed-off-by: Burcin Akalin <brcnakalin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: iio: dummy: replace block comment with single line commentAlison Schofield
Replace one block comment with a single line comment. Follow style of previous comment and omit word channel, since it's clear the topic is channels. Addresses checkpatch.pl: WARNING: Block comments use * on subsequent lines Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: iio: dummy: use uppercase descriptors for enum namesAlison Schofield
Replace lower case names in the enum dummy_scan_elements with uppercase names and a descriptive prefix: DUMMY_INDEX_ Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: iio: adis16060_core: Fix error handlingCristina Moraru
We need to check adis16060_spi_read return code to avoid feeding user space with bogus data. While, at it introduce out_unlock label in order to simplify locking on error path. Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: iio: Remove unused variableCristina Moraru
Remove variable that is initialized but not used. Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: nvec: Do not use multiple blank lines.Burcin Akalin
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines". Signed-off-by: Burcin Akalin <brcnakalin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: slicoss: Fixes block comment styleAmarjargal Gundjalam
This patch fixes the checkpatch.pl warnings: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: slicoss: Adds space around operatorsAmarjargal Gundjalam
This patch fixes the checkpatch.pl check: CHECK: spaces preferred around that ‘’ Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: slicoss: Removes unnecessary space after a castAmarjargal Gundjalam
This patch fixes the checkpatch.pl check: CHECK: No space is necessary after a cast Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: slicoss: Removes multiple blank linesAmarjargal Gundjalam
This patch fixes the checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: fsl-mc: section mismatch bug fixLijun Pan
WARNING: drivers/staging/built-in.o(.init.text+0xdc): Section mismatch in reference from the function fsl_mc_bus_driver_init() to the function .exit.text:dprc_driver_exit() The function __init fsl_mc_bus_driver_init() references a function __exit dprc_driver_exit(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __exit annotation of dprc_driver_exit() so it may be used outside an exit section. Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: Replace LPROCFS_CLIMP_CHECK with lprocfs_climp_checkKsenija Stanojevic
Static inline functions are preferred over macros. The function is placed in obd_class.h instead lprocfs_status.h because obd_class.h includes header obd.h which contains definition of struct obd_device and in that way avoids build error: Dereferencing pointer to incomplete type. Also remove macro LPROCFS_CLIMP_CHECK since it's no longer used. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: ptlrpc: Replace seq_printf() with seq_putc()Amitoj Kaur Chawla
Replace seq_printf() with seq_putc() since it is more expensive than seq_putc(). Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: Replace sscanf with kstrtointCristina Moraru
Replace single variable sscanf with specialized function kstrtoint at the suggestion of checkpatch.pl, to fix 'WARNING: Prefer kstrto<type> to single variable sscanf' Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: remove unused OBD_PAGE_ALLOC/FREE and friendsMike Rapoport
The OBD_PAGE_ALLOC/FREE and related macros are not used and can be removed Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: get rid of OBD_PAGE_ALLOC/FREEMike Rapoport
Use alloc_page and __free_page instead Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: Don't ignore error codeCristina Moraru
Error stored in rc was never reported, so directly return it here. Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: Remove unused obd_cache.h fileShraddha Barke
Remove the header file obd_cache.h since it is not needed Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: lustre: ptlrpc: Remove EXPORT_SYMBOL for sptlrpc_rule_set_expandShraddha Barke
Since sptlrpc_rule_set_expand is static, export symbol is not needed Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: lustre: ldlm: Do not export static functionAmitoj Kaur Chawla
Remove the export symbol for static function. The semantic patch used to find this is: // <smpl> @r@ type T; identifier f; @@ static T f (...) { ... } @@ identifier r.f; declarer name EXPORT_SYMBOL; @@ -EXPORT_SYMBOL(f); // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: comedi: fix extreme case of comedi_nsamples_left()Ian Abbott
`comedi_nsamples_left(s, nsamples)` returns the number of samples remaining to complete an asynchronous command or the passed in `nsamples`, whichever is lower. However, it goes wrong in the extreme case of setting the `nsamples` parameter to `UINT_MAX` when the number of conversions per "scan" (`s->async->cmd.scan_end_arg`) is 1. It uses `comedi_nscans_remaining(s, nscans)` to determine the number of scans remaining, or the parameter `nscans`, whichever is lower. To determine the parameter `nscans`, it divides `nsamples` by the number of conversions per scan and adds 1. The addition of 1 is to avoid setting the parameter `nscans` to 0, as `comedi_nscans_remaining(s, nscans)` treats that value specially. However in the extreme case where `nsamples` is `UINT_MAX` and the number of samples per scan is 1, the addition of 1 to `nscans` overflows, producing the unwanted 0. Fix it by refactoring new a function `__comedi_nscans_remaining(s, nscans)` out of `comedi_nscans_remaining(s, nscans)`. The new function does everything except the special handling when `nscans` is 0. Change `comedi_nsamples_remaining()` to call the new function without adding 1 to `nscans` to avoid the overflow. This overflow bug doesn't affect any of the current COMEDI drivers. I stumbled across it while changing to one of the drivers. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: wilc1000: coreconfigurator: Remove unnecessary parenthesesShivani Bhardwaj
Parentheses around some arguments and expressions are not required and should be removed. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper functionShivani Bhardwaj
Remove the function get_current_channel() and replace its calls by get_current_channel_802_11n() as the former function's definition involves only returning the value of latter function. Semantic patch used to find out the issue: @@ identifier f,g; @@ *f(...) { return g(...); } Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Staging: wilc1000: coreconfigurator: Drop unneeded wrapper functionsShivani Bhardwaj
Replace the wrapper functions get_address1(), get_address2() and get_address3() with the standard kernel function ether_addr_copy(). Semantic patch used to identify the issue: @@ identifier f,g; @@ *f(...) { g(...); } Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: wilc1000: return -ENOMEM when kmalloc failedLuis de Bethencourt
The driver is using -1 instead of the -ENOMEM defined macro to specify that a buffer allocation failed. Fixes smatch warning and similars: drivers/staging/wilc1000/host_interface.c:1757 Handle_Key() warn: returning -1 instead of -ENOMEM is sloppy Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: wilc1000: rename host_int_set_WEPDefaultKeyIDChaehyun Lim
This patch replaces host_int_set_WEPDefaultKeyID with host_int_set_wep_default_key to avoid camelcase. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: wilc1000: rename u8Index in host_int_set_WEPDefaultKeyIDChaehyun Lim
This patch changes second parameter of host_int_set_WEPDefaultKeyID from u8Index to index to avoid camelcase. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: wilc1000: fix parameter name of function declarationChaehyun Lim
This patch changes struct host_if_drv of host_int_set_WEPDefaultKeyID function declaration from hWFIDrv to hif_drv in host_interface.h With this change, first parameter name of this function declaration and definition has same name as hif_drv. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: wilc1000: fix return type of host_int_set_WEPDefaultKeyIDChaehyun Lim
This patch changes return type of host_int_set_WEPDefaultKeyID from s32 to int. The result variable gets return value from wilc_mq_send that has return type of int. It should be changed return type int as well as data type of result variable. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27Merge 4.3-rc7 into staging-nextGreg Kroah-Hartman
We want the other staging patches in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25Staging: wilc1000: Remove boolean comparisionPunit Vara
This patch is to the host_interface.c file that fixes up following warning reported by coccicheck: WARNING: Comparison to bool Boolean tests do not need explicit comparison to true or false Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: rdma: amso1100: Drop unnecessary gotoAmitoj Kaur Chawla
Deletes the jump to a label on the next line when the label isn't used anywhere else. The semantic patch used to find this is: // <smpl> @r@ identifier l; @@ -if (...) goto l; -l: // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: rdma: hfi1: chip: Use setup_timerMuhammad Falak R Wani
Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. <smpl> @timer@ expression e1,e2,e3,fn_ptr; @@ -init_timer(&e1); +setup_timer(&e1, fn_ptr, e2); ... when != fn_ptr = e3 -e1.function = fn_ptr; -e1.data = e2; </smpl> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25Staging: mt29f_spinand: Prefer using the BIT macroEva Rachel Retuya
Replace all instances of bit shifting on 1 with the BIT(x) macro. In addition, convert other non-1 shift operations with the equivalent BIT(x) macro for uniformity. Issue pointed out by checkpatch. CHECK: Prefer using the BIT macro Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25Staging: mt29f_spinand: Replace udelay function with usleep_rangeEva Rachel Retuya
Use 'usleep_range' instead of 'udelay' to elapse time. For spinand_reset, define the upper limit by a factor of 2 to keep the wait short while still allowing a "good enough" range for wakeup. Define the range 250us - 1ms for spinand_cmdfunc to provide enough leeway before issuing spinand_reset. Checkpatch found this issue. CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: ipath: ipath_init_chip: Use setup_timerMuhammad Falak R Wani
Use of the timer API function setup_timer instead of init_timer, removing the structure field assignments, and make the codeflow more readable. The simplified sematic patch used is :- <smpl> @timer@ expression e1,e2,e3,fn_ptr; @@ -init_timer(&e1); +setup_timer(&e1, fn_ptr, e2); ... when != fn_ptr = e3 -e1.function = fn_ptr; -e1.data = e2; </smpl> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: ipath: ipath_sdma: Use setup_timerMuhammad Falak R Wani
Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: ipath: ipath_verbs: Use setup_timerMuhammad Falak R Wani
Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>