summaryrefslogtreecommitdiffstats
path: root/drivers/staging
Commit message (Collapse)AuthorAgeFilesLines
* staging: rtl8723au: whitespace and blank line cleaningGeliang Tang2016-02-207-94/+12
| | | | | | | | | This patch cleans whitespaces and blank lines involved with previous two patchs in this patch set. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: rtw_recv: remove useless codesGeliang Tang2016-02-201-7/+2
| | | | | | | | | There are some useless codes in rtw_free_recvframe23a_queue() and recvframe_defrag(), so remove them. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: use list_for_each_entry*()Geliang Tang2016-02-208-138/+95
| | | | | | | | | Use list_for_each_entry*() instead of list_for_each*() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: hal: Remove unused macrosBhumika Goyal2016-02-201-2/+0
| | | | | | | | The macros PlatformProcessHCICommands and PlatformTxBTQueuedPackets are not used anywhere in the kernel so remove them. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: hdm-usb: Remove create_workqueue()Amitoj Kaur Chawla2016-02-201-11/+6
| | | | | | | | | | | | | | | | | With concurrency managed workqueues, use of dedicated workqueues can be replaced by using system_wq. Drop schedule_usb_work by using system_wq. Since there is only one work item per buf_anchor and most_dev and they do not need to be ordered, increase of concurrency by switching to system_wq should not break anything. Both work items are sync canceled before the driver can be unregistered, to ensure no work item is pending or executing on any CPU by the time exit path is in flight. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: hdm-dim2: Replace pr_err with dev_errAmitoj Kaur Chawla2016-02-201-3/+3
| | | | | | | | Replace pr_err with dev_err when a appropriate device structure is present. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: hdm-dim2: Replace request_irq with devm_request_irqAmitoj Kaur Chawla2016-02-201-11/+3
| | | | | | | | | | | | | Devm_ functions allocate memory that is released when a driver detaches. Replace request_irq with devm_request_irq to get the interrupt for device which is automatically freed on exit. Remove corresponding free_irq from probe and remove functions of a platform device. Also, remove an unnecessary label. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: hdm-dim2: Switch to devm_ioremap_resource()Amitoj Kaur Chawla2016-02-201-28/+5
| | | | | | | | | | | | | | | | | | Devm_ functions allocate memory that is released when a driver detaches. Replace request_mem_region and ioremap with devm_ioremap_resource and remove corresponding freeing functions release_mem_region and iounmap from probe and remove functions of a platform device. Also, an unnecessary platform_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. Lastly, unnecessary labels have been removed. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: hdm-dim2: Replace kzalloc with devm_kzallocAmitoj Kaur Chawla2016-02-201-6/+3
| | | | | | | | | | | | Devm_ functions allocate memory that is released when a driver detaches. Replace kzalloc with devm_kzalloc and remove corresponding kfrees from probe and remove functions of a platform device. Also, an unnecessary label has been removed. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Return zero pointer after failed kmallocLaura Garcia Liebana2016-02-201-1/+3
| | | | | | | | | Return a ZERO_SIZE_PTR in the xlr_config_spill function if the kmalloc returns an invalid value. This change prevents a possible segmentation fault as the invalid pointer is fed into PTR_ALIGN macro. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix indent for conditional statementLaura Garcia Liebana2016-02-201-1/+1
| | | | | | | | Insert code indent for conditional statements. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Insert spaces around operatorLaura Garcia Liebana2016-02-201-2/+2
| | | | | | | | Spaces preferred around that '/' (ctx:VxV). Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix comparison to NULLLaura Garcia Liebana2016-02-201-2/+2
| | | | | | | | Avoid the use of comparison to NULL, use !<variable> instead. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix CamelCase for constantsLaura Garcia Liebana2016-02-202-504/+504
| | | | | | | | Avoid the use of CamelCase for constants. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix multiple assignmentsLaura Garcia Liebana2016-02-201-1/+2
| | | | | | | | Avoid the use of multiple assignments in a single line. Checkpatch found this issue. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Remove blank spaces after a castLaura Garcia Liebana2016-02-201-5/+5
| | | | | | | Remove uneeded blank spaces after a cast. Checkpatch found these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: netlogic: Fix several parentheses alignmentsLaura Garcia Liebana2016-02-202-79/+82
| | | | | | | | Align arguments with the open parenthesis. Checkpatch found these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: media: davinci_vpfe: remove ret variable in switch statementsThaissa Falbo2016-02-202-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove ret variable in functions that used it to determine the return. Simplified the return logic for these functions. Found with Coccinelle script: @@ local idexpression ret; expression c,d; identifier label; @@ switch ( ... ) { case label : ... - ret = c; - break; + return c; ... default: ... - ret = d; + return d; ... } ... when != ret - return ret; @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: media: davinci_vpfe: remove unnecessary ret variableThaissa Falbo2016-02-201-34/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplified return of funcions by removing assignment of ret variable. Coccinelle script used: @@ local idexpression ret; expression e; @@ - ret = e; - if(ret) - return ret; + if(e) + return e; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ local idexpression ret; expression e; @@ - ret = e; - if(ret){ + if(e){ ... when != ret - return ret; + return e; } @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:media:davinci_vpfe: Fix lines over 80 charactersThaissa Falbo2016-02-203-9/+14
| | | | | | | | | Fix "line over 80 characters" checkpatch warnings WARNING: line over 80 characters Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:media:davinci_vpfe: Fixed code identation warning as detected by ↵Thaissa Falbo2016-02-201-1/+1
| | | | | | | | | | | | checkpatch Fixed code indentation warning as detected by checkpatch. WARNING: suspect code indent for conditional statements (24, 40) #1672: FILE: drivers/staging/media/davinci_vpfe/dm365_resizer.c:1672: Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:media:davinci_vpfe: Fixed comparisons with constants warningsThaissa Falbo2016-02-201-12/+12
| | | | | | | | | | WARNING: Comparisons should place the constant on the right side of the test Fixed warnings by moving the constants to the right side of the comparisons. Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:media:davinci_vpfe: Fixed block comments according to kernel coding ↵Thaissa Falbo2016-02-205-20/+31
| | | | | | | | | | | | style Fixed block comments by following the checkpatch warnings WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on separate line Signed-off-by: Thaissa Falbo <thaissa.falbo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rdma: hfi1: Use offset_in_page macroAmitoj Kaur Chawla2016-02-201-2/+2
| | | | | | | | | | | | | | | | Use offset_in_page macro instead of (var & ~PAGE_MASK) The Coccinelle semantic patch used to make this change is as follows: // <smpl> @@ unsigned long p; @@ - p & ~PAGE_MASK + offset_in_page(p) // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rdma: hfi1: Use DIV_ROUND_UPAmitoj Kaur Chawla2016-02-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)) but is perhaps more readable. The Coccinelle script used is as follows: // <smpl> @@ expression n,d; @@ ( - (n + d - 1) / d + DIV_ROUND_UP(n,d) | - (n + (d - 1)) / d + DIV_ROUND_UP(n,d) ) @@ expression n,d; @@ - DIV_ROUND_UP((n),d) + DIV_ROUND_UP(n,d) @@ expression n,d; @@ - DIV_ROUND_UP(n,(d)) + DIV_ROUND_UP(n,d) // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rdma: hfi1: Replace kmalloc and memcpy with kmemdupAmitoj Kaur Chawla2016-02-201-2/+1
| | | | | | | | | | Replace kmalloc and memcpy with kmemdup. Found using Coccinelle. The semantic patch used to make this change can be found here: scripts/coccinelle/api/memdup.cocci Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wlan-ng: fix NULL comparisonFu Yong Quah2016-02-201-4/+4
| | | | | | | | Fix NULL equality comparision by changing it with exclamation mark, as suggested by Documentation/CodingStyle Signed-off-by: Fu Yong Quah <fuyong@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wlan-ng: Remove flush_scheduled_workAmitoj Kaur Chawla2016-02-201-1/+2
| | | | | | | | | | flush_scheduled_work() is scheduled for deprecation. Use cancel_work_sync() instead to ensure that there is no pending or running work item. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: wlan-ng: Remove unused functions and prototypesBhumika Goyal2016-02-202-78/+0
| | | | | | | | | | hfa384x_drvr_getconfig_async is not used anywhere in the kernel so remove it. Also remove its prototype from the header file. Also the function hfa384x_cb_rrid was only used by hfa384x_drvr_getconfig_async so remove its definition and prototype as well. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: wlan-ng: Remove function hfa384x_drvr_commtalliesBhumika Goyal2016-02-202-32/+0
| | | | | | | | The function hfa384x_drvr_commtallies is not used anywhere in the kernel so remove it. Also remove its prototype from the header file. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: fix comparison to NULLEva Rachel Retuya2016-02-201-1/+1
| | | | | | | | | | Remove comparison of spi->dev.platform_data to NULL by replacing it with '!spi->dev.platform_data' as checkpatch suggested: CHECK: Comparison to NULL could be written "!spi->dev.platform_data" Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: remove unnecessary blank lineEva Rachel Retuya2016-02-201-1/+0
| | | | | | | | | Delete the excess newline. Issue found by checkpatch. CHECK: Please don't use multiple blank lines Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: delete space after a castEva Rachel Retuya2016-02-201-2/+2
| | | | | | | | Delete unwanted whitespace after casting. Issue pointed out by checkpatch. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: add missing braces on if-else statementsEva Rachel Retuya2016-02-201-3/+4
| | | | | | | | | | Add braces around the else clause to adhere to kernel coding style. This clears the following checkpatch issue: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: use blank line after array declarationEva Rachel Retuya2016-02-201-0/+1
| | | | | | | | | | | Add a blank line after array declaration. This clears the checkpatch check: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: add spaces around operatorsEva Rachel Retuya2016-02-202-4/+4
| | | | | | | | | | Add spaces around operators to improve readability and to address the checkpatch issue: CHECK: spaces preferred around that '/' (ctx:VxV) Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: align to match open parenthesisEva Rachel Retuya2016-02-202-13/+15
| | | | | | | | Use a combination of tabs and spaces to align parameters to its corresponding open parenthesis. Checkpatch found this issue. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: light: fix multiple assignments in a single lineEva Rachel Retuya2016-02-201-2/+4
| | | | | | | | | Rewrite the multiple assignments to clear checkpatch check: CHECK: multiple assignments should be avoided Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: light: add space around '*"Eva Rachel Retuya2016-02-201-1/+1
| | | | | | | | Address checkpatch check pointing out the lack of space around the operator '*'. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: light: fix block comments according to kernel coding styleEva Rachel Retuya2016-02-202-14/+28
| | | | | | | | Add the trailing */ accordingly to suit the preferred way of placing block comments. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: light: omit space after a castEva Rachel Retuya2016-02-202-5/+5
| | | | | | | | Remove the unneeded space as pointed out by checkpatch: CHECK: No space is necessary after a cast Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: light: indent to match open parenthesisEva Rachel Retuya2016-02-203-40/+58
| | | | | | | Indent the parameters to match open parenthesis as suggested by checkpatch. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: accel: Remove unnecessary else after goto in if blockJanani Ravichandran2016-02-202-4/+2
| | | | | | | | | This patch removes the unnecessary else following an if block with a goto statement. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: adc: Remove unnecessary test from if conditionsAmitoj Kaur Chawla2016-02-201-2/+2
| | | | | | | | | | | | | | | Remove unnecessary test condition on ret variable which has been previously tested and returns its value if the value is non zero. This fixes the following smatch warnings: drivers/staging/iio/adc/ad7816.c:299 ad7816_set_oti() warn: we tested 'ret' before and it was 'false' drivers/staging/iio/adc/ad7816.c:306 ad7816_set_oti() warn: we tested 'ret' before and it was 'false' Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: wilc1000: Remove and rename struct typedefs from .c filesBhumika Goyal2016-02-203-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using typedef for a structure type is not suggested in Linux kernel coding style guidelines. So remove typedefs from structures wilc_sdio_t, wilc_spi_t and wilc_mac_cfg_t. Also remove '_t' suffix from the struct names by hand. The following semantic patch detects cases: @tn1@ type td; @@ typedef struct { ... } td; @script:python tf@ td << tn1.td; tdres; @@ coccinelle.tdres = td; @@ type tn1.td; identifier tf.tdres; @@ -typedef struct + tdres { ... } -td ; @@ type tn1.td; identifier tf.tdres; @@ -td + struct tdres Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: wilc1000: Remove unused function WILC_WFI_update_statsBhumika Goyal2016-02-202-30/+0
| | | | | | | | | This patch removes the function WILC_WFI_update_stats as it is not used anywhere in the kernel. Also remove its declaration from the header file. Grepped to find the occurences. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: lustre: lnet: Remove and rename struct typedef lstcon_session_tBhumika Goyal2016-02-202-5/+5
| | | | | | | | This patch gets rid of struct typedef lstcon_session_t as it is not suggested to use typdefs for structure types. Also drop '_t' from the name. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: Replace __attribute__((packed)) with __packedAmitoj Kaur Chawla2016-02-201-22/+22
| | | | | | | | This patch fixes the following checkpatch.pl warning: "WARNING: __packed is preferred over __attribute__((packed))". Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: lustre: Remove unneeded else after gotoJanani Ravichandran2016-02-203-6/+7
| | | | | | | Remove unnecessary else following an if block with a goto statement. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: lustre: lustre: Remove unnecessary else after returnJanani Ravichandran2016-02-203-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Else is unnecessary when there is a return statement in the corresponding if block. Coccinelle patch used: @rule1@ expression e1; @@ if (e1) { ... return ...; } - else{ ... - } @rule2@ expression e2; statement s1; @@ if(e2) { ... return ...; } - else s1 Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud